You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2013/04/02 16:53:35 UTC
svn commit: r1463576 [1/8] - in /ace/trunk:
org.apache.ace.client.repository.api/
org.apache.ace.client.repository.helper.base/
org.apache.ace.client.repository.helper.bundle/
org.apache.ace.client.repository.helper.configuration/
org.apache.ace.client...
Author: marrs
Date: Tue Apr 2 14:53:33 2013
New Revision: 1463576
URL: http://svn.apache.org/r1463576
Log:
ACE-333 Merged the client repository projects. A small fix was done to the REST client test which somehow could not 'see' ConfigurationHelper constants.
Added:
ace/trunk/org.apache.ace.client.repository/
ace/trunk/org.apache.ace.client.repository/.classpath
ace/trunk/org.apache.ace.client.repository/.project
ace/trunk/org.apache.ace.client.repository/.settings/
ace/trunk/org.apache.ace.client.repository/.settings/org.eclipse.jdt.core.prefs
ace/trunk/org.apache.ace.client.repository/api.bnd
ace/trunk/org.apache.ace.client.repository/bnd.bnd
ace/trunk/org.apache.ace.client.repository/build.xml
ace/trunk/org.apache.ace.client.repository/helper.base.bnd
ace/trunk/org.apache.ace.client.repository/helper.bundle.bnd
ace/trunk/org.apache.ace.client.repository/helper.configuration.bnd
ace/trunk/org.apache.ace.client.repository/helper.user.bnd
ace/trunk/org.apache.ace.client.repository/impl.bnd
ace/trunk/org.apache.ace.client.repository/src/
ace/trunk/org.apache.ace.client.repository/src/org/
ace/trunk/org.apache.ace.client.repository/src/org/apache/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Associatable.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Association.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/AssociationRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/ObjectRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdmin.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdminLoginContext.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryUtil.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/SessionFactory.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactHelper.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactPreprocessor.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactRecognizer.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactResource.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/PropertyResolver.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/base/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/base/ArtifactPreprocessorBase.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/base/VelocityArtifactPreprocessor.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/base/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/BundleHelper.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/impl/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/impl/Activator.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/impl/BundleHelperImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/impl/VersionRange.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/bundle/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/ConfigurationHelper.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/impl/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/impl/Activator.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/impl/ConfigurationHelperImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/configuration/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/UserAdminHelper.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/impl/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/impl/Activator.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/impl/UserHelperImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/user/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Artifact2FeatureAssociationImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Artifact2FeatureAssociationRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ArtifactObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ArtifactRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/AssociationImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/AssociationRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifier.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierManager.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/DeploymentArtifactImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/DeploymentVersionObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/DeploymentVersionRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Distribution2TargetAssociationImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Distribution2TargetAssociationRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/DistributionObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/DistributionRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Feature2DistributionAssociationImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Feature2DistributionAssociationRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/FeatureObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/FeatureRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryPropertyResolver.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/TargetObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/TargetPropertyResolver.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/TargetRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/Artifact2FeatureAssociation.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/ArtifactObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/DeploymentArtifact.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/DeploymentVersionObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/Distribution2TargetAssociation.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/DistributionObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/Feature2DistributionAssociation.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/FeatureObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/TargetObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/object/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/Artifact2FeatureAssociationRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/ArtifactRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/DeploymentVersionRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/Distribution2TargetAssociationRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/DistributionRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/Feature2DistributionAssociationRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/FeatureRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/TargetRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/repository/packageinfo
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/StatefulTargetObject.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/StatefulTargetRepository.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/LogEventComparator.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/packageinfo
ace/trunk/org.apache.ace.client.repository/test/
ace/trunk/org.apache.ace.client.repository/test/invalid13.xml
ace/trunk/org.apache.ace.client.repository/test/org/
ace/trunk/org.apache.ace.client.repository/test/org/apache/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/base/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/base/VelocityArtifactPreprocessorTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/configuration/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/configuration/impl/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/helper/configuration/impl/ConfigurationHelperImplTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ACE308Test.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/AdminTestUtil.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ArtifactTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/CachedRepositoryImplTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/FilebasedBackupRepositoryTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/MockBackupRepository.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/MockCachedRepository.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/MockRepository.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java
ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImplTest.java
ace/trunk/org.apache.ace.client.repository/test/valid10.xml
ace/trunk/org.apache.ace.client.repository/test/valid11.xml
ace/trunk/org.apache.ace.client.repository/test/valid12.xml
ace/trunk/org.apache.ace.client.repository/test/validWithComment.xml
Removed:
ace/trunk/org.apache.ace.client.repository.api/
ace/trunk/org.apache.ace.client.repository.helper.base/
ace/trunk/org.apache.ace.client.repository.helper.bundle/
ace/trunk/org.apache.ace.client.repository.helper.configuration/
ace/trunk/org.apache.ace.client.repository.helper.user/
ace/trunk/org.apache.ace.client.repository.impl/
Modified:
ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd
ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
Added: ace/trunk/org.apache.ace.client.repository/.classpath
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/.classpath?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/.classpath (added)
+++ ace/trunk/org.apache.ace.client.repository/.classpath Tue Apr 2 14:53:33 2013
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" output="bin_test" path="test"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="aQute.bnd.classpath.container"/>
+ <classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: ace/trunk/org.apache.ace.client.repository/.project
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/.project?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/.project (added)
+++ ace/trunk/org.apache.ace.client.repository/.project Tue Apr 2 14:53:33 2013
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.apache.ace.client.repository</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>bndtools.core.bndbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>bndtools.core.bndnature</nature>
+ </natures>
+</projectDescription>
Added: ace/trunk/org.apache.ace.client.repository/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/.settings/org.eclipse.jdt.core.prefs?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/.settings/org.eclipse.jdt.core.prefs (added)
+++ ace/trunk/org.apache.ace.client.repository/.settings/org.eclipse.jdt.core.prefs Tue Apr 2 14:53:33 2013
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: ace/trunk/org.apache.ace.client.repository/api.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/api.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/api.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/api.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,7 @@
+Export-Package: org.apache.ace.client.repository,\
+ org.apache.ace.client.repository.helper,\
+ org.apache.ace.client.repository.helper.bundle,\
+ org.apache.ace.client.repository.object,\
+ org.apache.ace.client.repository.repository,\
+ org.apache.ace.client.repository.stateful
+Bundle-Version: 1.0.0
Added: ace/trunk/org.apache.ace.client.repository/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/bnd.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/bnd.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/bnd.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,20 @@
+-buildpath: \
+ osgi.core,\
+ osgi.cmpn,\
+ org.mockito.mockito-all,\
+ xpp3;version=1.1.4,\
+ xstream;version=1.2.2,\
+ velocity;version=1.6.2,\
+ commons-lang;version=2.4.0,\
+ commons-collections;version=3.2.1,\
+ org.apache.felix.dependencymanager,\
+ org.apache.felix.gogo.runtime,\
+ org.apache.ace.log;version=latest,\
+ org.apache.ace.connectionfactory;version=latest,\
+ org.apache.ace.deployment.provider.api;version=latest,\
+ org.apache.ace.repository.api;version=latest,\
+ org.apache.ace.range.api;version=latest,\
+ org.apache.ace.test;version=latest,\
+ org.apache.ace.repository.ext;version=latest,\
+ org.apache.ace.server.log.store.api;version=latest
+-sub: *.bnd
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/build.xml
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/build.xml?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/build.xml (added)
+++ ace/trunk/org.apache.ace.client.repository/build.xml Tue Apr 2 14:53:33 2013
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="project" default="build">
+
+ <!-- -->
+
+ <import file="../cnf/build.xml" />
+</project>
Added: ace/trunk/org.apache.ace.client.repository/helper.base.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/helper.base.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/helper.base.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/helper.base.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,83 @@
+Private-Package: org.apache.commons.lang,\
+ javax.xml.namespace,\
+ org.xmlpull.mxp1,\
+ org.xmlpull.mxp1_serializer,\
+ org.xmlpull.v1,\
+ org.xmlpull.v1.builder,\
+ org.xmlpull.v1.builder.adapter,\
+ org.xmlpull.v1.builder.impl,\
+ org.xmlpull.v1.dom2_builder,\
+ org.xmlpull.v1.parser_pool,\
+ org.xmlpull.v1.sax2,\
+ org.xmlpull.v1.util,\
+ org.xmlpull.v1.wrapper,\
+ org.xmlpull.v1.wrapper.classic,\
+ org.apache.velocity,\
+ org.apache.velocity.anakia,\
+ org.apache.velocity.app,\
+ org.apache.velocity.app.event,\
+ org.apache.velocity.app.event.implement,\
+ org.apache.velocity.app.tools,\
+ org.apache.velocity.context,\
+ org.apache.velocity.convert,\
+ org.apache.velocity.exception,\
+ org.apache.velocity.io,\
+ org.apache.velocity.runtime,\
+ org.apache.velocity.runtime.defaults,\
+ org.apache.velocity.runtime.directive,\
+ org.apache.velocity.runtime.log,\
+ org.apache.velocity.runtime.parser,\
+ org.apache.velocity.runtime.parser.node,\
+ org.apache.velocity.runtime.resource,\
+ org.apache.velocity.runtime.resource.loader,\
+ org.apache.velocity.runtime.resource.util,\
+ org.apache.velocity.runtime.visitor,\
+ org.apache.velocity.servlet,\
+ org.apache.velocity.texen,\
+ org.apache.velocity.texen.ant,\
+ org.apache.velocity.texen.defaults,\
+ org.apache.velocity.texen.util,\
+ org.apache.velocity.util,\
+ org.apache.velocity.util.introspection,\
+ org.apache.commons.lang.builder,\
+ org.apache.commons.lang.enums,\
+ org.apache.commons.lang.exception,\
+ org.apache.commons.lang.math,\
+ org.apache.commons.lang.mutable,\
+ org.apache.commons.lang.text,\
+ org.apache.commons.lang.time,\
+ org.apache.commons.collections,\
+ org.apache.commons.collections.bag,\
+ org.apache.commons.collections.bidimap,\
+ org.apache.commons.collections.buffer,\
+ org.apache.commons.collections.collection,\
+ org.apache.commons.collections.comparators,\
+ org.apache.commons.collections.functors,\
+ org.apache.commons.collections.iterators,\
+ org.apache.commons.collections.keyvalue,\
+ org.apache.commons.collections.list,\
+ org.apache.commons.collections.map,\
+ org.apache.commons.collections.set
+Export-Package: org.apache.ace.client.repository.helper.base
+Import-Package: !javax.servlet,\
+ !javax.servlet.http,\
+ !com.werken.xpath,\
+ !javax.naming,\
+ !javax.sql,\
+ !javax.xml.parsers,\
+ !org.apache.log,\
+ !org.apache.log.format,\
+ !org.apache.log.output.io,\
+ !org.apache.log4j,\
+ !org.apache.tools.ant,\
+ !org.apache.tools.ant.taskdefs,\
+ !org.jdom,\
+ !org.jdom.input,\
+ !org.jdom.output,\
+ !org.w3c.dom,\
+ !org.xml.sax,\
+ !org.xml.sax.helpers,\
+ !org.apache.commons.logging,\
+ !org.apache.oro.text.perl,\
+ *
+Bundle-Version: 1.0.0
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/helper.bundle.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/helper.bundle.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/helper.bundle.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/helper.bundle.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,3 @@
+Private-Package: org.apache.ace.client.repository.helper.bundle.impl
+Bundle-Activator: org.apache.ace.client.repository.helper.bundle.impl.Activator
+Bundle-Version: 1.0.0
Added: ace/trunk/org.apache.ace.client.repository/helper.configuration.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/helper.configuration.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/helper.configuration.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/helper.configuration.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,5 @@
+Private-Package: org.apache.ace.client.repository.helper.configuration.impl
+Bundle-Activator: org.apache.ace.client.repository.helper.configuration.impl.Activator
+Export-Package: org.apache.ace.client.repository.helper.configuration
+Deployment-ProvidesResourceProcessor: org.osgi.deployment.rp.autoconf
+Bundle-Version: 1.0.0
Added: ace/trunk/org.apache.ace.client.repository/helper.user.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/helper.user.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/helper.user.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/helper.user.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,4 @@
+Private-Package: org.apache.ace.client.repository.helper.user.impl
+Bundle-Activator: org.apache.ace.client.repository.helper.user.impl.Activator
+Export-Package: org.apache.ace.client.repository.helper.user
+Bundle-Version: 1.0.0
Added: ace/trunk/org.apache.ace.client.repository/impl.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/impl.bnd?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/impl.bnd (added)
+++ ace/trunk/org.apache.ace.client.repository/impl.bnd Tue Apr 2 14:53:33 2013
@@ -0,0 +1,61 @@
+Private-Package: org.apache.ace.client.repository.impl,\
+ javax.xml.namespace,\
+ org.xmlpull.mxp1,\
+ org.xmlpull.mxp1_serializer,\
+ org.xmlpull.v1,\
+ org.xmlpull.v1.builder,\
+ org.xmlpull.v1.builder.adapter,\
+ org.xmlpull.v1.builder.impl,\
+ org.xmlpull.v1.dom2_builder,\
+ org.xmlpull.v1.parser_pool,\
+ org.xmlpull.v1.sax2,\
+ org.xmlpull.v1.util,\
+ org.xmlpull.v1.wrapper,\
+ org.xmlpull.v1.wrapper.classic,\
+ org.apache.ace.client.repository.stateful.impl,\
+ org.apache.ace.repository.ext,\
+ org.apache.ace.repository.ext.impl,\
+ com.thoughtworks.xstream,\
+ com.thoughtworks.xstream.alias,\
+ com.thoughtworks.xstream.annotations,\
+ com.thoughtworks.xstream.converters,\
+ com.thoughtworks.xstream.converters.basic,\
+ com.thoughtworks.xstream.converters.collections,\
+ com.thoughtworks.xstream.converters.enums,\
+ com.thoughtworks.xstream.converters.extended,\
+ com.thoughtworks.xstream.converters.javabean,\
+ com.thoughtworks.xstream.converters.reflection,\
+ com.thoughtworks.xstream.core,\
+ com.thoughtworks.xstream.core.util,\
+ com.thoughtworks.xstream.io,\
+ com.thoughtworks.xstream.io.binary,\
+ com.thoughtworks.xstream.io.copy,\
+ com.thoughtworks.xstream.io.json,\
+ com.thoughtworks.xstream.io.path,\
+ com.thoughtworks.xstream.io.xml,\
+ com.thoughtworks.xstream.io.xml.xppdom,\
+ com.thoughtworks.xstream.mapper,\
+ com.thoughtworks.xstream.persistence
+Import-Package: !javax.security.auth,\
+ !javax.swing.plaf,\
+ !javax.xml.parsers,\
+ !javax.xml.stream,\
+ !javax.xml.transform.sax,\
+ !net.sf.cglib.proxy,\
+ !nu.xom,\
+ !org.codehaus.jettison.mapped,\
+ !org.dom4j,\
+ !org.dom4j.io,\
+ !org.dom4j.tree,\
+ !org.jdom,\
+ !org.jdom.input,\
+ !org.joda.time,\
+ !org.joda.time.format,\
+ !org.w3c.dom,\
+ !org.xml.sax,\
+ !org.xml.sax.helpers,\
+ !sun.misc,\
+ !sun.reflect,\
+ *
+Bundle-Activator: org.apache.ace.client.repository.impl.Activator
+Bundle-Version: 1.0.0
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Associatable.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Associatable.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Associatable.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Associatable.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.util.List;
+
+/**
+ * The Associatable interface is to be implemented by any object that wants to be
+ * used in an Association.
+ */
+public interface Associatable
+{
+ /**
+ * Adds the association to this object, which has the given class. The 'other side' of
+ * the association will now show up when filtering for <code>clazz</code>, which is the
+ * class of the other end of the association.
+ */
+ @SuppressWarnings("unchecked")
+ public <T extends Associatable> void add(Association association, Class<T> clazz);
+ /**
+ * Removes the association from this object, with the given class. The 'other side' of
+ * the association will no longer show up when filtering for <code>clazz</code>.
+ */
+ @SuppressWarnings("unchecked")
+ public <T extends Associatable> void remove(Association association, Class<T> clazz);
+ /**
+ * Gets all Associatable objects of the <code>clazz</code> with which this object
+ * is associated. If <code>clazz</code> is not in use, this function will return
+ * an empty list.
+ */
+ public <T extends Associatable> List<T> getAssociations(Class<T> clazz);
+ /**
+ * Checks whether this object is related with <code>obj</code>, which is to be of class
+ * <code>clazz</code>. Will also return <code>false</code> when the class does not match.
+ */
+ public <T extends Associatable> boolean isAssociated(Object obj, Class<T> clazz);
+ /**
+ * Returns the associations that exist between this object and the other, of the
+ * given <code>clazz</code>, in a typed list of associations <code>associationType</code>.
+ * Will return an empty list if no associations exist.
+ */
+ @SuppressWarnings("unchecked")
+ public <T extends Associatable, A extends Association> List<A> getAssociationsWith(Associatable other, Class<T> clazz, Class<A> associationType);
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Association.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Association.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Association.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/Association.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.util.List;
+
+/**
+ * Represents a basic association between two Associatable objects, whose types
+ * are given by the generic parameters.
+ */
+public interface Association<L extends Associatable, R extends Associatable> extends RepositoryObject {
+ /**
+ * A filter string indicating the left endpoint.
+ */
+ public final static String LEFT_ENDPOINT = "leftEndpoint";
+ /**
+ * A filter string indicating the right endpoint.
+ */
+ public final static String RIGHT_ENDPOINT = "rightEndpoint";
+ /**
+ * A string indicating the cardinality for the left endpoint.
+ */
+ public final static String LEFT_CARDINALITY = "leftCardinality";
+ /**
+ * A string indicating the cardinality for the right endpoint.
+ */
+ public final static String RIGHT_CARDINALITY = "rightCardinality";
+
+ /**
+ * Used for <code>Event</code> properties: A <code>List<Associatable></code> indicating the
+ * objects making up this endpoint before the event happened.
+ */
+ public final static String EVENT_OLD = "old";
+ /**
+ * Used for <code>Event</code> properties: A <code>List<Associatable></code> indicating the
+ * objects making up this endpoint before the event happened.
+ */
+ public final static String EVENT_NEW = "new";
+
+ /**
+ * Gets the Associatable object on the 'other side' of <code>from</code>. If
+ * <code>from</code> does not point to either end of this association, this
+ * function will return <code>null</code>.
+ */
+ public List<Associatable> getTo(Associatable from);
+ /**
+ * Returns the 'left' side of this association.
+ */
+ public List<L> getLeft();
+ /**
+ * Returns the 'left' side of this association.
+ */
+ public List<R> getRight();
+ /**
+ * Removes this association from both endpoints.
+ */
+ public void remove();
+ /**
+ * Indicates whether both sides of this association are available. In an m-to-n assocation,
+ * this function will indicate whether at least one object is available on either side.
+ */
+ public boolean isSatisfied();
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/AssociationRepository.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/AssociationRepository.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/AssociationRepository.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/AssociationRepository.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents a basic repository of associations. The associations are to be of type
+ * <code>T</code>, associating types <code>L</code> and <code>R</code>.
+ */
+public interface AssociationRepository<L extends Associatable, R extends Associatable, T extends Association<L, R>> extends ObjectRepository<T>{
+ /**
+ * Creates a static association between two filters for objects, stores it,
+ * and returns the association object. This association will link all objects
+ * that apply to the filters in an m-to-n fashion.
+ */
+ public T create(String left, String right);
+ /**
+ * Creates a static association between two objects, stores it,
+ * and returns the association object.
+ */
+ public T create(L left, R right);
+ /**
+ * Creates an association between the given objects, with the <code>Props</code> containing
+ * additional directives for the endpoints, stores it, and returns the association.
+ */
+ public T create(L left, Map<String, String> leftProps, R right, Map<String, String> rightProps);
+ /**
+ * Creates a static association between two lists of objects, stores it,
+ * and returns the association object.
+ */
+ public T create(List<L> left, List<R> right);
+ /**
+ * Removes the given association, and deletes the association from the left- and right
+ * side of the association.
+ */
+ public void remove(T entity);
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/ObjectRepository.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/ObjectRepository.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/ObjectRepository.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/ObjectRepository.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.util.List;
+import java.util.Map;
+import org.osgi.framework.Filter;
+
+/**
+ * A basic object repository, storing implementers of RepositoryObject.
+ */
+public interface ObjectRepository<T extends RepositoryObject> {
+ /**
+ * Removes the given entity from this repository. Will silently fail
+ * when the entity does not exist in this repository.
+ */
+ public void remove(T entity);
+ /**
+ * Gets a list of all entities in this repository.
+ */
+ public List<T> get();
+ /**
+ * Returns a list of all entities in this repository that satisfy
+ * the conditions set in <code>filter</code>. If none match, an
+ * empty list will be returned.
+ */
+ public List<T> get(Filter filter);
+ /**
+ * Returns the entity in this repository that has the given definition.
+ * If none match, null will return.
+ *
+ * @param definition the definition of the entity to be returned
+ * @return The entity in this repository that has the given definition or <code>null</code> if none.
+ */
+ public T get(String definition);
+
+ /**
+ * Creates a new inhabitant based on the given attributes. The object
+ * will be stored in this repository's store, and will be returned.
+ * @throws IllegalArgumentException Will be thrown when the attributes cannot be accepted.
+ */
+ public T create(Map<String, String> attributes, Map<String, String> tags) throws IllegalArgumentException;
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdmin.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdmin.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdmin.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdmin.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.io.IOException;
+import org.apache.ace.client.repository.RepositoryObject.WorkingState;
+import org.osgi.service.useradmin.User;
+
+public interface RepositoryAdmin
+{
+
+ public static final String PUBLIC_TOPIC_ROOT = RepositoryAdmin.class.getPackage().getName().replace('.', '/') + "/public/";
+ public static final String PRIVATE_TOPIC_ROOT = RepositoryAdmin.class.getPackage().getName().replace('.', '/') + "/private/";
+
+ public static final String TOPIC_ENTITY_ROOT = RepositoryAdmin.class.getSimpleName() + "/";
+
+ public static final String TOPIC_REFRESH_SUFFIX = "REFRESH";
+ public static final String TOPIC_LOGIN_SUFFIX = "LOGIN";
+ public static final String TOPIC_LOGOUT_SUFFIX = "LOGOUT";
+ public static final String TOPIC_STATUSCHANGED_SUFFIX = "STATUSCHANGED";
+ public static final String TOPIC_FLUSHED_SUFFIX = "FLUSHED";
+ public static final String TOPIC_ALL_SUFFIX = "*";
+
+ /**
+ * Indicates a serious change to the structure of the repository, which is too complicated to use
+ * the Object's own Changed topic.
+ */
+ public static final String TOPIC_REFRESH = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_REFRESH_SUFFIX;
+ /**
+ * Indicates a successful login; the model will now be filled, as signaled by the earlier TOPIC_REFRESH.
+ */
+ public static final String TOPIC_LOGIN = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_LOGIN_SUFFIX;
+ /**
+ * Indicates a successful logout; the model will now be empty, as signaled by the earlier TOPIC_REFRESH.
+ */
+ public static final String TOPIC_LOGOUT = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_LOGOUT_SUFFIX;
+ /**
+ * Signals that isCurrent or isModified have (potentially) changed.
+ */
+ public static final String TOPIC_STATUSCHANGED = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_STATUSCHANGED_SUFFIX;
+ /**
+ * Signals that a flush() has been done.
+ */
+ public static final String TOPIC_FLUSHED = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_FLUSHED_SUFFIX;
+
+ public static final String TOPIC_ALL = PUBLIC_TOPIC_ROOT + TOPIC_ENTITY_ROOT + TOPIC_ALL_SUFFIX;
+
+ /**
+ * Checks out the most recent version of the repositories from <code>login</code>.
+ * @throws java.io.IOException Thrown when we are not logged in, or when there is a problem
+ * communicating with either the local repository or the remote one.
+ */
+ public void checkout() throws IOException;
+
+ /**
+ * Commits the most what we have in memory to the repositories from <code>login</code>.
+ * @throws java.io.IOException Thrown when we are not logged in, or when there is a problem
+ * communicating with either the local repository or the remote one.
+ */
+ public void commit() throws IOException;
+
+ /**
+ * Reverts what we have in memory to the most recent one that was checked our or
+ * committed.
+ * @throws java.io.IOException Thrown when we are not logged in, or when there is a problem
+ * communicating with either the local repository or the remote one.
+ */
+ public void revert() throws IOException;
+
+ /**
+ * Indicates that the version on which the changes are made is the most recent on the server.
+ * This indication only applies to repositories for which write access has been received.
+ * @throws java.io.IOException Thrown when there is a problem communicating with the backup repository,
+ * which keeps track of the local copies of the repository.
+ */
+ public boolean isCurrent() throws IOException;
+
+ /**
+ * Indicates whether the data we have (in memory and persisted) has changed in respect to
+ * what is on the server.
+ * @throws java.io.IOException Thrown when there is a problem communicating with the backup repository,
+ * which keeps track of the local copies of the repository.
+ */
+ public boolean isModified() throws IOException;
+
+ /**
+ * Writes what we have in memory to a backup repository, so it can be persisted between runs
+ * of the client, without committing it to the remote repository.
+ * @throws java.io.IOException Thrown when there is a problem communicating with the backup repository,
+ * which keeps track of the local copies of the repository.
+ */
+ public void flush() throws IOException;
+
+ /**
+ * Writes what we have in memory to a backup repository, and prepares the repository for use by
+ * a new user.
+ * @param force Indicates that, even when an exception is thrown, we still want to log the
+ * user out.
+ * @throws java.io.IOException Thrown when there is a problem communicating with the backup repository,
+ * which keeps track of the local copies of the repository. If this exception is thrown,
+ * the user is still logged in, unless <code>force = true</code>.
+ * @throws IllegalStateException Thrown if no user is logged in.
+ */
+ public void logout(boolean force) throws IOException, IllegalStateException;
+
+ /**
+ * Creates a new login context.
+ * @param user The user to use for this context.
+ * @return A new RepositoryAdminLoginContext,
+ */
+ public RepositoryAdminLoginContext createLoginContext(User user);
+
+ /**
+ * Logs in using the given RepositoryAdminLoginContext; use createLoginContext for an initial
+ * RepositoryAdminLoginContext.
+ * @param context The context to use for this login.
+ * @throws java.io.IOException Thrown when there is a problem communicating with the backup repository,
+ * which keeps track of the local copies of the repository.
+ * @throws IllegalArgumentException If <code>context</code> was not one that was
+ * created by <code>createLoginContext</code<.
+ * @throws IllegalStateException If there already is a user logged in.
+ */
+ public void login(RepositoryAdminLoginContext context) throws IOException;
+
+ /**
+ * Return the working state of the given object. If the object is not part of any
+ * repository managed by this admin, <code>New</code> will be returned.
+ * @param object A repository object.
+ * @return The current working state of this object.
+ */
+ public WorkingState getWorkingState(RepositoryObject object);
+
+ /**
+ * Gets the number of objects of a given class with a given state. Note that
+ * this class applies to all objects of that class, and all its descendents.
+ * @param clazz The class of objects to be counted.
+ * @param state A working state.
+ * @return The number of objects which are (or descend from) the given class,
+ * and have the given working state.
+ */
+ public int getNumberWithWorkingState(Class<? extends RepositoryObject> clazz, WorkingState state);
+
+ /**
+ * Cleans up the local files that make up the client-side cache. This method
+ * can be invoked after logging out of a session to clean up. This operation
+ * is optional, since you might want to be able to log back in in which case
+ * you probably don't want to delete the cache.
+ */
+ public void deleteLocal();
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdminLoginContext.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdminLoginContext.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdminLoginContext.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryAdminLoginContext.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.net.URL;
+
+/**
+ * RepositoryAdminLoginContext represents a context for logins to the repository admin. It is used to specify
+ * which repositories are to be used in a given session with the RepositoryAdmin.
+ */
+public interface RepositoryAdminLoginContext
+{
+ /**
+ * Provides a common interface for all repository contexts.
+ *
+ * @param <T> the actual context type to return in this builder.
+ */
+ public interface BaseRepositoryContext<T extends BaseRepositoryContext<?>> {
+
+ /**
+ * @param location the location of the repository where this set's data resides.
+ * @return this context.
+ */
+ T setLocation(URL location);
+
+ /**
+ * @param customer the customer name for the location of the repository where this set's data resides.
+ * @return this context.
+ */
+ T setCustomer(String customer);
+
+ /**
+ * @param name the repository name for the location of the repository where this set's data resides.
+ * @return this context.
+ */
+ T setName(String name);
+
+ /**
+ * Marks this repository as writable (default is read-only).
+ *
+ * @return this context.
+ */
+ T setWriteable();
+ }
+
+ /**
+ * Denotes a context for creating shop repositories.
+ */
+ public static interface ShopRepositoryContext extends BaseRepositoryContext<ShopRepositoryContext> {
+ }
+
+ /**
+ * Denotes a context for creating target repositories.
+ */
+ public static interface TargetRepositoryContext extends BaseRepositoryContext<TargetRepositoryContext> {
+ }
+
+ /**
+ * Denotes a context for creating deployment repositories.
+ */
+ public static interface DeploymentRepositoryContext extends BaseRepositoryContext<DeploymentRepositoryContext> {
+ }
+
+ /**
+ * @return a new shop repository context, never <code>null</code>.
+ */
+ public ShopRepositoryContext createShopRepositoryContext();
+
+ /**
+ * @return a new target repository context, never <code>null</code>.
+ */
+ public TargetRepositoryContext createTargetRepositoryContext();
+
+ /**
+ * @return a new deployment repository context, never <code>null</code>.
+ */
+ public DeploymentRepositoryContext createDeploymentRepositoryContext();
+
+ /**
+ * @param repositoryContext the context to add, cannot be <code>null</code>.
+ * @return this context, never <code>null</code>.
+ */
+ public RepositoryAdminLoginContext add(BaseRepositoryContext<?> repositoryContext);
+
+ /**
+ * When uploads are needed, this is the base OBR that will be used.
+ *
+ * @param base The URL of the OBR to be used.
+ * @return this object, to allow chaining.
+ */
+ public RepositoryAdminLoginContext setObrBase(URL base);
+}
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryObject.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryObject.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryObject.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryObject.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+import java.util.Comparator;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Map;
+
+/**
+ * A basic repository object, intended to be stored in a ObjectRepository of its given type.
+ * A RepositoryObject is associatable.
+ */
+public interface RepositoryObject extends Associatable {
+ /**
+ * This key is used to store the RepositoryObject an event comes from, in the Event object.
+ */
+ public final static String EVENT_ENTITY = "entity";
+
+ public static final String PUBLIC_TOPIC_ROOT = RepositoryObject.class.getPackage().getName().replace('.', '/') + "/public/";
+ public static final String PRIVATE_TOPIC_ROOT = RepositoryObject.class.getPackage().getName().replace('.', '/') + "/private/";
+
+ public static final String TOPIC_ADDED_SUFFIX = "ADDED";
+ public static final String TOPIC_REMOVED_SUFFIX = "REMOVED";
+ public static final String TOPIC_CHANGED_SUFFIX = "CHANGED";
+ public static final String TOPIC_ALL_SUFFIX = "*";
+
+ /**
+ * Adds a named attribute to this object's attributes. If the name already exists,
+ * it will be overwritten, and the old value is returned; will return <code>null</code>
+ * when the value is new.
+ */
+ public String addAttribute(String key, String value);
+ /**
+ * Gets a named attribute. Returns <code>null<code> when the attribute named by
+ * <code>key</code> does not exist.
+ */
+ public String getAttribute(String key);
+ /**
+ * Returns an enumeration of all attribute keys.
+ */
+ public Enumeration<String> getAttributeKeys();
+ /**
+ * Adds a named tag to this object's attributes. If the name already exists,
+ * it will be overwritten, and the old value is returned; will return <code>null</code>
+ * when the value is new.
+ */
+ public String addTag(String key, String value);
+ /**
+ * Gets a named tag. Returns <code>null<code> when the attribute named by
+ * <code>key</code> does not exist.
+ */
+ public String getTag(String key);
+ /**
+ * Returns an enumeration of all tags in this object, coming from both the
+ * tags and the attributes.
+ */
+ public Enumeration<String> getTagKeys();
+ /**
+ * Returns a <code>Dictionary</code> representing this object. It will contain all keys,
+ * from <code>getTagKeys</code>, and all values that correspond to them. If a key is present
+ * in both the attributes and the tags, the corresponding value will be an array of two
+ * <code>String</code> objects; otherwise a single <code>String</code> is returned.
+ */
+ public Dictionary<String, Object> getDictionary();
+ /**
+ * Indicates that this object should no longer be used.
+ */
+ public boolean isDeleted();
+ /**
+ * Creates a filter string for use in associations, optionally with some
+ * additional properties. The basic implementation will use all <code>getDefiningKeys</code>.
+ * @param properties Properties indicating specifics of the filter to be created.
+ * @return A string representation of a filter, for use in <code>Association</code>s.
+ */
+ public String getAssociationFilter(Map<String, String> properties);
+
+ /**
+ * Determines the cardinality of this endpoint of an association, given
+ * the passed properties.
+ * @param properties Properties indicating specifics of this endpoint.
+ * @return The necessary cardinality.
+ */
+ public int getCardinality(Map<String, String> properties);
+
+ /**
+ * Returns a <code>Comparator</code> for this type of object. Descendent
+ * classes are expected to return a comparator if they can be meaningfully compared,
+ * and otherwise (if no order is natural), return <code>null</code>.
+ * @return A <code>Comparator</code> for this type of object
+ */
+ @SuppressWarnings("unchecked")
+ public Comparator getComparator();
+
+ /**
+ * Returns a string which uniquely defines this object. The content is
+ * not intended to 'mean' anything.
+ * @return A uniquely defining string.
+ */
+ public String getDefinition();
+
+ public enum WorkingState {
+ New, Changed, Unchanged, Removed;
+ }
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryUtil.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryUtil.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryUtil.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/RepositoryUtil.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+public class RepositoryUtil
+{
+ /**
+ * Before passing user input into an LDAP filter, some precautions need to be taken
+ * (see section 3.2.6 of the OSGi core specification). This function escapes
+ * illegal characters, and returns the resulting string.
+ */
+ public static String escapeFilterValue(String value) {
+ return value.replaceAll("\\\\", "\\\\\\\\")
+ .replaceAll("\\(", "\\\\(")
+ .replaceAll("\\)", "\\\\)")
+ .replaceAll("\\*", "\\\\*");
+ }
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/SessionFactory.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/SessionFactory.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/SessionFactory.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/SessionFactory.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository;
+
+/**
+ * Factory service for creating and destroying sessions. Sessions are identified by some kind
+ * of identification. This identification is also used as a service property in case there is
+ * one service for each session. The property name for this is <code>service.sid</code>, the
+ * service session ID. It is also used to listen to session specific events, in which case this
+ * same property is part of the actual event so it can be used in event filters.
+ */
+public interface SessionFactory
+{
+ /** Session ID for session specific service or event. */
+ public static final String SERVICE_SID = "service.sid";
+ /**
+ * Create a new session based on the supplied session ID.
+ *
+ * @param sessionID the session ID
+ */
+ public void createSession(String sessionID);
+ /**
+ * Destroy an existing session supplied on the supplied session ID.
+ *
+ * @param sessionID the session ID
+ */
+ public void destroySession(String sessionID);
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactHelper.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactHelper.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactHelper.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactHelper.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository.helper;
+
+import java.util.Comparator;
+import java.util.Map;
+import org.apache.ace.client.repository.object.ArtifactObject;
+
+/**
+ * Interface to an artifact helper. For each type of artifact, there should be a helper
+ * service implementing this interface. The service should be registered with the mimetype
+ * in the service's properties, so it can be identified. The <code>KEY_MIMETYPE</code> in
+ * this class can be used for this purpose.
+ */
+public interface ArtifactHelper
+{
+ public static final String KEY_MIMETYPE = "mimetype";
+
+ /**
+ * Checks whether this helper can 'do anything' with this artifact object.
+ * @param object An artifact object.
+ * @return <code>true</code> when this helper can use the object, <code>false</code> otherwise.
+ */
+ public boolean canUse(ArtifactObject object);
+
+ /**
+ * Returns the artifact preprocessor that is associated with the type of artifact this
+ * helper helps. Return null when no useful processor is available.
+ * @return An artifact preprocessor, or <code>null</code> if no useful preprocessor can be created.
+ */
+ public ArtifactPreprocessor getPreprocessor();
+
+ /**
+ * Creates a filter string for use in associations, optionally with some
+ * additional properties. The basic implementation will use all <code>getDefiningKeys</code>.
+ * @param properties Properties indicating specifics of the filter to be created.
+ * @return A string representation of a filter, for use in <code>Association</code>s.
+ */
+ public <TYPE extends ArtifactObject> String getAssociationFilter(TYPE obj, Map<String, String> properties);
+
+ /**
+ * Determines the cardinality of this endpoint of an association, given
+ * the passed properties.
+ * @param properties Properties indicating specifics of this endpoint.
+ * @return The necessary cardinality.
+ */
+ public <TYPE extends ArtifactObject> int getCardinality(TYPE obj, Map<String, String> properties);
+
+ /**
+ * Returns a <code>Comparator</code> for this type of object. Descendent
+ * classes are expected to return a comparator if they can be meaningfully compared,
+ * and otherwise (if no order is natural), return <code>null</code>.
+ * @return A <code>Comparator</code> for this type of object
+ */
+ public Comparator<ArtifactObject> getComparator();
+
+ /**
+ * Checks the correctness of the given attributes for this type of object. If they
+ * are correct, the map will be returned, potentially with some changes, and if not,
+ * an {@link IllegalArgumentException} will be raised. Optionally, this
+ * function can do some validation of input parameters, such as normalizing numbers.
+ */
+ public Map<String, String> checkAttributes(Map<String, String> attributes);
+
+ /**
+ * Gets an array of keys in the attributes that are considered defining for this type
+ * of object; the combination of values of these keys should result in a unique
+ * identification of the object.
+ */
+ public String[] getDefiningKeys();
+
+ /**
+ * Gets an array of all attributes that have to be present when creating an object
+ * of this type.
+ */
+ public String[] getMandatoryAttributes();
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactPreprocessor.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactPreprocessor.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactPreprocessor.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactPreprocessor.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository.helper;
+
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * An ArtifactPreprocessor processes an artifact before it is deployed.
+ */
+public interface ArtifactPreprocessor {
+ /**
+ * Preprocesses a single artifact, uploads it to the obr, and returns the new URL as a string.
+ *
+ * @param url A string representing a URL to the original artifact.
+ * @param props A PropertyResolver which can be used to fill in 'holes' in the template.
+ * @param targetID The targetID of the target for which this artifact is being processed.
+ * @param version The deployment version for which this artifact is being processed.
+ * @param obrBase A base OBR to upload the new artifact to.
+ * @return A URL to the new object (or the old one, if no replacing was necessary), as a string.
+ * @throws java.io.IOException Thrown if reading the original artifact goes wrong, or storing the processed one.
+ */
+ public String preprocess(String url, PropertyResolver props, String targetID, String version, URL obrBase) throws IOException;
+
+ /**
+ * Indicates whether the template should be processed again, given the properties, and the version to which it
+ * should be compared.
+ *
+ * @param url A string representing a URL to the original artifact.
+ * @param props A PropertyResolver which can be used to fill in 'holes' in the template.
+ * @param targetID The targetID of the target for which this artifact is being processed.
+ * @param version The deployment version for which this artifact is being processed.
+ * @param fromVersion The deployment version to which the current one should be compared.
+ * @return <code>false</code> if the version of the processed artifact identified by <code>fromVersion</code>
+ * is identical to what would be created using the new <code>props</code>; <code>true</code> otherwise.
+ * @throws java.io.IOException
+ */
+ public boolean needsNewVersion(String url, PropertyResolver props, String targetID, String fromVersion);
+}
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactRecognizer.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactRecognizer.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactRecognizer.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactRecognizer.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository.helper;
+
+import java.util.Map;
+
+/**
+ * Service interface for services that can recognize the type of an artifact, given a URL
+ * to that artifact.
+ */
+public interface ArtifactRecognizer
+{
+ /**
+ * Tries to determine the type of the artifact. If this recognizer cannot determine the type, it
+ * should return <code>null</code>.
+ *
+ * @param artifact the artifact to recognize, cannot be <code>null</code>.
+ * @return The mimetype of the artifact, or <code>null</code> if the artifact is not recognized.
+ */
+ public String recognize(ArtifactResource artifact);
+
+ /**
+ * Gets the relevant metadata for this artifact.
+ *
+ * @param artifact the artifact to extract the metadata for, cannot be <code>null</code>.
+ * @return A map of strings, representing the relevant metadata specific for this artifact. The
+ * keys are best defined in the corresponding <code>ArtifactHelper</code> interface for this type of artifact.
+ * This function should also set the <code>ArtifactObject.KEY_PROCESSOR_PID</code> attribute.<br>
+ * Optionally, <code>ArtifactObject.KEY_ARTIFACT_NAME</code> and <code>ArtifactObject.KEY_ARTIFACT_DESCRIPTION</code>
+ * can be set.
+ * @throws IllegalArgumentException when the metadata cannot be retrieved from the <code>artifact</code>.
+ */
+ public Map<String, String> extractMetaData(ArtifactResource artifact) throws IllegalArgumentException;
+
+ /**
+ * Indicates whether this recognizer can handle (i.e., extract metadata) from an artifact of
+ * a given mime type.
+ *
+ * @param mimetype The mimetype of an artifact.
+ * @return <code>true</code> when this type should be able to be handled by this recognizer;
+ * <code>false</code> otherwise.
+ */
+ public boolean canHandle(String mimetype);
+
+ /**
+ * Returns a preferred extension for the file name if a new one is created.
+ *
+ * @param artifact the artifact to get the extension for, cannot be <code>null</code>.
+ *
+ * @return The extension that is preferred or an empty string if there is none.
+ */
+ public String getExtension(ArtifactResource artifact);
+}
\ No newline at end of file
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactResource.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactResource.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactResource.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/ArtifactResource.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ace.client.repository.helper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Denotes a 'physical' artifact that is located by an URL, and provide means to access the contents of this artifact.
+ * <p>
+ * Note that an artifact can be located on a remote machine, which might need credentials to access its contents.
+ * This interface allows one to access the resource without having to worry about supplying those credentials, as the
+ * implementor of this class has to worry about this instead.
+ * </p>
+ */
+public interface ArtifactResource {
+
+ /**
+ * Returns the location of this artifact.
+ * <p>
+ * Note that although {@link URL#openConnection()} allows you to directly open a connection to the resource,
+ * in fact this may fail due to, for example, missing authentication credentials. Use {@link #openStream()}
+ * instead to access the contents of the resource.
+ * </p>
+ *
+ * @return the URL to the 'physical' location of the artifact, never <code>null</code>.
+ */
+ URL getURL();
+
+ /**
+ * Provides access to the contents of the artifact.
+ *
+ * @return an input stream, never <code>null</code>.
+ * @throws IOException in case of I/O errors opening the artifact.
+ * @see #getURL()
+ */
+ InputStream openStream() throws IOException;
+}
Added: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/PropertyResolver.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/PropertyResolver.java?rev=1463576&view=auto
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/PropertyResolver.java (added)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/helper/PropertyResolver.java Tue Apr 2 14:53:33 2013
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.client.repository.helper;
+
+/**
+ * Interface for resolving properties about the template's
+ * environment which are to be used by an ArtifactPreprocessor.
+ */
+public interface PropertyResolver
+{
+ /**
+ * Gets a property, based on the given key. If the key cannot be found, <code>null</code>
+ * can be used.
+ * @param key A key to some property. Cannot be null.
+ * @return The property identified by <code>key</code> if it can be found, <code>null</code> otherwise.
+ */
+ public String get(String key);
+}
\ No newline at end of file