ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1301412 [2/3] - in /ace/trunk: ace-client-repository-api/src/main/java/org/apache/ace/client/repository/ ace-client-repository-api/src/main/java/org/apache/ace/client/repository/helper/ ace-client-repository-api/src/main/java/org/apache/ac...
Date Fri, 16 Mar 2012 10:05:16 GMT
Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationImpl.java Fri Mar 16 10:05:14 2012
@@ -21,8 +21,8 @@ package org.apache.ace.client.repository
 import java.util.Map;
 
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.License2GatewayAssociation;
-import org.apache.ace.client.repository.object.LicenseObject;
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
 import org.osgi.framework.InvalidSyntaxException;
 
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
@@ -31,16 +31,16 @@ import com.thoughtworks.xstream.io.Hiera
  * Implementation class for the License2GatewayAssociation. For 'what it does', see License2GatewayAssociation,
  * for 'how it works', see AssociationImpl.
  */
-public class License2GatewayAssociationImpl extends AssociationImpl<LicenseObject, TargetObject, License2GatewayAssociation> implements License2GatewayAssociation {
+public class License2GatewayAssociationImpl extends AssociationImpl<DistributionObject, TargetObject, Distribution2TargetAssociation> implements Distribution2TargetAssociation {
     private final static String XML_NODE = "license2gateway";
 
     public License2GatewayAssociationImpl(Map<String, String> attributes, ChangeNotifier notifier, LicenseRepositoryImpl licenseRepository, GatewayRepositoryImpl gatewayRepository) throws InvalidSyntaxException {
-        super(attributes, notifier, LicenseObject.class, TargetObject.class, licenseRepository, gatewayRepository, XML_NODE);
+        super(attributes, notifier, DistributionObject.class, TargetObject.class, licenseRepository, gatewayRepository, XML_NODE);
     }
     public License2GatewayAssociationImpl(Map<String, String> attributes, Map<String, String> tags, ChangeNotifier notifier, LicenseRepositoryImpl licenseRepository, GatewayRepositoryImpl gatewayRepository) throws InvalidSyntaxException {
-        super(attributes, tags, notifier, LicenseObject.class, TargetObject.class, licenseRepository, gatewayRepository, XML_NODE);
+        super(attributes, tags, notifier, DistributionObject.class, TargetObject.class, licenseRepository, gatewayRepository, XML_NODE);
     }
     public License2GatewayAssociationImpl(HierarchicalStreamReader reader, ChangeNotifier notifier, LicenseRepositoryImpl licenseRepository, GatewayRepositoryImpl gatewayRepository) throws InvalidSyntaxException {
-        super(reader, notifier, LicenseObject.class, TargetObject.class, null, null, licenseRepository, gatewayRepository, XML_NODE);
+        super(reader, notifier, DistributionObject.class, TargetObject.class, null, null, licenseRepository, gatewayRepository, XML_NODE);
     }
 }

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationRepositoryImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationRepositoryImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/License2GatewayAssociationRepositoryImpl.java Fri Mar 16 10:05:14 2012
@@ -21,9 +21,9 @@ package org.apache.ace.client.repository
 import java.util.Map;
 
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.License2GatewayAssociation;
-import org.apache.ace.client.repository.object.LicenseObject;
-import org.apache.ace.client.repository.repository.License2GatewayAssociationRepository;
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
+import org.apache.ace.client.repository.repository.Distribution2TargetAssociationRepository;
 import org.osgi.framework.InvalidSyntaxException;
 
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
@@ -32,7 +32,7 @@ import com.thoughtworks.xstream.io.Hiera
  * for 'how it works', see AssociationRepositoryImpl.
  */
 
-public class License2GatewayAssociationRepositoryImpl extends AssociationRepositoryImpl<LicenseObject, TargetObject, License2GatewayAssociationImpl, License2GatewayAssociation> implements License2GatewayAssociationRepository {
+public class License2GatewayAssociationRepositoryImpl extends AssociationRepositoryImpl<DistributionObject, TargetObject, License2GatewayAssociationImpl, Distribution2TargetAssociation> implements Distribution2TargetAssociationRepository {
     private final static String XML_NODE = "licenses2gateways";
 
     private final LicenseRepositoryImpl m_licenseRepository;
@@ -74,7 +74,7 @@ public class License2GatewayAssociationR
         }
     }
 
-    public License2GatewayAssociation createLicense2GatewayFilter(LicenseObject license, String gatewayFilter) {
+    public Distribution2TargetAssociation createDistribution2TargetFilter(DistributionObject license, String gatewayFilter) {
         try {
             m_gatewayRepository.createFilter(gatewayFilter);
         }

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseObjectImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseObjectImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseObjectImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseObjectImpl.java Fri Mar 16 10:05:14 2012
@@ -22,10 +22,10 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.Group2LicenseAssociation;
-import org.apache.ace.client.repository.object.GroupObject;
-import org.apache.ace.client.repository.object.License2GatewayAssociation;
-import org.apache.ace.client.repository.object.LicenseObject;
+import org.apache.ace.client.repository.object.Feature2DistributionAssociation;
+import org.apache.ace.client.repository.object.FeatureObject;
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
 
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 
@@ -33,7 +33,7 @@ import com.thoughtworks.xstream.io.Hiera
  * Implementation class for the LicenseObject. For 'what it does', see LicenseObject,
  * for 'how it works', see RepositoryObjectImpl.
  */
-public class LicenseObjectImpl extends RepositoryObjectImpl<LicenseObject> implements LicenseObject {
+public class LicenseObjectImpl extends RepositoryObjectImpl<DistributionObject> implements DistributionObject {
     private final static String XML_NODE = "license";
 
     LicenseObjectImpl(Map<String, String> attributes, Map<String, String> tags, ChangeNotifier notifier) {
@@ -52,8 +52,8 @@ public class LicenseObjectImpl extends R
         return getAssociations(TargetObject.class);
     }
 
-    public List<GroupObject> getGroups() {
-        return getAssociations(GroupObject.class);
+    public List<FeatureObject> getGroups() {
+        return getAssociations(FeatureObject.class);
     }
 
     public String getDescription() {
@@ -72,12 +72,12 @@ public class LicenseObjectImpl extends R
         addAttribute(KEY_NAME, name);
     }
 
-    public List<Group2LicenseAssociation> getAssociationsWith(GroupObject group) {
-        return getAssociationsWith(group, GroupObject.class, Group2LicenseAssociation.class);
+    public List<Feature2DistributionAssociation> getAssociationsWith(FeatureObject group) {
+        return getAssociationsWith(group, FeatureObject.class, Feature2DistributionAssociation.class);
     }
 
-    public List<License2GatewayAssociation> getAssociationsWith(TargetObject gateway) {
-        return getAssociationsWith(gateway, TargetObject.class, License2GatewayAssociation.class);
+    public List<Distribution2TargetAssociation> getAssociationsWith(TargetObject gateway) {
+        return getAssociationsWith(gateway, TargetObject.class, Distribution2TargetAssociation.class);
     }
 
     private static String[] DEFINING_KEYS = new String[] {KEY_NAME};

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseRepositoryImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseRepositoryImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/LicenseRepositoryImpl.java Fri Mar 16 10:05:14 2012
@@ -20,8 +20,8 @@ package org.apache.ace.client.repository
 
 import java.util.Map;
 
-import org.apache.ace.client.repository.object.LicenseObject;
-import org.apache.ace.client.repository.repository.LicenseRepository;
+import org.apache.ace.client.repository.object.DistributionObject;
+import org.apache.ace.client.repository.repository.DistributionRepository;
 
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 
@@ -29,7 +29,7 @@ import com.thoughtworks.xstream.io.Hiera
  * Implementation class for the LicenseRepository. For 'what it does', see LicenseRepository,
  * for 'how it works', see ObjectRepositoryImpl.
  */
-public class LicenseRepositoryImpl extends ObjectRepositoryImpl<LicenseObjectImpl, LicenseObject> implements LicenseRepository {
+public class LicenseRepositoryImpl extends ObjectRepositoryImpl<LicenseObjectImpl, DistributionObject> implements DistributionRepository {
     private final static String XML_NODE = "licenses";
 
     public LicenseRepositoryImpl(ChangeNotifier notifier) {

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepoPropertyResolver.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepoPropertyResolver.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepoPropertyResolver.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepoPropertyResolver.java Fri Mar 16 10:05:14 2012
@@ -6,8 +6,8 @@ import java.util.List;
 import org.apache.ace.client.repository.RepositoryObject;
 import org.apache.ace.client.repository.helper.PropertyResolver;
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.GroupObject;
-import org.apache.ace.client.repository.object.LicenseObject;
+import org.apache.ace.client.repository.object.FeatureObject;
+import org.apache.ace.client.repository.object.DistributionObject;
 
 /**
  * 
@@ -62,13 +62,13 @@ public class RepoPropertyResolver implem
     
     protected List<? extends RepositoryObject> getChildren(RepositoryObject ob) {
         if (ob instanceof TargetObject) {
-            return ((TargetObject) ob).getLicenses();
+            return ((TargetObject) ob).getDistributions();
         }
-        else if (ob instanceof LicenseObject) {
-            return ((LicenseObject) ob).getGroups();
+        else if (ob instanceof DistributionObject) {
+            return ((DistributionObject) ob).getGroups();
         }
-        else if (ob instanceof GroupObject) {
-            return ((GroupObject) ob).getArtifacts();
+        else if (ob instanceof FeatureObject) {
+            return ((FeatureObject) ob).getArtifacts();
         }
         return new ArrayList<RepositoryObject>();
     }

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java Fri Mar 16 10:05:14 2012
@@ -37,22 +37,22 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.RepositoryObject.WorkingState;
 import org.apache.ace.client.repository.helper.ArtifactHelper;
 import org.apache.ace.client.repository.impl.RepositoryAdminLoginContextImpl.RepositorySetDescriptor;
-import org.apache.ace.client.repository.object.Artifact2GroupAssociation;
+import org.apache.ace.client.repository.object.Artifact2FeatureAssociation;
 import org.apache.ace.client.repository.object.ArtifactObject;
 import org.apache.ace.client.repository.object.DeploymentVersionObject;
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.Group2LicenseAssociation;
-import org.apache.ace.client.repository.object.GroupObject;
-import org.apache.ace.client.repository.object.License2GatewayAssociation;
-import org.apache.ace.client.repository.object.LicenseObject;
-import org.apache.ace.client.repository.repository.Artifact2GroupAssociationRepository;
+import org.apache.ace.client.repository.object.Feature2DistributionAssociation;
+import org.apache.ace.client.repository.object.FeatureObject;
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
+import org.apache.ace.client.repository.repository.Artifact2FeatureAssociationRepository;
 import org.apache.ace.client.repository.repository.ArtifactRepository;
 import org.apache.ace.client.repository.repository.DeploymentVersionRepository;
 import org.apache.ace.client.repository.repository.TargetRepository;
-import org.apache.ace.client.repository.repository.Group2LicenseAssociationRepository;
-import org.apache.ace.client.repository.repository.GroupRepository;
-import org.apache.ace.client.repository.repository.License2GatewayAssociationRepository;
-import org.apache.ace.client.repository.repository.LicenseRepository;
+import org.apache.ace.client.repository.repository.Feature2DistributionAssociationRepository;
+import org.apache.ace.client.repository.repository.FeatureRepository;
+import org.apache.ace.client.repository.repository.Distribution2TargetAssociationRepository;
+import org.apache.ace.client.repository.repository.DistributionRepository;
 import org.apache.ace.repository.Repository;
 import org.apache.ace.repository.ext.BackupRepository;
 import org.apache.ace.repository.ext.CachedRepository;
@@ -161,12 +161,12 @@ public class RepositoryAdminImpl impleme
         // create the repository objects, if this is the first time this method is called.
         if (m_artifactRepositoryImpl == null) {
             m_artifactRepositoryImpl = new ArtifactRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, ArtifactObject.TOPIC_ENTITY_ROOT, m_sessionID));
-            m_groupRepositoryImpl = new GroupRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, GroupObject.TOPIC_ENTITY_ROOT, m_sessionID));
-            m_artifact2GroupAssociationRepositoryImpl = new Artifact2GroupAssociationRepositoryImpl(m_artifactRepositoryImpl, m_groupRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, Artifact2GroupAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
-            m_licenseRepositoryImpl = new LicenseRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, LicenseObject.TOPIC_ENTITY_ROOT, m_sessionID));
-            m_group2LicenseAssociationRepositoryImpl = new Group2LicenseAssociationRepositoryImpl(m_groupRepositoryImpl, m_licenseRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, Group2LicenseAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
+            m_groupRepositoryImpl = new GroupRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, FeatureObject.TOPIC_ENTITY_ROOT, m_sessionID));
+            m_artifact2GroupAssociationRepositoryImpl = new Artifact2GroupAssociationRepositoryImpl(m_artifactRepositoryImpl, m_groupRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, Artifact2FeatureAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
+            m_licenseRepositoryImpl = new LicenseRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, DistributionObject.TOPIC_ENTITY_ROOT, m_sessionID));
+            m_group2LicenseAssociationRepositoryImpl = new Group2LicenseAssociationRepositoryImpl(m_groupRepositoryImpl, m_licenseRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, Feature2DistributionAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
             m_gatewayRepositoryImpl = new GatewayRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, TargetObject.TOPIC_ENTITY_ROOT, m_sessionID));
-            m_license2GatewayAssociationRepositoryImpl = new License2GatewayAssociationRepositoryImpl(m_licenseRepositoryImpl, m_gatewayRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, License2GatewayAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
+            m_license2GatewayAssociationRepositoryImpl = new License2GatewayAssociationRepositoryImpl(m_licenseRepositoryImpl, m_gatewayRepositoryImpl, m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, Distribution2TargetAssociation.TOPIC_ENTITY_ROOT, m_sessionID));
             m_deploymentVersionRepositoryImpl = new DeploymentVersionRepositoryImpl(m_changeNotifierManager.getConfiguredNotifier(RepositoryObject.PRIVATE_TOPIC_ROOT, RepositoryObject.PUBLIC_TOPIC_ROOT, DeploymentVersionObject.TOPIC_ENTITY_ROOT, m_sessionID));
         }
         // first, register the artifact repository manually; it needs some special care.
@@ -188,11 +188,11 @@ public class RepositoryAdminImpl impleme
         m_services.add(new Component[] {artifactRepoService, artifactHandlerService});
 
         // register all repositories are services. Keep the service objects around, we need them to pull the services later.
-        m_services.add(registerRepository(Artifact2GroupAssociationRepository.class, m_artifact2GroupAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(ArtifactObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(GroupObject.TOPIC_ENTITY_ROOT)}));
-        m_services.add(registerRepository(GroupRepository.class, m_groupRepositoryImpl, new String[] {}));
-        m_services.add(registerRepository(Group2LicenseAssociationRepository.class, m_group2LicenseAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(GroupObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(LicenseObject.TOPIC_ENTITY_ROOT)}));
-        m_services.add(registerRepository(LicenseRepository.class, m_licenseRepositoryImpl, new String[] {}));
-        m_services.add(registerRepository(License2GatewayAssociationRepository.class, m_license2GatewayAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(LicenseObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(TargetObject.TOPIC_ENTITY_ROOT)}));
+        m_services.add(registerRepository(Artifact2FeatureAssociationRepository.class, m_artifact2GroupAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(ArtifactObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(FeatureObject.TOPIC_ENTITY_ROOT)}));
+        m_services.add(registerRepository(FeatureRepository.class, m_groupRepositoryImpl, new String[] {}));
+        m_services.add(registerRepository(Feature2DistributionAssociationRepository.class, m_group2LicenseAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(FeatureObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(DistributionObject.TOPIC_ENTITY_ROOT)}));
+        m_services.add(registerRepository(DistributionRepository.class, m_licenseRepositoryImpl, new String[] {}));
+        m_services.add(registerRepository(Distribution2TargetAssociationRepository.class, m_license2GatewayAssociationRepositoryImpl, new String[] {createPrivateObjectTopic(DistributionObject.TOPIC_ENTITY_ROOT), createPrivateObjectTopic(TargetObject.TOPIC_ENTITY_ROOT)}));
         m_services.add(registerRepository(TargetRepository.class, m_gatewayRepositoryImpl, new String[] {}));
         m_services.add(registerRepository(DeploymentVersionRepository.class, m_deploymentVersionRepositoryImpl, new String[] {}));
 
@@ -200,11 +200,11 @@ public class RepositoryAdminImpl impleme
         Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> result = new HashMap<Class<? extends ObjectRepository>, ObjectRepositoryImpl>();
 
         result.put(ArtifactRepository.class, m_artifactRepositoryImpl);
-        result.put(Artifact2GroupAssociationRepository.class, m_artifact2GroupAssociationRepositoryImpl);
-        result.put(GroupRepository.class, m_groupRepositoryImpl);
-        result.put(Group2LicenseAssociationRepository.class, m_group2LicenseAssociationRepositoryImpl);
-        result.put(LicenseRepository.class, m_licenseRepositoryImpl);
-        result.put(License2GatewayAssociationRepository.class, m_license2GatewayAssociationRepositoryImpl);
+        result.put(Artifact2FeatureAssociationRepository.class, m_artifact2GroupAssociationRepositoryImpl);
+        result.put(FeatureRepository.class, m_groupRepositoryImpl);
+        result.put(Feature2DistributionAssociationRepository.class, m_group2LicenseAssociationRepositoryImpl);
+        result.put(DistributionRepository.class, m_licenseRepositoryImpl);
+        result.put(Distribution2TargetAssociationRepository.class, m_license2GatewayAssociationRepositoryImpl);
         result.put(TargetRepository.class, m_gatewayRepositoryImpl);
         result.put(DeploymentVersionRepository.class, m_deploymentVersionRepositoryImpl);
 

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java Fri Mar 16 10:05:14 2012
@@ -24,14 +24,14 @@ import java.util.List;
 
 import org.apache.ace.client.repository.ObjectRepository;
 import org.apache.ace.client.repository.RepositoryAdminLoginContext;
-import org.apache.ace.client.repository.repository.Artifact2GroupAssociationRepository;
+import org.apache.ace.client.repository.repository.Artifact2FeatureAssociationRepository;
 import org.apache.ace.client.repository.repository.ArtifactRepository;
 import org.apache.ace.client.repository.repository.DeploymentVersionRepository;
 import org.apache.ace.client.repository.repository.TargetRepository;
-import org.apache.ace.client.repository.repository.Group2LicenseAssociationRepository;
-import org.apache.ace.client.repository.repository.GroupRepository;
-import org.apache.ace.client.repository.repository.License2GatewayAssociationRepository;
-import org.apache.ace.client.repository.repository.LicenseRepository;
+import org.apache.ace.client.repository.repository.Feature2DistributionAssociationRepository;
+import org.apache.ace.client.repository.repository.FeatureRepository;
+import org.apache.ace.client.repository.repository.Distribution2TargetAssociationRepository;
+import org.apache.ace.client.repository.repository.DistributionRepository;
 import org.osgi.service.useradmin.User;
 
 class RepositoryAdminLoginContextImpl implements RepositoryAdminLoginContext {
@@ -61,17 +61,17 @@ class RepositoryAdminLoginContextImpl im
     public RepositoryAdminLoginContext addShopRepository(URL repositoryLocation, String repositoryCustomer, String repositoryName, boolean writeAccess) {
         return addRepositories(repositoryLocation, repositoryCustomer, repositoryName, writeAccess,
             ArtifactRepository.class,
-            GroupRepository.class,
-            Artifact2GroupAssociationRepository.class,
-            LicenseRepository.class,
-            Group2LicenseAssociationRepository.class);
+            FeatureRepository.class,
+            Artifact2FeatureAssociationRepository.class,
+            DistributionRepository.class,
+            Feature2DistributionAssociationRepository.class);
     }
 
     @SuppressWarnings("unchecked")
     public RepositoryAdminLoginContext addTargetRepository(URL repositoryLocation, String repositoryCustomer, String repositoryName, boolean writeAccess) {
         return addRepositories(repositoryLocation, repositoryCustomer, repositoryName, writeAccess,
             TargetRepository.class,
-            License2GatewayAssociationRepository.class);
+            Distribution2TargetAssociationRepository.class);
     }
 
     @SuppressWarnings("unchecked")

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayObjectImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayObjectImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayObjectImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayObjectImpl.java Fri Mar 16 10:05:14 2012
@@ -36,8 +36,8 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.object.DeploymentArtifact;
 import org.apache.ace.client.repository.object.DeploymentVersionObject;
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.License2GatewayAssociation;
-import org.apache.ace.client.repository.object.LicenseObject;
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
 import org.apache.ace.client.repository.stateful.StatefulTargetObject;
 import org.apache.ace.log.AuditEvent;
 import org.apache.ace.log.LogDescriptor;
@@ -109,7 +109,7 @@ public class StatefulGatewayObjectImpl i
         }
     }
 
-    public TargetObject getGatewayObject() {
+    public TargetObject getTargetObject() {
         synchronized(m_lock) {
             ensureGatewayPresent();
             return m_gatewayObject;
@@ -443,17 +443,17 @@ public class StatefulGatewayObjectImpl i
         return !verifyExistence();
     }
 
-    public List<License2GatewayAssociation> getAssociationsWith(LicenseObject license) {
+    public List<Distribution2TargetAssociation> getAssociationsWith(DistributionObject license) {
         synchronized(m_lock) {
             ensureGatewayPresent();
             return m_gatewayObject.getAssociationsWith(license);
         }
     }
 
-    public List<LicenseObject> getLicenses() {
+    public List<DistributionObject> getDistributions() {
         synchronized(m_lock) {
             ensureGatewayPresent();
-            return m_gatewayObject.getLicenses();
+            return m_gatewayObject.getDistributions();
         }
     }
 

Modified: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayRepositoryImpl.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayRepositoryImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayRepositoryImpl.java Fri Mar 16 10:05:14 2012
@@ -41,8 +41,8 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.object.DeploymentArtifact;
 import org.apache.ace.client.repository.object.DeploymentVersionObject;
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.GroupObject;
-import org.apache.ace.client.repository.object.LicenseObject;
+import org.apache.ace.client.repository.object.FeatureObject;
+import org.apache.ace.client.repository.object.DistributionObject;
 import org.apache.ace.client.repository.repository.ArtifactRepository;
 import org.apache.ace.client.repository.repository.DeploymentVersionRepository;
 import org.apache.ace.client.repository.repository.TargetRepository;
@@ -469,13 +469,13 @@ public class StatefulGatewayRepositoryIm
 
         Map<ArtifactObject, String> bundles = new HashMap<ArtifactObject, String>();
         Map<ArtifactObject, String> artifacts = new HashMap<ArtifactObject, String>();
-        Map<ArtifactObject, Map<GroupObject, List<LicenseObject>>> path = new HashMap<ArtifactObject, Map<GroupObject,List<LicenseObject>>>();
+        Map<ArtifactObject, Map<FeatureObject, List<DistributionObject>>> path = new HashMap<ArtifactObject, Map<FeatureObject,List<DistributionObject>>>();
 
         // First, find all basic bundles and artifacts. An while we're traversing the
         // tree of objects, build the tree of properties.
         if (go != null) {
-            for (LicenseObject license : go.getLicenses()) {
-                for (GroupObject group : license.getGroups()) {
+            for (DistributionObject license : go.getDistributions()) {
+                for (FeatureObject group : license.getGroups()) {
                     for (ArtifactObject artifact : group.getArtifacts()) {
                         if (m_bundleHelper.canUse(artifact)) {
                             bundles.put(artifact, m_bundleHelper.getResourceProcessorPIDs(artifact));
@@ -483,14 +483,14 @@ public class StatefulGatewayRepositoryIm
                         else {
                             artifacts.put(artifact, artifact.getProcessorPID());
                         }
-                        Map<GroupObject, List<LicenseObject>> groupToLicense = path.get(artifact);
+                        Map<FeatureObject, List<DistributionObject>> groupToLicense = path.get(artifact);
                         if (groupToLicense == null) {
-                        	groupToLicense = new HashMap<GroupObject, List<LicenseObject>>();
+                        	groupToLicense = new HashMap<FeatureObject, List<DistributionObject>>();
                         	path.put(artifact, groupToLicense);
                         }
-                        List<LicenseObject> licenses = groupToLicense.get(group);
+                        List<DistributionObject> licenses = groupToLicense.get(group);
                         if (licenses == null) {
-                        	licenses = new ArrayList<LicenseObject>();
+                        	licenses = new ArrayList<DistributionObject>();
                         	groupToLicense.put(group, licenses);
                         }
                         licenses.add(license);
@@ -559,12 +559,12 @@ public class StatefulGatewayRepositoryIm
         return result.toArray(new DeploymentArtifact[result.size()]);
     }
     
-    private String getRepositoryPath(ArtifactObject artifact, Map<ArtifactObject, Map<GroupObject, List<LicenseObject>>> path) {
+    private String getRepositoryPath(ArtifactObject artifact, Map<ArtifactObject, Map<FeatureObject, List<DistributionObject>>> path) {
     	StringBuilder builder = new StringBuilder();
-        Map<GroupObject, List<LicenseObject>> groupToLicense = path.get(artifact);
+        Map<FeatureObject, List<DistributionObject>> groupToLicense = path.get(artifact);
         if (groupToLicense != null) {
-	        for (Entry<GroupObject, List<LicenseObject>> entry : groupToLicense.entrySet()) {
-	        	for (LicenseObject l : entry.getValue()) {
+	        for (Entry<FeatureObject, List<DistributionObject>> entry : groupToLicense.entrySet()) {
+	        	for (DistributionObject l : entry.getValue()) {
 	        		builder.append(entry.getKey().getName()).append(';').append(l.getName()).append(',');
 	        	}
 	        }
@@ -589,8 +589,8 @@ public class StatefulGatewayRepositoryIm
         }
 
         if (go != null) {
-            for (LicenseObject license : go.getLicenses()) {
-                for (GroupObject group : license.getGroups()) {
+            for (DistributionObject license : go.getDistributions()) {
+                for (FeatureObject group : license.getGroups()) {
                     for (ArtifactObject artifact : group.getArtifacts()) {
                         result.add(artifact);
                         if (!m_bundleHelper.canUse(artifact)) {
@@ -619,7 +619,7 @@ public class StatefulGatewayRepositoryIm
      */
     DeploymentVersionObject generateDeploymentVersion(String gatewayID) throws IOException {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(DeploymentVersionObject.KEY_GATEWAYID, gatewayID);
+        attr.put(DeploymentVersionObject.KEY_TARGETID, gatewayID);
         Map<String, String> tags = new HashMap<String, String>();
 
         DeploymentVersionObject mostRecentDeploymentVersion = getMostRecentDeploymentVersion(gatewayID);
@@ -684,7 +684,7 @@ public class StatefulGatewayRepositoryIm
         else if (event.getTopic().equals(DeploymentVersionObject.TOPIC_ADDED) || event.getTopic().equals(DeploymentVersionObject.TOPIC_REMOVED)) {
             synchronized(m_repository) {
                 DeploymentVersionObject deploymentVersionObject = ((DeploymentVersionObject) event.getProperty(RepositoryObject.EVENT_ENTITY));
-                String id = deploymentVersionObject.getGatewayID();
+                String id = deploymentVersionObject.getTargetID();
                 StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(id);
                 if (sgoi == null) {
                     createStateful(id);

Modified: ace/trunk/ace-client-repository-impl/src/test/java/org/apache/ace/client/repository/impl/ModelTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/test/java/org/apache/ace/client/repository/impl/ModelTest.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/test/java/org/apache/ace/client/repository/impl/ModelTest.java (original)
+++ ace/trunk/ace-client-repository-impl/src/test/java/org/apache/ace/client/repository/impl/ModelTest.java Fri Mar 16 10:05:14 2012
@@ -31,22 +31,22 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.RepositoryUtil;
 import org.apache.ace.client.repository.helper.bundle.BundleHelper;
 import org.apache.ace.client.repository.helper.bundle.impl.BundleHelperImpl;
-import org.apache.ace.client.repository.object.Artifact2GroupAssociation;
+import org.apache.ace.client.repository.object.Artifact2FeatureAssociation;
 import org.apache.ace.client.repository.object.ArtifactObject;
 import org.apache.ace.client.repository.object.DeploymentArtifact;
 import org.apache.ace.client.repository.object.DeploymentVersionObject;
 import org.apache.ace.client.repository.object.TargetObject;
-import org.apache.ace.client.repository.object.Group2LicenseAssociation;
-import org.apache.ace.client.repository.object.GroupObject;
-import org.apache.ace.client.repository.object.LicenseObject;
-import org.apache.ace.client.repository.repository.Artifact2GroupAssociationRepository;
+import org.apache.ace.client.repository.object.Feature2DistributionAssociation;
+import org.apache.ace.client.repository.object.FeatureObject;
+import org.apache.ace.client.repository.object.DistributionObject;
+import org.apache.ace.client.repository.repository.Artifact2FeatureAssociationRepository;
 import org.apache.ace.client.repository.repository.ArtifactRepository;
 import org.apache.ace.client.repository.repository.DeploymentVersionRepository;
 import org.apache.ace.client.repository.repository.TargetRepository;
-import org.apache.ace.client.repository.repository.Group2LicenseAssociationRepository;
-import org.apache.ace.client.repository.repository.GroupRepository;
-import org.apache.ace.client.repository.repository.License2GatewayAssociationRepository;
-import org.apache.ace.client.repository.repository.LicenseRepository;
+import org.apache.ace.client.repository.repository.Feature2DistributionAssociationRepository;
+import org.apache.ace.client.repository.repository.FeatureRepository;
+import org.apache.ace.client.repository.repository.Distribution2TargetAssociationRepository;
+import org.apache.ace.client.repository.repository.DistributionRepository;
 import org.apache.ace.test.utils.TestUtils;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
@@ -111,11 +111,11 @@ public class ModelTest {
 
         Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> repos = new HashMap<Class<? extends ObjectRepository>, ObjectRepositoryImpl>();
         repos.put(ArtifactRepository.class, m_artifactRepository);
-        repos.put(Artifact2GroupAssociationRepository.class, m_artifact2groupRepository);
-        repos.put(GroupRepository.class, m_groupRepository);
-        repos.put(Group2LicenseAssociationRepository.class, m_group2licenseRepository);
-        repos.put(LicenseRepository.class, m_licenseRepository);
-        repos.put(License2GatewayAssociationRepository.class, m_license2gatewayRepository);
+        repos.put(Artifact2FeatureAssociationRepository.class, m_artifact2groupRepository);
+        repos.put(FeatureRepository.class, m_groupRepository);
+        repos.put(Feature2DistributionAssociationRepository.class, m_group2licenseRepository);
+        repos.put(DistributionRepository.class, m_licenseRepository);
+        repos.put(Distribution2TargetAssociationRepository.class, m_license2gatewayRepository);
         repos.put(TargetRepository.class, m_gatewayRepository);
         repos.put(DeploymentVersionRepository.class, m_deploymentVersionRepository);
 
@@ -145,7 +145,7 @@ public class ModelTest {
         }
 
         // Even though the bundle is not yet associated to a group, try to get its groups.
-        List<GroupObject> groups = b.getGroups();
+        List<FeatureObject> groups = b.getGroups();
 
         assert groups.size() == 0 : "The bundle is not associated, so it should not return any groups.";
 
@@ -249,8 +249,8 @@ public class ModelTest {
         ArtifactObject b2 = createBasicBundleObject("bundle2");
         ArtifactObject b3 = createBasicBundleObject("bundle3");
 
-        GroupObject g1 = createBasicGroupObject("group1");
-        GroupObject g2 = createBasicGroupObject("group2");
+        FeatureObject g1 = createBasicGroupObject("group1");
+        FeatureObject g2 = createBasicGroupObject("group2");
 
         m_artifact2groupRepository.create(b1, g1);
         m_artifact2groupRepository.create(b2, g2);
@@ -266,12 +266,12 @@ public class ModelTest {
         assert m_artifactRepository.get().size() == 3 : "We expect to find 3 bundles, but we find " + m_artifactRepository.get().size();
         assert m_groupRepository.get().size() == 2 : "We expect to find 2 groups, but we find " + m_groupRepository.get().size();
         assert m_artifact2groupRepository.get().size() == 3 : "We expect to find 3 associations, but we find " + m_artifact2groupRepository.get().size();
-        assert b1.isAssociated(g1, GroupObject.class) : "After serialization, b1 should still be associated with g1.";
-        assert !b1.isAssociated(g2, GroupObject.class) : "After serialization, b1 should not be associated with g1.";
-        assert !b2.isAssociated(g1, GroupObject.class) : "After serialization, b2 should not be associated with g2.";
-        assert b2.isAssociated(g2, GroupObject.class) : "After serialization, b2 should still be associated with g2.";
-        assert !b3.isAssociated(g1, GroupObject.class) : "After serialization, b3 should not be associated with g2.";
-        assert b3.isAssociated(g2, GroupObject.class) : "After serialization, b3 should still be associated with g2.";
+        assert b1.isAssociated(g1, FeatureObject.class) : "After serialization, b1 should still be associated with g1.";
+        assert !b1.isAssociated(g2, FeatureObject.class) : "After serialization, b1 should not be associated with g1.";
+        assert !b2.isAssociated(g1, FeatureObject.class) : "After serialization, b2 should not be associated with g2.";
+        assert b2.isAssociated(g2, FeatureObject.class) : "After serialization, b2 should still be associated with g2.";
+        assert !b3.isAssociated(g1, FeatureObject.class) : "After serialization, b3 should not be associated with g2.";
+        assert b3.isAssociated(g2, FeatureObject.class) : "After serialization, b3 should still be associated with g2.";
     }
 
     @Test( groups = { TestUtils.UNIT } )
@@ -284,7 +284,7 @@ public class ModelTest {
         Map<String, String> tags = new HashMap<String, String>();
 
         assert m_groupRepository != null : "Something has gone wrong injecting the bundle repository.";
-        GroupObject g1 = m_groupRepository.create(attributes, tags);
+        FeatureObject g1 = m_groupRepository.create(attributes, tags);
         g1.addTag("mytag", "thetag");
         g1.addTag("name", "tagname");
         g1.addTag("difficult", ")diffi)c*ul\\t");
@@ -323,18 +323,18 @@ public class ModelTest {
         ArtifactObject b2 = createBasicBundleObject("bundle2");
 
         // Create three groups.
-        GroupObject g1 = createBasicGroupObject("group1");
-        GroupObject g2 = createBasicGroupObject("group2");
-        GroupObject g3 = createBasicGroupObject("group3");
+        FeatureObject g1 = createBasicGroupObject("group1");
+        FeatureObject g2 = createBasicGroupObject("group2");
+        FeatureObject g3 = createBasicGroupObject("group3");
 
         // Create some associations.
-        Artifact2GroupAssociation b2g1 = m_artifact2groupRepository.create(b1, g2);
+        Artifact2FeatureAssociation b2g1 = m_artifact2groupRepository.create(b1, g2);
         assert b2g1 != null;
-        Artifact2GroupAssociation b2g2 = m_artifact2groupRepository.create(b2, g1);
+        Artifact2FeatureAssociation b2g2 = m_artifact2groupRepository.create(b2, g1);
         assert b2g2 != null;
-        Artifact2GroupAssociation b2g3 = m_artifact2groupRepository.create(b1, g3);
+        Artifact2FeatureAssociation b2g3 = m_artifact2groupRepository.create(b1, g3);
         assert b2g3 != null;
-        Artifact2GroupAssociation b2g4 = m_artifact2groupRepository.create(b2, g3);
+        Artifact2FeatureAssociation b2g4 = m_artifact2groupRepository.create(b2, g3);
         assert b2g4 != null;
 
         // Do some basic checks on the repositories.
@@ -346,24 +346,24 @@ public class ModelTest {
         assert (b2g4.getRight().size() == 1) && b2g4.getRight().contains(g3) : "The right side of the fourth association should be group 3.";
 
         // Check the wiring: what is wired to what?
-        List<GroupObject> b1groups = b1.getGroups();
-        List<GroupObject> b2groups = b2.getGroups();
+        List<FeatureObject> b1groups = b1.getGroups();
+        List<FeatureObject> b2groups = b2.getGroups();
 
         List<ArtifactObject> g1bundles = g1.getArtifacts();
         List<ArtifactObject> g2bundles = g2.getArtifacts();
         List<ArtifactObject> g3bundles = g3.getArtifacts();
-        List<LicenseObject> g1licenses = g1.getLicenses();
-        List<LicenseObject> g2licenses = g2.getLicenses();
-        List<LicenseObject> g3licenses = g3.getLicenses();
+        List<DistributionObject> g1licenses = g1.getDistributions();
+        List<DistributionObject> g2licenses = g2.getDistributions();
+        List<DistributionObject> g3licenses = g3.getDistributions();
 
         assert g1licenses.size() == 0 : "Group one should not have any associations to licenses; we found " + g1licenses.size() + ".";
         assert g2licenses.size() == 0 : "Group two should not have any associations to licenses; we found " + g2licenses.size() + ".";
         assert g3licenses.size() == 0 : "Group three should not have any associations to licenses; we found " + g3licenses.size() + ".";
 
-        List<GroupObject> b1expectedGroups = new ArrayList<GroupObject>();
+        List<FeatureObject> b1expectedGroups = new ArrayList<FeatureObject>();
         b1expectedGroups.add(g2);
         b1expectedGroups.add(g3);
-        List<GroupObject> b2expectedGroups = new ArrayList<GroupObject>();
+        List<FeatureObject> b2expectedGroups = new ArrayList<FeatureObject>();
         b2expectedGroups.add(g1);
         b2expectedGroups.add(g3);
 
@@ -411,15 +411,15 @@ public class ModelTest {
     @Test( groups = { TestUtils.UNIT } )
     public void TestGroup2LicenseAssociations() {
         initializeRepositoryAdmin();
-        GroupObject g1 = createBasicGroupObject("group1");
-        LicenseObject l1 = createBasicLicenseObject("license1");
-        Group2LicenseAssociation g2l1 = m_group2licenseRepository.create(g1, l1);
+        FeatureObject g1 = createBasicGroupObject("group1");
+        DistributionObject l1 = createBasicLicenseObject("license1");
+        Feature2DistributionAssociation g2l1 = m_group2licenseRepository.create(g1, l1);
 
         assert (g2l1.getLeft().size() == 1) && g2l1.getLeft().contains(g1) : "Left side of the association should be our group.";
         assert (g2l1.getRight().size() == 1) &&  g2l1.getRight().contains(l1) : "Right side of the association should be our license.";
 
         assert g1.getArtifacts().size() == 0 : "Group 1 should not be associated with any bundles; it is associated with " + g1.getArtifacts().size() + ".";
-        assert g1.getLicenses().size() == 1 : "Group 1 should be associated with exactly one license; it is associated with " + g1.getLicenses().size() + ".";
+        assert g1.getDistributions().size() == 1 : "Group 1 should be associated with exactly one license; it is associated with " + g1.getDistributions().size() + ".";
 
         assert l1.getGroups().size() == 1 : "License 1 should be associated with exactly one group; it is associated with " + l1.getGroups().size() + ".";
         assert l1.getGateways().size() == 0 : "License 1 should not be associated with any gateways; it is associated with " + l1.getGateways().size() + ".";
@@ -434,25 +434,25 @@ public class ModelTest {
     @Test( groups = { TestUtils.UNIT } )
     public void testLicense2GatewayAssociations() {
         initializeRepositoryAdmin();
-        LicenseObject l1 = createBasicLicenseObject("license1");
+        DistributionObject l1 = createBasicLicenseObject("license1");
         TargetObject g1 = createBasicGatewayObject("gateway1");
         m_license2gatewayRepository.create(l1, g1);
 
         assert l1.getGroups().size() == 0 : "License 1 should not be associated with any groups; it is associated with " + l1.getGroups().size() + ".";
         assert l1.getGateways().size() == 1 : "License 1 should be associated with exactly one gateway; it is associated with " + l1.getGateways().size() + ".";
 
-        assert g1.getLicenses().size() == 1 : "Gateway 1 should be associated with exactly one license; it is associated with " + g1.getLicenses().size() + ".";
+        assert g1.getDistributions().size() == 1 : "Gateway 1 should be associated with exactly one license; it is associated with " + g1.getDistributions().size() + ".";
     }
 
     @Test( groups = { TestUtils.UNIT } )
     public void testGetAssociationsWith() {
         initializeRepositoryAdmin();
         ArtifactObject b1 = createBasicBundleObject("bundle1");
-        GroupObject g1 = createBasicGroupObject("group1");
-        Artifact2GroupAssociation b2g1 = m_artifact2groupRepository.create(b1, g1);
+        FeatureObject g1 = createBasicGroupObject("group1");
+        Artifact2FeatureAssociation b2g1 = m_artifact2groupRepository.create(b1, g1);
 
-        List<Artifact2GroupAssociation> b1Associations = b1.getAssociationsWith(g1);
-        List<Artifact2GroupAssociation> g1Associations = g1.getAssociationsWith(b1);
+        List<Artifact2FeatureAssociation> b1Associations = b1.getAssociationsWith(g1);
+        List<Artifact2FeatureAssociation> g1Associations = g1.getAssociationsWith(b1);
 
         assert b1Associations.size() == 1 : "The bundle has exactly one association to the group, but it shows " + b1Associations.size() + ".";
         assert b1Associations.get(0) == b2g1 : "The bundle's association should be the one we created.";
@@ -566,18 +566,18 @@ public class ModelTest {
         ArtifactObject b1 = createBasicBundleObject("b1");
         ArtifactObject b2 = createBasicBundleObject("b2");
         ArtifactObject b3 = createBasicBundleObject("b3");
-        GroupObject g1 = createBasicGroupObject("g1");
-        GroupObject g2 = createBasicGroupObject("g2");
-        GroupObject g3 = createBasicGroupObject("g3");
+        FeatureObject g1 = createBasicGroupObject("g1");
+        FeatureObject g2 = createBasicGroupObject("g2");
+        FeatureObject g3 = createBasicGroupObject("g3");
 
         List<ArtifactObject> bundles = new ArrayList<ArtifactObject>();
         bundles.add(b1);
         bundles.add(b2);
-        List<GroupObject> groups = new ArrayList<GroupObject>();
+        List<FeatureObject> groups = new ArrayList<FeatureObject>();
         groups.add(g1);
         groups.add(g3);
 
-        Artifact2GroupAssociation bg = m_artifact2groupRepository.create(bundles, groups);
+        Artifact2FeatureAssociation bg = m_artifact2groupRepository.create(bundles, groups);
 
         assert bg.getLeft().size() == 2 : "We expect two bundles on the left side of the association.";
         assert bg.getRight().size() == 2 : "We expect two groups on the right side of the association.";
@@ -589,7 +589,7 @@ public class ModelTest {
         assert !bg.getRight().contains(g2) : "g2 should not be on the right side of the association.";
         assert bg.getRight().contains(g3) : "g3 should be on the right side of the association.";
 
-        List<GroupObject> foundGroups = b1.getGroups();
+        List<FeatureObject> foundGroups = b1.getGroups();
         assert foundGroups.size() == 2 : "b1 should be associated with two groups.";
         assert foundGroups.contains(g1) : "b1 should be associated with g1";
         assert !foundGroups.contains(g2) : "b1 not should be associated with g2";
@@ -608,14 +608,14 @@ public class ModelTest {
     @Test( groups = { TestUtils.UNIT } )
     public void testAssociationsWithCardinality() {
         ArtifactObject b1 = createBasicBundleObject("b1");
-        GroupObject g1 = createBasicGroupObject("g1");
-        GroupObject g2 = createBasicGroupObject("g2");
-        GroupObject g3 = createBasicGroupObject("g3");
+        FeatureObject g1 = createBasicGroupObject("g1");
+        FeatureObject g2 = createBasicGroupObject("g2");
+        FeatureObject g3 = createBasicGroupObject("g3");
 
         Map<String, String> props = new HashMap<String, String>();
         props.put(Association.LEFT_ENDPOINT, "(" + BundleHelper.KEY_SYMBOLICNAME + "=b1)");
         props.put(Association.LEFT_CARDINALITY, "1");
-        props.put(Association.RIGHT_ENDPOINT, "(" + GroupObject.KEY_NAME + "=g*)");
+        props.put(Association.RIGHT_ENDPOINT, "(" + FeatureObject.KEY_NAME + "=g*)");
         props.put(Association.RIGHT_CARDINALITY, "2");
         Map<String, String> tags = new HashMap<String, String>();
 
@@ -629,7 +629,7 @@ public class ModelTest {
 
         props.put(Association.RIGHT_CARDINALITY, "3");
 
-        Artifact2GroupAssociation bg = m_artifact2groupRepository.create(props, tags);
+        Artifact2FeatureAssociation bg = m_artifact2groupRepository.create(props, tags);
         assert b1.getGroups().size() == 3 : "The bundle should be associated to three groups.";
         assert (g1.getArtifacts().size() == 1) && g1.getArtifacts().contains(b1) : "g1 should be associated to only b1.";
         assert (g2.getArtifacts().size() == 1) && g2.getArtifacts().contains(b1) : "g1 should be associated to only b1.";
@@ -657,17 +657,17 @@ public class ModelTest {
         return m_artifactRepository.create(attr, tags);
     }
 
-    private GroupObject createBasicGroupObject(String name) {
+    private FeatureObject createBasicGroupObject(String name) {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(GroupObject.KEY_NAME, name);
+        attr.put(FeatureObject.KEY_NAME, name);
         Map<String, String> tags = new HashMap<String, String>();
 
         return m_groupRepository.create(attr, tags);
     }
 
-    private LicenseObject createBasicLicenseObject(String name) {
+    private DistributionObject createBasicLicenseObject(String name) {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(LicenseObject.KEY_NAME, name);
+        attr.put(DistributionObject.KEY_NAME, name);
         Map<String, String> tags = new HashMap<String, String>();
 
         return m_licenseRepository.create(attr, tags);
@@ -683,7 +683,7 @@ public class ModelTest {
 
     private DeploymentVersionObject createBasicDeploymentVersionObject(String gatewayID, String version, String[] bundles) {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(DeploymentVersionObject.KEY_GATEWAYID, gatewayID);
+        attr.put(DeploymentVersionObject.KEY_TARGETID, gatewayID);
         attr.put(DeploymentVersionObject.KEY_VERSION, version);
         Map<String, String> tags = new HashMap<String, String>();
 

Modified: ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java?rev=1301412&r1=1301411&r2=1301412&view=diff
==============================================================================
--- ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java (original)
+++ ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java Fri Mar 16 10:05:14 2012
@@ -31,13 +31,13 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.RepositoryAdmin;
 import org.apache.ace.client.repository.RepositoryObject;
 import org.apache.ace.client.repository.SessionFactory;
-import org.apache.ace.client.repository.repository.Artifact2GroupAssociationRepository;
+import org.apache.ace.client.repository.repository.Artifact2FeatureAssociationRepository;
 import org.apache.ace.client.repository.repository.ArtifactRepository;
 import org.apache.ace.client.repository.repository.TargetRepository;
-import org.apache.ace.client.repository.repository.Group2LicenseAssociationRepository;
-import org.apache.ace.client.repository.repository.GroupRepository;
-import org.apache.ace.client.repository.repository.License2GatewayAssociationRepository;
-import org.apache.ace.client.repository.repository.LicenseRepository;
+import org.apache.ace.client.repository.repository.Feature2DistributionAssociationRepository;
+import org.apache.ace.client.repository.repository.FeatureRepository;
+import org.apache.ace.client.repository.repository.Distribution2TargetAssociationRepository;
+import org.apache.ace.client.repository.repository.DistributionRepository;
 import org.apache.ace.client.repository.stateful.StatefulTargetObject;
 import org.apache.ace.client.repository.stateful.StatefulTargetRepository;
 import org.apache.felix.dm.Component;
@@ -68,13 +68,13 @@ public class Workspace {
     private volatile DependencyManager m_manager;
     private volatile RepositoryAdmin m_repositoryAdmin;
     private volatile ArtifactRepository m_artifactRepository;
-    private volatile GroupRepository m_featureRepository;
-    private volatile LicenseRepository m_distributionRepository;
+    private volatile FeatureRepository m_featureRepository;
+    private volatile DistributionRepository m_distributionRepository;
     private volatile StatefulTargetRepository m_statefulTargetRepository;
     private volatile TargetRepository m_targetRepository;
-    private volatile Artifact2GroupAssociationRepository m_artifact2FeatureAssociationRepository;
-    private volatile Group2LicenseAssociationRepository m_feature2DistributionAssociationRepository;
-    private volatile License2GatewayAssociationRepository m_distribution2TargetAssociationRepository;
+    private volatile Artifact2FeatureAssociationRepository m_artifact2FeatureAssociationRepository;
+    private volatile Feature2DistributionAssociationRepository m_feature2DistributionAssociationRepository;
+    private volatile Distribution2TargetAssociationRepository m_distribution2TargetAssociationRepository;
     private volatile UserAdmin m_userAdmin;
     private volatile LogService m_log;
 
@@ -108,13 +108,13 @@ public class Workspace {
     public void init(Component component) {
         addSessionDependency(component, RepositoryAdmin.class, true);
         addSessionDependency(component, ArtifactRepository.class, true);
-        addSessionDependency(component, GroupRepository.class, true);
-        addSessionDependency(component, LicenseRepository.class, true);
+        addSessionDependency(component, FeatureRepository.class, true);
+        addSessionDependency(component, DistributionRepository.class, true);
         addSessionDependency(component, TargetRepository.class, true);
         addSessionDependency(component, StatefulTargetRepository.class, true);
-        addSessionDependency(component, Artifact2GroupAssociationRepository.class, true);
-        addSessionDependency(component, Group2LicenseAssociationRepository.class, true);
-        addSessionDependency(component, License2GatewayAssociationRepository.class, true);
+        addSessionDependency(component, Artifact2FeatureAssociationRepository.class, true);
+        addSessionDependency(component, Feature2DistributionAssociationRepository.class, true);
+        addSessionDependency(component, Distribution2TargetAssociationRepository.class, true);
         addDependency(component, UserAdmin.class, true);
         addDependency(component, LogService.class, false);
     }
@@ -186,7 +186,7 @@ public class Workspace {
                 if (left != null) {
                     if (left instanceof StatefulTargetObject) {
                         if (((StatefulTargetObject) left).isRegistered()) {
-                            attributes.put("leftEndpoint", ((StatefulTargetObject) left).getGatewayObject().getAssociationFilter(attributes));
+                            attributes.put("leftEndpoint", ((StatefulTargetObject) left).getTargetObject().getAssociationFilter(attributes));
                         }
                     }
                     else {
@@ -196,7 +196,7 @@ public class Workspace {
                 if (right != null) {
                     if (right instanceof StatefulTargetObject) {
                         if (((StatefulTargetObject) right).isRegistered()) {
-                            attributes.put("rightEndpoint", ((StatefulTargetObject) right).getGatewayObject().getAssociationFilter(attributes));
+                            attributes.put("rightEndpoint", ((StatefulTargetObject) right).getTargetObject().getAssociationFilter(attributes));
                         }
                     }
                     else {
@@ -244,7 +244,7 @@ public class Workspace {
             if (left != null) {
                 if (left instanceof StatefulTargetObject) {
                     if (((StatefulTargetObject) left).isRegistered()) {
-                        repositoryObject.addAttribute("leftEndpoint", ((StatefulTargetObject) left).getGatewayObject().getAssociationFilter(getAttributes(((StatefulTargetObject) left).getGatewayObject())));
+                        repositoryObject.addAttribute("leftEndpoint", ((StatefulTargetObject) left).getTargetObject().getAssociationFilter(getAttributes(((StatefulTargetObject) left).getTargetObject())));
                     }
                 }
                 else {
@@ -254,7 +254,7 @@ public class Workspace {
             if (right != null) {
                 if (right instanceof StatefulTargetObject) {
                     if (((StatefulTargetObject) right).isRegistered()) {
-                        repositoryObject.addAttribute("rightEndpoint", ((StatefulTargetObject) right).getGatewayObject().getAssociationFilter(getAttributes(((StatefulTargetObject) right).getGatewayObject())));
+                        repositoryObject.addAttribute("rightEndpoint", ((StatefulTargetObject) right).getTargetObject().getAssociationFilter(getAttributes(((StatefulTargetObject) right).getTargetObject())));
                     }
                 }
                 else {



Mime
View raw message