ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1301449 [2/2] - in /ace/trunk: ace-client-repository-api/src/main/java/org/apache/ace/client/repository/object/ ace-client-repository-helper-base/src/main/java/org/apache/ace/client/repository/helper/base/ ace-client-repository-impl/src/ma...
Date Fri, 16 Mar 2012 12:05:41 GMT
Copied: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetPropertyResolver.java (from r1301381, ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayPropertyResolver.java)
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetPropertyResolver.java?p2=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetPropertyResolver.java&p1=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayPropertyResolver.java&r1=1301381&r2=1301449&rev=1301449&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayPropertyResolver.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetPropertyResolver.java Fri Mar 16 12:05:39 2012
@@ -25,15 +25,14 @@ import org.apache.ace.client.repository.
 import org.apache.ace.client.repository.object.TargetObject;
 
 /**
- *
  * Top-level property resolver, also able to return collections
  * of distributions, features and artifacts linked to this target
  * repository object.
  */
-public class GatewayPropertyResolver extends RepoPropertyResolver {
+public class TargetPropertyResolver extends RepositoryPropertyResolver {
 
-    public GatewayPropertyResolver(TargetObject go) {
-        super(go);
+    public TargetPropertyResolver(TargetObject to) {
+        super(to);
     }
 
     public Collection<PropertyResolver> getDistributions() {
@@ -42,7 +41,7 @@ public class GatewayPropertyResolver ext
         List<RepositoryObject> distributions = (List<RepositoryObject>)getChildren();
 
         for (RepositoryObject repo : distributions) {
-            list.add(new RepoPropertyResolver(repo));
+            list.add(new RepositoryPropertyResolver(repo));
         }
 
         return list;
@@ -58,7 +57,7 @@ public class GatewayPropertyResolver ext
         }
 
         for (RepositoryObject repo : features) {
-            list.add(new RepoPropertyResolver(repo));
+            list.add(new RepositoryPropertyResolver(repo));
         }
         return list;
     }
@@ -77,11 +76,9 @@ public class GatewayPropertyResolver ext
             artifacts.addAll(getChildren(repositoryObject));
         }
 
-
         for (RepositoryObject repo : artifacts) {
-            list.add(new RepoPropertyResolver(repo));
+            list.add(new RepositoryPropertyResolver(repo));
         }
         return list;
     }
-
 }

Copied: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetRepositoryImpl.java (from r1301381, ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayRepositoryImpl.java)
URL: http://svn.apache.org/viewvc/ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetRepositoryImpl.java?p2=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetRepositoryImpl.java&p1=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayRepositoryImpl.java&r1=1301381&r2=1301449&rev=1301449&view=diff
==============================================================================
--- ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/GatewayRepositoryImpl.java (original)
+++ ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/impl/TargetRepositoryImpl.java Fri Mar 16 12:05:39 2012
@@ -26,28 +26,28 @@ import org.apache.ace.client.repository.
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 
 /**
- * Implementation class for the GatewayRepository. For 'what it does', see GatewayRepository,
+ * Implementation class for the TargetRepository. For 'what it does', see TargetRepository,
  * for 'how it works', see ObjectRepositoryImpl.
  */
-public class GatewayRepositoryImpl extends ObjectRepositoryImpl<GatewayObjectImpl, TargetObject> implements TargetRepository {
-    private final static String XML_NODE = "gateways";
+public class TargetRepositoryImpl extends ObjectRepositoryImpl<TargetObjectImpl, TargetObject> implements TargetRepository {
+    private final static String XML_NODE = "targets";
 
-    public GatewayRepositoryImpl(ChangeNotifier notifier) {
+    public TargetRepositoryImpl(ChangeNotifier notifier) {
         super(notifier, XML_NODE);
     }
 
     @Override
-    GatewayObjectImpl createNewInhabitant(Map<String, String> attributes, Map<String, String> tags) {
-        return new GatewayObjectImpl(attributes, tags, this);
+    TargetObjectImpl createNewInhabitant(Map<String, String> attributes, Map<String, String> tags) {
+        return new TargetObjectImpl(attributes, tags, this);
     }
 
     @Override
-    GatewayObjectImpl createNewInhabitant(Map<String, String> attributes) {
-        return new GatewayObjectImpl(attributes, this);
+    TargetObjectImpl createNewInhabitant(Map<String, String> attributes) {
+        return new TargetObjectImpl(attributes, this);
     }
 
     @Override
-    GatewayObjectImpl createNewInhabitant(HierarchicalStreamReader reader) {
-        return new GatewayObjectImpl(reader, this);
+    TargetObjectImpl createNewInhabitant(HierarchicalStreamReader reader) {
+        return new TargetObjectImpl(reader, this);
     }
 }

Copied: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java (from r1301412, 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/StatefulTargetObjectImpl.java?p2=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java&p1=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayObjectImpl.java&r1=1301412&r2=1301449&rev=1301449&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/StatefulTargetObjectImpl.java Fri Mar 16 12:05:39 2012
@@ -49,10 +49,10 @@ import org.apache.ace.log.LogEvent;
  * parent <code>StatefulGatewayRepository</code>. Once created, it will handle its own lifecyle
  * and remove itself once is existence is no longer necessary.
  */
-public class StatefulGatewayObjectImpl implements StatefulTargetObject {
-    private final StatefulGatewayRepositoryImpl m_repository;
+public class StatefulTargetObjectImpl implements StatefulTargetObject {
+    private final StatefulTargetRepositoryImpl m_repository;
     private final Object m_lock = new Object();
-    private TargetObject m_gatewayObject;
+    private TargetObject m_targetObject;
     private List<LogDescriptor> m_processedAuditEvents = new ArrayList<LogDescriptor>();
     private Map<String, String> m_attributes = new HashMap<String, String>();
     /** This boolean is used to suppress STATUS_CHANGED events during the creation of the object.*/
@@ -62,12 +62,12 @@ public class StatefulGatewayObjectImpl i
      * Creates a new <code>StatefulGatewayObjectImpl</code>. After creation, it will have the
      * most recent data available, and has verified its own reasons for existence.
      * @param repository The parent repository of this object.
-     * @param gatewayID A string representing a gateway ID.
+     * @param targetID A string representing a target ID.
      */
-    StatefulGatewayObjectImpl(StatefulGatewayRepositoryImpl repository, String gatewayID) {
+    StatefulTargetObjectImpl(StatefulTargetRepositoryImpl repository, String targetID) {
         m_repository = repository;
-        addStatusAttribute(KEY_ID, gatewayID);
-        updateGatewayObject(false);
+        addStatusAttribute(KEY_ID, targetID);
+        updateTargetObject(false);
         updateAuditEvents(false);
         updateDeploymentVersions(null);
         verifyExistence();
@@ -105,14 +105,14 @@ public class StatefulGatewayObjectImpl i
 
     public boolean isRegistered() {
         synchronized(m_lock) {
-            return (m_gatewayObject != null);
+            return (m_targetObject != null);
         }
     }
 
     public TargetObject getTargetObject() {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject;
+            ensureTargetPresent();
+            return m_targetObject;
         }
     }
 
@@ -172,13 +172,13 @@ public class StatefulGatewayObjectImpl i
     }
 
     /**
-     * Signals this object that there has been a change to the <code>GatewayObject</code> it represents.
+     * Signals this object that there has been a change to the <code>TargetObject</code> it represents.
      * @param needsVerify States whether this update should make the object check for its
      * reasons for existence.
      */
-    void updateGatewayObject(boolean needsVerify) {
+    void updateTargetObject(boolean needsVerify) {
         synchronized(m_lock) {
-            m_gatewayObject = m_repository.getGatewayObject(getID());
+            m_targetObject = m_repository.getTargetObject(getID());
             determineRegistrationState();
             if (needsVerify) {
                 verifyExistence();
@@ -203,7 +203,7 @@ public class StatefulGatewayObjectImpl i
 
     /**
      * Signals this object that a new deployment version has been created in relation
-     * to the gatewayID this object manages.
+     * to the targetID this object manages.
      */
     void updateDeploymentVersions(DeploymentVersionObject deploymentVersionObject) {
         synchronized(m_lock) {
@@ -215,7 +215,7 @@ public class StatefulGatewayObjectImpl i
     /**
      * Based on the information about a <code>GatewayObject</code>, the
      * <code>AuditEvent</code>s available, and the deployment information that
-     * the parent repository can give, determines the status of this gateway.
+     * the parent repository can give, determines the status of this target.
      */
     void determineStatus() {
         determineRegistrationState();
@@ -388,15 +388,15 @@ public class StatefulGatewayObjectImpl i
     }
 
     /**
-     * Verifies that this object should still be around. If the gateway is represents
-     * shows up in at least the gateway repository or the auditlog, it has a reason
+     * Verifies that this object should still be around. If the target is represents
+     * shows up in at least the target repository or the auditlog, it has a reason
      * to exists; if not, it doesn't. When it is no longer necessary, it will remove itself
      * from the parent repository.
      * @return Whether or not this object should still exist.
      */
     boolean verifyExistence() {
         synchronized(m_lock) {
-            if ((m_gatewayObject == null) && ((m_processedAuditEvents == null) || m_processedAuditEvents.isEmpty())) {
+            if ((m_targetObject == null) && ((m_processedAuditEvents == null) || m_processedAuditEvents.isEmpty())) {
                 m_repository.removeStateful(this);
                 return false;
             }
@@ -406,12 +406,12 @@ public class StatefulGatewayObjectImpl i
 
     /**
      * Helper method for the delegate methods below: most of these delegate their calls to a
-     * <code>GatewayObject</code>, but in order to do so, one must be present.
+     * <code>TargetObject</code>, but in order to do so, one must be present.
      */
-    private void ensureGatewayPresent() {
-        if ((m_gatewayObject == null)) {
-            throw new IllegalStateException("This StatefulGatewayObject is not backed by a GatewayObject.");
-            // NOTE: we do not check the isDeleted state; the GatewayObject itself will notify the user of this.
+    private void ensureTargetPresent() {
+        if ((m_targetObject == null)) {
+            throw new IllegalStateException("This StatefulTargetObject is not backed by a TargetObject.");
+            // NOTE: we do not check the isDeleted state; the TargetObject itself will notify the user of this.
         }
     }
 
@@ -420,7 +420,7 @@ public class StatefulGatewayObjectImpl i
         if ((o == null) || !(o instanceof StatefulTargetObject)) {
             return false;
         }
-        return getID() == ((StatefulTargetObject) o).getID();
+        return getID().equals(((StatefulTargetObject) o).getID());
     }
 
     private void addStatusAttribute(String key, String value) {
@@ -432,7 +432,7 @@ public class StatefulGatewayObjectImpl i
     }
 
     /* ******************
-     * Delegates to GatewayObject
+     * Delegates to TargetObject
      */
 
     public String getID() {
@@ -443,31 +443,31 @@ public class StatefulGatewayObjectImpl i
         return !verifyExistence();
     }
 
-    public List<Distribution2TargetAssociation> getAssociationsWith(DistributionObject license) {
+    public List<Distribution2TargetAssociation> getAssociationsWith(DistributionObject distribution) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getAssociationsWith(license);
+            ensureTargetPresent();
+            return m_targetObject.getAssociationsWith(distribution);
         }
     }
 
     public List<DistributionObject> getDistributions() {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getDistributions();
+            ensureTargetPresent();
+            return m_targetObject.getDistributions();
         }
     }
 
     public String addAttribute(String key, String value) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.addAttribute(key, value);
+            ensureTargetPresent();
+            return m_targetObject.addAttribute(key, value);
         }
     }
 
     public String addTag(String key, String value) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.addTag(key, value);
+            ensureTargetPresent();
+            return m_targetObject.addTag(key, value);
         }
     }
 
@@ -477,8 +477,8 @@ public class StatefulGatewayObjectImpl i
             if (Arrays.binarySearch(KEYS_ALL, key) >= 0) {
                 return getStatusAttribute(key);
             }
-            ensureGatewayPresent();
-            return m_gatewayObject.getAttribute(key);
+            ensureTargetPresent();
+            return m_targetObject.getAttribute(key);
         }
     }
 
@@ -489,8 +489,8 @@ public class StatefulGatewayObjectImpl i
                 statusKeys.add(s);
             }
             Enumeration<String> attributeKeys = null;
-            if (m_gatewayObject != null) {
-                attributeKeys = m_gatewayObject.getAttributeKeys();
+            if (m_targetObject != null) {
+                attributeKeys = m_targetObject.getAttributeKeys();
             }
             return new ExtendedEnumeration<String>(attributeKeys, statusKeys, true);
         }
@@ -499,28 +499,28 @@ public class StatefulGatewayObjectImpl i
     public Dictionary<String, Object> getDictionary() {
         // build our own dictionary
         synchronized(m_lock) {
-            return new StatefulGatewayObjectDictionary();
+            return new StatefulTargetObjectDictionary();
         }
     }
 
     public String getTag(String key) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getTag(key);
+            ensureTargetPresent();
+            return m_targetObject.getTag(key);
         }
     }
 
     public Enumeration<String> getTagKeys() {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getTagKeys();
+            ensureTargetPresent();
+            return m_targetObject.getTagKeys();
         }
     }
 
     public boolean getAutoApprove() {
         synchronized(m_lock) {
-            if (m_gatewayObject != null) {
-                return m_gatewayObject.getAutoApprove();
+            if (m_targetObject != null) {
+                return m_targetObject.getAutoApprove();
             }
             else {
                 return false;
@@ -531,51 +531,51 @@ public class StatefulGatewayObjectImpl i
 
     public void setAutoApprove(boolean approve) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            m_gatewayObject.setAutoApprove(approve);
+            ensureTargetPresent();
+            m_targetObject.setAutoApprove(approve);
         }
     }
 
     @SuppressWarnings("unchecked")
     public <T extends Associatable> void add(Association association, Class<T> clazz) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            m_gatewayObject.add(association, clazz);
+            ensureTargetPresent();
+            m_targetObject.add(association, clazz);
         }
     }
 
     public <T extends Associatable> List<T> getAssociations(Class<T> clazz) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getAssociations(clazz);
+            ensureTargetPresent();
+            return m_targetObject.getAssociations(clazz);
         }
     }
 
     @SuppressWarnings("unchecked")
     public <T extends Associatable, A extends Association> List<A> getAssociationsWith(Associatable other, Class<T> clazz, Class<A> associationType) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.getAssociationsWith(other, clazz, associationType);
+            ensureTargetPresent();
+            return m_targetObject.getAssociationsWith(other, clazz, associationType);
         }
     }
 
     public <T extends Associatable> boolean isAssociated(Object obj, Class<T> clazz) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            return m_gatewayObject.isAssociated(obj, clazz);
+            ensureTargetPresent();
+            return m_targetObject.isAssociated(obj, clazz);
         }
     }
 
     @SuppressWarnings("unchecked")
     public <T extends Associatable> void remove(Association association, Class<T> clazz) {
         synchronized(m_lock) {
-            ensureGatewayPresent();
-            m_gatewayObject.remove(association, clazz);
+            ensureTargetPresent();
+            m_targetObject.remove(association, clazz);
         }
     }
 
     public String getDefinition() {
-        return "gateway-" + KEY_ID + "-" + getID();
+        return "target-" + KEY_ID + "-" + getID();
     }
 
     private class ExtendedEnumeration<T> implements Enumeration<T> {
@@ -616,12 +616,12 @@ public class StatefulGatewayObjectImpl i
         }
     }
 
-    private class StatefulGatewayObjectDictionary extends Dictionary<String, Object> {
+    private class StatefulTargetObjectDictionary extends Dictionary<String, Object> {
         private final Dictionary<String, Object> m_dict;
 
-        StatefulGatewayObjectDictionary() {
-            if (m_gatewayObject != null) {
-                m_dict = m_gatewayObject.getDictionary();
+        StatefulTargetObjectDictionary() {
+            if (m_targetObject != null) {
+                m_dict = m_targetObject.getDictionary();
             }
             else {
                 m_dict = null;
@@ -648,8 +648,8 @@ public class StatefulGatewayObjectImpl i
                     return getStatusAttribute((String) key);
                 }
             }
-            String tag = m_gatewayObject.getTag((String)key);
-            String attr = m_gatewayObject.getAttribute((String)key);
+            String tag = m_targetObject.getTag((String)key);
+            String attr = m_targetObject.getAttribute((String)key);
             if (tag == null) {
                 return attr;
             }
@@ -703,15 +703,15 @@ public class StatefulGatewayObjectImpl i
     }
 
     public String getAssociationFilter(Map<String, String> properties) {
-        throw new UnsupportedOperationException("A StatefulGatewayObject cannot return a filter; use the underlying GatewayObject instead.");
+        throw new UnsupportedOperationException("A StatefulTargetObject cannot return a filter; use the underlying TargetObject instead.");
     }
 
     public int getCardinality(Map<String, String> properties) {
-        throw new UnsupportedOperationException("A StatefulGatewayObject cannot return a cardinality; use the underlying GatewayObject instead.");
+        throw new UnsupportedOperationException("A StatefulTargetObject cannot return a cardinality; use the underlying TargetObject instead.");
     }
 
     @SuppressWarnings("unchecked")
     public Comparator getComparator() {
-        throw new UnsupportedOperationException("A StatefulGatewayObject cannot return a comparator; use the underlying GatewayObject instead.");
+        throw new UnsupportedOperationException("A StatefulTargetObject cannot return a comparator; use the underlying TargetObject instead.");
     }
 }
\ No newline at end of file

Copied: ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java (from r1301412, 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/StatefulTargetRepositoryImpl.java?p2=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java&p1=ace/trunk/ace-client-repository-impl/src/main/java/org/apache/ace/client/repository/stateful/impl/StatefulGatewayRepositoryImpl.java&r1=1301412&r2=1301449&rev=1301449&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/StatefulTargetRepositoryImpl.java Fri Mar 16 12:05:39 2012
@@ -61,35 +61,35 @@ import org.osgi.service.event.EventHandl
 import org.osgi.service.log.LogService;
 
 /**
- * Implements the StatefulGatewayRepository. If an <code>AuditLogStore</code> is present,
+ * Implements the StatefulTargetRepository. If an <code>AuditLogStore</code> is present,
  * it will be used; it is assumed that the auditlog store is up to date.
  */
-public class StatefulGatewayRepositoryImpl implements StatefulTargetRepository, EventHandler {
+public class StatefulTargetRepositoryImpl implements StatefulTargetRepository, EventHandler {
     private BundleContext m_context; /*Injected by dependency manager*/
     private ArtifactRepository m_artifactRepository; /*Injected by dependency manager*/
-    private TargetRepository m_gatewayRepository; /*Injected by dependency manager*/
+    private TargetRepository m_targetRepository; /*Injected by dependency manager*/
     private DeploymentVersionRepository m_deploymentRepository; /*Injected by dependency manager*/
     private LogStore m_auditLogStore; /*Injected by dependency manager*/
     private EventAdmin m_eventAdmin; /*Injected by dependency manager*/
     private LogService m_log; /*Injected by dependency manager*/
     private BundleHelper m_bundleHelper; /*Injected by dependency manager*/
     //TODO: Make the concurrencyLevel of this concurrent hashmap settable?
-    private Map<String, StatefulGatewayObjectImpl> m_repository = new ConcurrentHashMap<String, StatefulGatewayObjectImpl>();
-    private Map<String, StatefulGatewayObjectImpl> m_index = new ConcurrentHashMap<String, StatefulGatewayObjectImpl>();
+    private Map<String, StatefulTargetObjectImpl> m_repository = new ConcurrentHashMap<String, StatefulTargetObjectImpl>();
+    private Map<String, StatefulTargetObjectImpl> m_index = new ConcurrentHashMap<String, StatefulTargetObjectImpl>();
     private final String m_sessionID;
 
-    public StatefulGatewayRepositoryImpl(String sessionID) {
+    public StatefulTargetRepositoryImpl(String sessionID) {
         m_sessionID = sessionID;
     }
 
     public StatefulTargetObject create(Map<String, String> attributes, Map<String, String> tags) throws IllegalArgumentException {
-        throw new UnsupportedOperationException("Creating StatefulGatewayObjects is not supported.");
+        throw new UnsupportedOperationException("Creating StatefulTargetObjects is not supported.");
     }
 
     public List<StatefulTargetObject> get() {
         synchronized(m_repository) {
             List<StatefulTargetObject> result = new ArrayList<StatefulTargetObject>();
-            for (StatefulGatewayObjectImpl sgoi : m_repository.values()) {
+            for (StatefulTargetObjectImpl sgoi : m_repository.values()) {
                 result.add(sgoi);
             }
             return result;
@@ -113,24 +113,24 @@ public class StatefulGatewayRepositoryIm
     }
 
     public void remove(StatefulTargetObject entity) {
-        throw new UnsupportedOperationException("Removing StatefulGatewayObjects is not supported.");
+        throw new UnsupportedOperationException("Removing StatefulTargetObjects is not supported.");
     }
 
     public StatefulTargetObject preregister(Map<String, String> attributes, Map<String, String> tags) {
         synchronized(m_repository) {
-            TargetObject go = m_gatewayRepository.create(attributes, tags);
-            return createStateful(go.getID());
+            TargetObject to = m_targetRepository.create(attributes, tags);
+            return createStateful(to.getID());
         }
     }
 
-    public void unregister(String gatewayID) {
+    public void unregister(String targetID) {
         synchronized(m_repository) {
-            TargetObject go = getGatewayObject(gatewayID);
-            if (go == null) {
-                throw new IllegalArgumentException(gatewayID + " does not represent a GatewayObject.");
+            TargetObject to = getTargetObject(targetID);
+            if (to == null) {
+                throw new IllegalArgumentException(targetID + " does not represent a TargetObject.");
             }
             else {
-                m_gatewayRepository.remove(go);
+                m_targetRepository.remove(to);
                 // No need to inform the stateful representation; this will be done by the event handler.
             }
         }
@@ -141,54 +141,54 @@ public class StatefulGatewayRepositoryIm
     }
 
     /**
-     * Gets the <code>GatewayObject</code> which is identified by the <code>gatewayID</code>.
-     * @param gatewayID A string representing a gateway ID.
-     * @return The <code>GatewayObject</code> from the <code>GatewayRepository</code> which has the given
+     * Gets the <code>TargetObject</code> which is identified by the <code>targetID</code>.
+     * @param targetID A string representing a target ID.
+     * @return The <code>TargetObject</code> from the <code>TargetRepository</code> which has the given
      * ID, or <code>null</code> if none can be found.
      */
-    TargetObject getGatewayObject(String gatewayID) {
+    TargetObject getTargetObject(String targetID) {
 //        synchronized(m_repository) {
             try {
-                List<TargetObject> gateways = m_gatewayRepository.get(m_context.createFilter("(" + TargetObject.KEY_ID + "=" + RepositoryUtil.escapeFilterValue(gatewayID) + ")"));
-                if ((gateways != null) && (gateways.size() == 1)) {
-                    return gateways.get(0);
+                List<TargetObject> targets = m_targetRepository.get(m_context.createFilter("(" + TargetObject.KEY_ID + "=" + RepositoryUtil.escapeFilterValue(targetID) + ")"));
+                if ((targets != null) && (targets.size() == 1)) {
+                    return targets.get(0);
                 }
                 else {
                     return null;
                 }
             }
             catch (InvalidSyntaxException e) {
-                // The filter syntax is illegal, probably a bad gateway ID.
+                // The filter syntax is illegal, probably a bad target ID.
                 return null;
             }
 //        }
     }
 
     /**
-     * Gets the stateful representation of the given gateway ID.
-     * @param gatewayID A string representing a gateway ID.
-     * @return The <code>StatefulGatewayObjectImpl</code> which handles the given ID,
+     * Gets the stateful representation of the given target ID.
+     * @param targetID A string representing a target ID.
+     * @return The <code>StatefulTargetyObjectImpl</code> which handles the given ID,
      * or <code>null</code> if none can be found.
      */
-    StatefulGatewayObjectImpl getStatefulGatewayObject(String gatewayID) {
+    StatefulTargetObjectImpl getStatefulTargetObject(String targetID) {
         synchronized(m_repository) {
-            return m_repository.get(gatewayID);
+            return m_repository.get(targetID);
         }
     }
 
     /**
-     * Creates and registers a new stateful gateway object based on the given ID.
-     * @param gatewayID A string representing a gateway ID.
+     * Creates and registers a new stateful target object based on the given ID.
+     * @param targetID A string representing a target ID.
      * @return The newly created and registered <code>StatefulGatewayObjectImpl</code>.
      */
-    private StatefulGatewayObjectImpl createStateful(String gatewayID) {
+    private StatefulTargetObjectImpl createStateful(String targetID) {
         synchronized(m_repository) {
-            StatefulGatewayObjectImpl result = new StatefulGatewayObjectImpl(this, gatewayID);
+            StatefulTargetObjectImpl result = new StatefulTargetObjectImpl(this, targetID);
             if (add(result)) {
                 return result;
             }
             else {
-                throw new IllegalArgumentException("The StateGatewayObject " + gatewayID + " already exists.");
+                throw new IllegalArgumentException("The StateTargetObject " + targetID + " already exists.");
             }
         }
     }
@@ -196,9 +196,9 @@ public class StatefulGatewayRepositoryIm
     /**
      * Removes the given entity from this object's repository, and notifies
      * interested parties of this.
-     * @param entity The StatefulGatewayObjectImpl to be removed.
+     * @param entity The StatefulTargetObjectImpl to be removed.
      */
-    void removeStateful(StatefulGatewayObjectImpl entity) {
+    void removeStateful(StatefulTargetObjectImpl entity) {
         synchronized(m_repository) {
             m_repository.remove(entity.getID());
             notifyChanged(entity, StatefulTargetObject.TOPIC_REMOVED);
@@ -208,15 +208,15 @@ public class StatefulGatewayRepositoryIm
     /**
      * Adds the given stateful object to this object's repository, and notifies
      * interested parties of this change.
-     * @param sgoi A <code>StatefulGatewayObjectImpl</code> to be registered.
+     * @param stoi A <code>StatefulTargetObjectImpl</code> to be registered.
      * @return <code>true</code> when this object has been added to the repository
      * and listeners have been notified, <code>false</code> otherwise.
      */
-    boolean add(StatefulGatewayObjectImpl sgoi) {
-        if (!m_repository.containsKey(sgoi)) {
-            m_repository.put(sgoi.getID(), sgoi);
-            m_index.put(sgoi.getDefinition(), sgoi);
-            notifyChanged(sgoi, StatefulTargetObject.TOPIC_ADDED);
+    boolean add(StatefulTargetObjectImpl stoi) {
+        if (!m_repository.containsKey(stoi)) {
+            m_repository.put(stoi.getID(), stoi);
+            m_index.put(stoi.getDefinition(), stoi);
+            notifyChanged(stoi, StatefulTargetObject.TOPIC_ADDED);
             return true;
         }
         return false;
@@ -234,24 +234,24 @@ public class StatefulGatewayRepositoryIm
     };
 
     /**
-     * Gets all auditlog events which are related to a given gateway ID.
-     * @param gatewayID A string representing a gateway ID.
-     * @return a list of <code>AuditEvent</code>s related to this gateway ID,
+     * Gets all auditlog events which are related to a given target ID.
+     * @param targetID A string representing a target ID.
+     * @return a list of <code>AuditEvent</code>s related to this target ID,
      * ordered in the order they happened. If no events can be found, and empty list will be returned.
      */
-    List<LogEvent> getAuditEvents(String gatewayID) {
-        return getAuditEvents(getAllDescriptors(gatewayID));
+    List<LogEvent> getAuditEvents(String targetID) {
+        return getAuditEvents(getAllDescriptors(targetID));
     }
 
     /**
-     * Gets all auditlog descriptors which are related to a given gateway.
-     * @param gatewayID The gateway ID
+     * Gets all auditlog descriptors which are related to a given target.
+     * @param targetID The target ID
      * @return A list of LogDescriptors, in no particular order.
      */
-    List<LogDescriptor> getAllDescriptors(String gatewayID) {
+    List<LogDescriptor> getAllDescriptors(String targetID) {
         List<LogDescriptor> result = new ArrayList<LogDescriptor>();
         try {
-            List<LogDescriptor> descriptors = m_auditLogStore.getDescriptors(gatewayID);
+            List<LogDescriptor> descriptors = m_auditLogStore.getDescriptors(targetID);
             if (descriptors != null) {
                 result = descriptors;
             }
@@ -264,11 +264,11 @@ public class StatefulGatewayRepositoryIm
     }
 
     /**
-     * Gets all audit log events for a gateway is has not yet 'seen'.
+     * Gets all audit log events for a target is has not yet 'seen'.
      * @param all A list of all <code>LogDescriptor</code> from which to filter
      * the new ones.
      * @param seen A list of <code>LogDescriptor</code> objects, which indicate
-     * the items the gateway has already processed.
+     * the items the target has already processed.
      * @return All AuditLog events that are in the audit store, but are not identified
      * by <code>oldDescriptors</code>, ordered by 'happened-before'.
      */
@@ -296,8 +296,8 @@ public class StatefulGatewayRepositoryIm
         for (LogDescriptor s : all) {
             LogDescriptor diffs = s;
             for (LogDescriptor d : seen) {
-                if ((s.getLogID() == d.getLogID()) && (s.getGatewayID().equals(d.getGatewayID()))) {
-                    diffs = new LogDescriptor(s.getGatewayID(), s.getLogID(), d.getRangeSet().diffDest(s.getRangeSet()));
+                if ((s.getLogID() == d.getLogID()) && (s.getTargetID().equals(d.getTargetID()))) {
+                    diffs = new LogDescriptor(s.getTargetID(), s.getLogID(), d.getRangeSet().diffDest(s.getRangeSet()));
                 }
             }
             descriptors.add(diffs);
@@ -308,46 +308,46 @@ public class StatefulGatewayRepositoryIm
     /**
      * See {@link DeploymentRepository#getDeploymentVersion(java.lang.String)}.
      */
-    DeploymentVersionObject getMostRecentDeploymentVersion(String gatewayID) {
-        return m_deploymentRepository.getMostRecentDeploymentVersion(gatewayID);
+    DeploymentVersionObject getMostRecentDeploymentVersion(String targetID) {
+        return m_deploymentRepository.getMostRecentDeploymentVersion(targetID);
     }
 
     /**
-     * Based on the information in this stateful object, creates a <code>GatewayObject</code>
-     * in the <code>GatewayRepository</code>.
-     * This function is intended to be used for gateways which are not yet represented
-     * in the <code>GatewayRepository</code>; if they already are, an <code>IllegalArgumentException</code>
+     * Based on the information in this stateful object, creates a <code>TargetObject</code>
+     * in the <code>TargetRepository</code>.
+     * This function is intended to be used for targets which are not yet represented
+     * in the <code>TargetRepository</code>; if they already are, an <code>IllegalArgumentException</code>
      * will be thrown.
-     * @param gatewayID A string representing the ID of the new gateway.
+     * @param targetID A string representing the ID of the new target.
      */
-    void register(String gatewayID) {
+    void register(String targetID) {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(TargetObject.KEY_ID, gatewayID);
+        attr.put(TargetObject.KEY_ID, targetID);
         Map<String, String> tags = new HashMap<String, String>();
-        m_gatewayRepository.create(attr, tags);
-        getStatefulGatewayObject(gatewayID).updateGatewayObject(false);
+        m_targetRepository.create(attr, tags);
+        getStatefulTargetObject(targetID).updateTargetObject(false);
     }
 
     /**
-     * Notifies interested parties of a change to a <code>StatefulGatewayObject</code>.
-     * @param sgoi The <code>StatefulGatewayObject</code> which has changed.
+     * Notifies interested parties of a change to a <code>StatefulTargetObject</code>.
+     * @param stoi The <code>StatefulTargetObject</code> which has changed.
      * @param topic A topic string for posting the event.
      * @param additionalProperties A Properties event, already containing some extra properties. If
      * RepositoryObject.EVENT_ENTITY is used, it will be overwritten.
      */
-    void notifyChanged(StatefulTargetObject sgoi, String topic, Properties additionalProperties) {
-        additionalProperties.put(RepositoryObject.EVENT_ENTITY, sgoi);
+    void notifyChanged(StatefulTargetObject stoi, String topic, Properties additionalProperties) {
+        additionalProperties.put(RepositoryObject.EVENT_ENTITY, stoi);
         additionalProperties.put(SessionFactory.SERVICE_SID, m_sessionID);
         m_eventAdmin.postEvent(new Event(topic, (Dictionary) additionalProperties));
     }
 
     /**
-     * Notifies interested parties of a change to a <code>StatefulGatewayObject</code>.
-     * @param sgoi The <code>StatefulGatewayObject</code> which has changed.
+     * Notifies interested parties of a change to a <code>StatefulTargetObject</code>.
+     * @param stoi The <code>StatefulTargetObject</code> which has changed.
      * @param topic A topic string for posting the event.
      */
-    void notifyChanged(StatefulTargetObject sgoi, String topic) {
-        notifyChanged(sgoi, topic, new Properties());
+    void notifyChanged(StatefulTargetObject stoi, String topic) {
+        notifyChanged(stoi, topic, new Properties());
     }
 
     /**
@@ -355,45 +355,45 @@ public class StatefulGatewayRepositoryIm
      */
     private void populate() {
         synchronized(m_repository) {
-            List<StatefulGatewayObjectImpl> touched = new ArrayList<StatefulGatewayObjectImpl>();
-            touched.addAll(parseGatewayRepository());
+            List<StatefulTargetObjectImpl> touched = new ArrayList<StatefulTargetObjectImpl>();
+            touched.addAll(parseTargetRepository());
             touched.addAll(parseAuditLog());
 
             // Now, it is possible we have not touched all objects. Find out which these are, and make
             // them check whether they should still exist.
-            List<StatefulGatewayObjectImpl> all = new ArrayList<StatefulGatewayObjectImpl>(m_repository.values());
+            List<StatefulTargetObjectImpl> all = new ArrayList<StatefulTargetObjectImpl>(m_repository.values());
             all.removeAll(touched);
-            for (StatefulGatewayObjectImpl sgoi : all) {
-                sgoi.updateGatewayObject(false);
-                sgoi.updateDeploymentVersions(null);
-                sgoi.updateAuditEvents(true);
+            for (StatefulTargetObjectImpl stoi : all) {
+                stoi.updateTargetObject(false);
+                stoi.updateDeploymentVersions(null);
+                stoi.updateAuditEvents(true);
             }
             // Furthermore, for all those we _did_ see, we need to make sure their deployment versions
             // are up to date.
-            for (StatefulGatewayObjectImpl sgoi : touched) {
-                sgoi.updateDeploymentVersions(null);
-                sgoi.updateGatewayObject(true);
+            for (StatefulTargetObjectImpl stoi : touched) {
+                stoi.updateDeploymentVersions(null);
+                stoi.updateTargetObject(true);
             }
         }
     }
 
     /**
-     * Checks all inhabitants of the <code>GatewayRepository</code> to see
+     * Checks all inhabitants of the <code>TargetRepository</code> to see
      * whether we already have a stateful representation of them.
      * @param needsVerify states whether the objects which are 'touched' by this
      * actions should verify their existence.
-     * @return A list of all the gateway objects that have been touched by this action.
+     * @return A list of all the target objects that have been touched by this action.
      */
-    private List<StatefulGatewayObjectImpl> parseGatewayRepository() {
-        List<StatefulGatewayObjectImpl> result = new ArrayList<StatefulGatewayObjectImpl>();
-        for (TargetObject go : m_gatewayRepository.get()) {
-            StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(go.getID());
-            if (sgoi == null) {
-                result.add(createStateful(go.getID()));
+    private List<StatefulTargetObjectImpl> parseTargetRepository() {
+        List<StatefulTargetObjectImpl> result = new ArrayList<StatefulTargetObjectImpl>();
+        for (TargetObject to : m_targetRepository.get()) {
+            StatefulTargetObjectImpl stoi = getStatefulTargetObject(to.getID());
+            if (stoi == null) {
+                result.add(createStateful(to.getID()));
             }
             else {
-                result.add(sgoi);
-                sgoi.updateGatewayObject(false);
+                result.add(stoi);
+                stoi.updateTargetObject(false);
             }
         }
         return result;
@@ -401,12 +401,12 @@ public class StatefulGatewayRepositoryIm
 
     /**
      * Checks the audit log to see whether we already have a
-     * stateful object for all gateways mentioned there.
+     * stateful object for all targets mentioned there.
      * @param needsVerify states whether the objects which are 'touched' by this
      * actions should verify their existence.
      */
-    private List<StatefulGatewayObjectImpl> parseAuditLog() {
-        List<StatefulGatewayObjectImpl> result = new ArrayList<StatefulGatewayObjectImpl>();
+    private List<StatefulTargetObjectImpl> parseAuditLog() {
+        List<StatefulTargetObjectImpl> result = new ArrayList<StatefulTargetObjectImpl>();
         List<LogDescriptor> descriptors = null;
         try {
             descriptors = m_auditLogStore.getDescriptors();
@@ -415,28 +415,28 @@ public class StatefulGatewayRepositoryIm
             // Not much to do.
         }
         if (descriptors == null) {
-            // There is no audit log available, or it failed getting the logdescriptors.
+            // There is no audit log available, or it failed getting the log descriptors.
             return result;
         }
 
-        Set<String> gatewayIDs = new HashSet<String>();
+        Set<String> targetIDs = new HashSet<String>();
         for (LogDescriptor l : descriptors) {
-            gatewayIDs.add(l.getGatewayID());
+            targetIDs.add(l.getTargetID());
         }
 
         /* Note: the parsing of the audit log and the creation/notification of the
          * stateful objects has been separated, to prevent calling updateAuditEvents()
-         * multiple times on gateways which have more than one log.
+         * multiple times on targets which have more than one log.
          */
         synchronized(m_repository) {
-            for (String gatewayID : gatewayIDs) {
-                StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(gatewayID);
-                if (sgoi == null) {
-                    result.add(createStateful(gatewayID));
+            for (String targetID : targetIDs) {
+                StatefulTargetObjectImpl stoi = getStatefulTargetObject(targetID);
+                if (stoi == null) {
+                    result.add(createStateful(targetID));
                 }
                 else {
-                    result.add(sgoi);
-                    sgoi.updateAuditEvents(false);
+                    result.add(stoi);
+                    stoi.updateAuditEvents(false);
                 }
             }
         }
@@ -444,28 +444,28 @@ public class StatefulGatewayRepositoryIm
     }
 
     /**
-     * Approves the changes that will happen to the gateway based on the
+     * Approves the changes that will happen to the target based on the
      * changes in the shop by generating a new deployment version.
-     * @param gatewayID A string representing a gateway ID.
+     * @param targetID A string representing a target ID.
      * @return The version identifier of the new deployment package.
      * @throws java.io.IOException When there is a problem generating the deployment version.
      */
-    String approve(String gatewayID) throws IOException {
-        return generateDeploymentVersion(gatewayID).getVersion();
+    String approve(String targetID) throws IOException {
+        return generateDeploymentVersion(targetID).getVersion();
     }
 
     /**
      * Generates an array of bundle URLs which have to be deployed on
-     * the gateway, given the current state of the shop.
+     * the target, given the current state of the shop.
      * TODO: In the future, we want to add support for multiple shops.
-     * TODO: Is this prone to concurrency issues with changes license- and
-     * group objects?
-     * @param gatewayID A string representing a gateway.
+     * TODO: Is this prone to concurrency issues with changes distribution- and
+     * feature objects?
+     * @param targetID A string representing a target.
      * @return An array of artifact URLs.
      * @throws java.io.IOException When there is a problem processing an artifact for deployment.
      */
-    DeploymentArtifact[] getNecessaryDeploymentArtifacts(String gatewayID, String version) throws IOException {
-        TargetObject go = getGatewayObject(gatewayID);
+    DeploymentArtifact[] getNecessaryDeploymentArtifacts(String targetID, String version) throws IOException {
+        TargetObject to = getTargetObject(targetID);
 
         Map<ArtifactObject, String> bundles = new HashMap<ArtifactObject, String>();
         Map<ArtifactObject, String> artifacts = new HashMap<ArtifactObject, String>();
@@ -473,27 +473,27 @@ public class StatefulGatewayRepositoryIm
 
         // 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 (DistributionObject license : go.getDistributions()) {
-                for (FeatureObject group : license.getGroups()) {
-                    for (ArtifactObject artifact : group.getArtifacts()) {
+        if (to != null) {
+            for (DistributionObject distribution : to.getDistributions()) {
+                for (FeatureObject feature : distribution.getFeatures()) {
+                    for (ArtifactObject artifact : feature.getArtifacts()) {
                         if (m_bundleHelper.canUse(artifact)) {
                             bundles.put(artifact, m_bundleHelper.getResourceProcessorPIDs(artifact));
                         }
                         else {
                             artifacts.put(artifact, artifact.getProcessorPID());
                         }
-                        Map<FeatureObject, List<DistributionObject>> groupToLicense = path.get(artifact);
-                        if (groupToLicense == null) {
-                        	groupToLicense = new HashMap<FeatureObject, List<DistributionObject>>();
-                        	path.put(artifact, groupToLicense);
+                        Map<FeatureObject, List<DistributionObject>> featureToDistribution = path.get(artifact);
+                        if (featureToDistribution == null) {
+                        	featureToDistribution = new HashMap<FeatureObject, List<DistributionObject>>();
+                        	path.put(artifact, featureToDistribution);
                         }
-                        List<DistributionObject> licenses = groupToLicense.get(group);
-                        if (licenses == null) {
-                        	licenses = new ArrayList<DistributionObject>();
-                        	groupToLicense.put(group, licenses);
+                        List<DistributionObject> distributions = featureToDistribution.get(feature);
+                        if (distributions == null) {
+                        	distributions = new ArrayList<DistributionObject>();
+                        	featureToDistribution.put(feature, distributions);
                         }
-                        licenses.add(license);
+                        distributions.add(distribution);
                     }
                 }
             }
@@ -553,7 +553,7 @@ public class StatefulGatewayRepositoryIm
             if (repositoryPath != null) {
             	directives.put(DeploymentArtifact.REPOSITORY_PATH, repositoryPath);
             }
-            result.add(m_deploymentRepository.createDeploymentArtifact(m_artifactRepository.preprocessArtifact(artifact, go, gatewayID, version), directives));
+            result.add(m_deploymentRepository.createDeploymentArtifact(m_artifactRepository.preprocessArtifact(artifact, to, targetID, version), directives));
         }
 
         return result.toArray(new DeploymentArtifact[result.size()]);
@@ -561,11 +561,11 @@ public class StatefulGatewayRepositoryIm
     
     private String getRepositoryPath(ArtifactObject artifact, Map<ArtifactObject, Map<FeatureObject, List<DistributionObject>>> path) {
     	StringBuilder builder = new StringBuilder();
-        Map<FeatureObject, List<DistributionObject>> groupToLicense = path.get(artifact);
-        if (groupToLicense != null) {
-	        for (Entry<FeatureObject, List<DistributionObject>> entry : groupToLicense.entrySet()) {
-	        	for (DistributionObject l : entry.getValue()) {
-	        		builder.append(entry.getKey().getName()).append(';').append(l.getName()).append(',');
+        Map<FeatureObject, List<DistributionObject>> featureToDistribution = path.get(artifact);
+        if (featureToDistribution != null) {
+	        for (Entry<FeatureObject, List<DistributionObject>> entry : featureToDistribution.entrySet()) {
+	        	for (DistributionObject distribution : entry.getValue()) {
+	        		builder.append(entry.getKey().getName()).append(';').append(distribution.getName()).append(',');
 	        	}
 	        }
         }
@@ -577,21 +577,21 @@ public class StatefulGatewayRepositoryIm
     }
 
     /**
-     * Quick method to find all artifacts that need to be deployed to a gateway.
+     * Quick method to find all artifacts that need to be deployed to a target.
     */
-    ArtifactObject[] getNecessaryArtifacts(String gatewayID) {
+    ArtifactObject[] getNecessaryArtifacts(String targetID) {
         List<ArtifactObject> result = new ArrayList<ArtifactObject>();
-        TargetObject go = getGatewayObject(gatewayID);
+        TargetObject to = getTargetObject(targetID);
 
         Map<String, ArtifactObject> allProcessors = new HashMap<String, ArtifactObject>();
         for (ArtifactObject bundle : m_artifactRepository.getResourceProcessors()) {
             allProcessors.put(m_bundleHelper.getResourceProcessorPIDs(bundle), bundle);
         }
 
-        if (go != null) {
-            for (DistributionObject license : go.getDistributions()) {
-                for (FeatureObject group : license.getGroups()) {
-                    for (ArtifactObject artifact : group.getArtifacts()) {
+        if (to != null) {
+            for (DistributionObject distribution : to.getDistributions()) {
+                for (FeatureObject feature : distribution.getFeatures()) {
+                    for (ArtifactObject artifact : feature.getArtifacts()) {
                         result.add(artifact);
                         if (!m_bundleHelper.canUse(artifact)) {
                             ArtifactObject processor = allProcessors.get(artifact.getProcessorPID());
@@ -610,19 +610,19 @@ public class StatefulGatewayRepositoryIm
     }
 
     /**
-     * Generates a new deployment version for the the given gateway,
-     * based on the bundles it is linked to by the licenses it is
+     * Generates a new deployment version for the the given target,
+     * based on the artifacts it is linked to by the distributions it is
      * associated to.
-     * @param gatewayID A string representing a gateway.
-     * @return A new DeploymentVersionObject, representing this new version for the gateway.
+     * @param targetID A string representing a target.
+     * @return A new DeploymentVersionObject, representing this new version for the target.
      * @throws java.io.IOException When there is a problem determining the artifacts to be deployed.
      */
-    DeploymentVersionObject generateDeploymentVersion(String gatewayID) throws IOException {
+    DeploymentVersionObject generateDeploymentVersion(String targetID) throws IOException {
         Map<String, String> attr = new HashMap<String, String>();
-        attr.put(DeploymentVersionObject.KEY_TARGETID, gatewayID);
+        attr.put(DeploymentVersionObject.KEY_TARGETID, targetID);
         Map<String, String> tags = new HashMap<String, String>();
 
-        DeploymentVersionObject mostRecentDeploymentVersion = getMostRecentDeploymentVersion(gatewayID);
+        DeploymentVersionObject mostRecentDeploymentVersion = getMostRecentDeploymentVersion(targetID);
         String nextVersion;
         if (mostRecentDeploymentVersion == null) {
             nextVersion = nextVersion(null);
@@ -633,14 +633,14 @@ public class StatefulGatewayRepositoryIm
         attr.put(DeploymentVersionObject.KEY_VERSION, nextVersion);
 
         synchronized(m_repository) {
-            DeploymentVersionObject result = m_deploymentRepository.create(attr, tags, getNecessaryDeploymentArtifacts(gatewayID, nextVersion));
+            DeploymentVersionObject result = m_deploymentRepository.create(attr, tags, getNecessaryDeploymentArtifacts(targetID, nextVersion));
 
-            StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(gatewayID);
-            if (sgoi == null) {
-                createStateful(gatewayID);
+            StatefulTargetObjectImpl stoi = getStatefulTargetObject(targetID);
+            if (stoi == null) {
+                createStateful(targetID);
             }
             else {
-                sgoi.updateDeploymentVersions(result);
+                stoi.updateDeploymentVersions(result);
             }
 
             return result;
@@ -672,12 +672,12 @@ public class StatefulGatewayRepositoryIm
         if (event.getTopic().equals(TargetObject.TOPIC_ADDED) || event.getTopic().equals(TargetObject.TOPIC_REMOVED)) {
             synchronized(m_repository) {
                 String id = ((TargetObject) event.getProperty(RepositoryObject.EVENT_ENTITY)).getID();
-                StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(id);
-                if (sgoi == null) {
+                StatefulTargetObjectImpl stoi = getStatefulTargetObject(id);
+                if (stoi == null) {
                     createStateful(id);
                 }
                 else {
-                    sgoi.updateGatewayObject(true);
+                    stoi.updateTargetObject(true);
                 }
             }
         }
@@ -685,12 +685,12 @@ public class StatefulGatewayRepositoryIm
             synchronized(m_repository) {
                 DeploymentVersionObject deploymentVersionObject = ((DeploymentVersionObject) event.getProperty(RepositoryObject.EVENT_ENTITY));
                 String id = deploymentVersionObject.getTargetID();
-                StatefulGatewayObjectImpl sgoi = getStatefulGatewayObject(id);
-                if (sgoi == null) {
+                StatefulTargetObjectImpl stoi = getStatefulTargetObject(id);
+                if (stoi == null) {
                     createStateful(id);
                 }
                 else {
-                    sgoi.updateDeploymentVersions(deploymentVersionObject);
+                    stoi.updateDeploymentVersions(deploymentVersionObject);
                 }
             }
         }
@@ -706,16 +706,16 @@ public class StatefulGatewayRepositoryIm
         }
         else {
             // Something else has changed; however, the entire shop may have an influence on
-            // any gateway, so recheck everything.
+            // any target, so recheck everything.
             synchronized(m_repository) {
-                for (StatefulGatewayObjectImpl sgoi : m_repository.values()) {
-                    sgoi.determineStatus();
+                for (StatefulTargetObjectImpl stoi : m_repository.values()) {
+                    stoi.determineStatus();
                 }
             }
         }
     }
 
-    boolean needsNewVersion(ArtifactObject artifact, String gatewayID, String version) {
-        return m_artifactRepository.needsNewVersion(artifact, getGatewayObject(gatewayID), gatewayID, version);
+    boolean needsNewVersion(ArtifactObject artifact, String targetID, String version) {
+        return m_artifactRepository.needsNewVersion(artifact, getTargetObject(targetID), targetID, version);
     }
 }
\ No newline at end of file

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=1301449&r1=1301448&r2=1301449&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 12:05:39 2012
@@ -65,12 +65,12 @@ import org.testng.annotations.Test;
 public class ModelTest {
 
     private ArtifactRepositoryImpl m_artifactRepository;
-    private GroupRepositoryImpl m_groupRepository;
-    private Artifact2GroupAssociationRepositoryImpl m_artifact2groupRepository;
-    private LicenseRepositoryImpl m_licenseRepository;
-    private Group2LicenseAssociationRepositoryImpl m_group2licenseRepository;
-    private GatewayRepositoryImpl m_gatewayRepository;
-    private License2GatewayAssociationRepositoryImpl m_license2gatewayRepository;
+    private FeatureRepositoryImpl m_groupRepository;
+    private Artifact2FeatureAssociationRepositoryImpl m_artifact2groupRepository;
+    private DistributionRepositoryImpl m_licenseRepository;
+    private Feature2DistributionAssociationRepositoryImpl m_group2licenseRepository;
+    private TargetRepositoryImpl m_gatewayRepository;
+    private Distribution2TargetAssociationRepositoryImpl m_license2gatewayRepository;
     private DeploymentVersionRepositoryImpl m_deploymentVersionRepository;
     private RepositoryAdminImpl m_repositoryAdmin;
 
@@ -92,17 +92,17 @@ public class ModelTest {
         TestUtils.configureObject(m_artifactRepository, LogService.class);
         TestUtils.configureObject(m_artifactRepository, BundleContext.class, bc);
         m_artifactRepository.addHelper(BundleHelper.MIMETYPE, m_bundleHelper);
-        m_groupRepository = new GroupRepositoryImpl(notifier);
+        m_groupRepository = new FeatureRepositoryImpl(notifier);
         TestUtils.configureObject(m_groupRepository, BundleContext.class, bc);
-        m_artifact2groupRepository = new Artifact2GroupAssociationRepositoryImpl(m_artifactRepository, m_groupRepository, notifier);
+        m_artifact2groupRepository = new Artifact2FeatureAssociationRepositoryImpl(m_artifactRepository, m_groupRepository, notifier);
         TestUtils.configureObject(m_artifact2groupRepository, BundleContext.class, bc);
-        m_licenseRepository = new LicenseRepositoryImpl(notifier);
+        m_licenseRepository = new DistributionRepositoryImpl(notifier);
         TestUtils.configureObject(m_licenseRepository, BundleContext.class, bc);
-        m_group2licenseRepository = new Group2LicenseAssociationRepositoryImpl(m_groupRepository, m_licenseRepository, notifier);
+        m_group2licenseRepository = new Feature2DistributionAssociationRepositoryImpl(m_groupRepository, m_licenseRepository, notifier);
         TestUtils.configureObject(m_group2licenseRepository, BundleContext.class, bc);
-        m_gatewayRepository = new GatewayRepositoryImpl(notifier);
+        m_gatewayRepository = new TargetRepositoryImpl(notifier);
         TestUtils.configureObject(m_gatewayRepository, BundleContext.class, bc);
-        m_license2gatewayRepository = new License2GatewayAssociationRepositoryImpl(m_licenseRepository, m_gatewayRepository, notifier);
+        m_license2gatewayRepository = new Distribution2TargetAssociationRepositoryImpl(m_licenseRepository, m_gatewayRepository, notifier);
         TestUtils.configureObject(m_license2gatewayRepository, BundleContext.class, bc);
         m_deploymentVersionRepository = new DeploymentVersionRepositoryImpl(notifier);
         TestUtils.configureObject(m_deploymentVersionRepository, BundleContext.class, bc);
@@ -145,7 +145,7 @@ public class ModelTest {
         }
 
         // Even though the bundle is not yet associated to a group, try to get its groups.
-        List<FeatureObject> groups = b.getGroups();
+        List<FeatureObject> groups = b.getFeatures();
 
         assert groups.size() == 0 : "The bundle is not associated, so it should not return any groups.";
 
@@ -346,8 +346,8 @@ 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<FeatureObject> b1groups = b1.getGroups();
-        List<FeatureObject> b2groups = b2.getGroups();
+        List<FeatureObject> b1groups = b1.getFeatures();
+        List<FeatureObject> b2groups = b2.getFeatures();
 
         List<ArtifactObject> g1bundles = g1.getArtifacts();
         List<ArtifactObject> g2bundles = g2.getArtifacts();
@@ -384,8 +384,8 @@ public class ModelTest {
 
         m_artifact2groupRepository.remove(b2g4);
 
-        b1groups = b1.getGroups();
-        b2groups = b2.getGroups();
+        b1groups = b1.getFeatures();
+        b2groups = b2.getFeatures();
         g1bundles = g1.getArtifacts();
         g2bundles = g2.getArtifacts();
         g3bundles = g3.getArtifacts();
@@ -421,8 +421,8 @@ public class ModelTest {
         assert g1.getArtifacts().size() == 0 : "Group 1 should not be associated with any bundles; it is associated with " + g1.getArtifacts().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() + ".";
+        assert l1.getFeatures().size() == 1 : "License 1 should be associated with exactly one group; it is associated with " + l1.getFeatures().size() + ".";
+        assert l1.getTargets().size() == 0 : "License 1 should not be associated with any gateways; it is associated with " + l1.getTargets().size() + ".";
     }
 
     /**
@@ -438,8 +438,8 @@ public class ModelTest {
         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 l1.getFeatures().size() == 0 : "License 1 should not be associated with any groups; it is associated with " + l1.getFeatures().size() + ".";
+        assert l1.getTargets().size() == 1 : "License 1 should be associated with exactly one gateway; it is associated with " + l1.getTargets().size() + ".";
 
         assert g1.getDistributions().size() == 1 : "Gateway 1 should be associated with exactly one license; it is associated with " + g1.getDistributions().size() + ".";
     }
@@ -589,13 +589,13 @@ 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<FeatureObject> foundGroups = b1.getGroups();
+        List<FeatureObject> foundGroups = b1.getFeatures();
         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";
         assert foundGroups.contains(g3) : "b1 should be associated with g3";
 
-        foundGroups = b3.getGroups();
+        foundGroups = b3.getFeatures();
         assert foundGroups.size() == 0 : "b3 should not be associated with any groups.";
 
         List<ArtifactObject> foundBundles = g3.getArtifacts();
@@ -630,7 +630,7 @@ public class ModelTest {
         props.put(Association.RIGHT_CARDINALITY, "3");
 
         Artifact2FeatureAssociation bg = m_artifact2groupRepository.create(props, tags);
-        assert b1.getGroups().size() == 3 : "The bundle should be associated to three groups.";
+        assert b1.getFeatures().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.";
         assert (g3.getArtifacts().size() == 1) && g3.getArtifacts().contains(b1) : "g1 should be associated to only b1.";

Modified: ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java (original)
+++ ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java Fri Mar 16 12:05:39 2012
@@ -220,8 +220,8 @@ public class RepositoryAdminTest extends
         assert (gtl.getRight().size() == 1) && gtl.getRight().contains(l1) : "The right side of the GtL-association should be l1.";
         assert bg.isSatisfied() : "The bundlegroup association should be satisfied.";
         assert gtl.isSatisfied() : "The group2license association should be satisfied.";
-        assert b1.getGroups().size() == 1 : "Bundle b1 should be associated to one group.";
-        assert l1.getGroups().size() == 1 : "License l1 should be associated to one group.";
+        assert b1.getFeatures().size() == 1 : "Bundle b1 should be associated to one group.";
+        assert l1.getFeatures().size() == 1 : "License l1 should be associated to one group.";
 
         //remove the group
         runAndWaitForEvent(new Callable<Object>() {
@@ -234,8 +234,8 @@ public class RepositoryAdminTest extends
         assert !gtl.isSatisfied() : "The bundlegroup association shouldn not be satisfied.";
         assert !bg.isSatisfied() : "The group2license assocation should not be satisfied.";
 
-        assert b1.getGroups().size() == 0 : "Bundle b1 shouldn't be associated to any group, but is associated to " + b1.getGroups();
-        assert l1.getGroups().size() == 0 : "License l1 shouldn't be associated to any group.";
+        assert b1.getFeatures().size() == 0 : "Bundle b1 shouldn't be associated to any group, but is associated to " + b1.getFeatures();
+        assert l1.getFeatures().size() == 0 : "License l1 shouldn't be associated to any group.";
 
         cleanUp();
     }
@@ -255,7 +255,7 @@ public class RepositoryAdminTest extends
 
         assert (bg.getLeft().size() == 1) && bg.getLeft().contains(b1) : "The left side of the association should now be b1; we find " + bg.getLeft().size() + " bundles on the left side of the association.";
         assert (bg.getRight().size() == 1) && bg.getRight().contains(g1) : "The right side of the association should now be g1.";
-        assert b1.getGroups().get(0) == g1 : "b1 should be assocated with g1";
+        assert b1.getFeatures().get(0) == g1 : "b1 should be assocated with g1";
         assert g1.getArtifacts().get(0) == b1 : "g1 should be assocated with b1";
 
         final ArtifactObject b2 = runAndWaitForEvent(new Callable<ArtifactObject>() {
@@ -267,8 +267,8 @@ public class RepositoryAdminTest extends
         assert (bg.getLeft().size() == 1) && !bg.getLeft().contains(b1) : "The left side of the association should no longer be b1; we find " + bg.getLeft().size() + " bundles.";
         assert (bg.getLeft().size() == 1) && bg.getLeft().contains(b2) : "The left side of the association should now be b2.";
         assert (bg.getRight().size() == 1) && bg.getRight().contains(g1) : "The right side of the association should now be g1.";
-        assert b1.getGroups().size() == 0 : "b1 should not be associated with any group.";
-        assert b2.getGroups().get(0) == g1 : "b2 should now be assocation with g1";
+        assert b1.getFeatures().size() == 0 : "b1 should not be associated with any group.";
+        assert b2.getFeatures().get(0) == g1 : "b2 should now be assocation with g1";
         assert g1.getArtifacts().get(0) == b2 : "g1 should be assocation with b2";
         assert g1.getArtifacts().size() == 1 : "g1 should be associated with one bundle";
 
@@ -278,9 +278,9 @@ public class RepositoryAdminTest extends
         assert (bg.getLeft().size() == 1) && bg.getLeft().contains(b2) : "The left side of the association should now be b2.";
         assert (bg.getLeft().size() == 1) && !bg.getLeft().contains(b3) : "The left side of the association should not be b3.";
         assert (bg.getRight().size() == 1) && bg.getRight().contains(g1) : "The right side of the association should now be g1.";
-        assert b1.getGroups().size() == 0 : "b1 should not be associated with any group.";
-        assert b2.getGroups().get(0) == g1 : "b2 should now be assocation with g1";
-        assert b3.getGroups().size() == 0 : "b3 should not be associated with any group.";
+        assert b1.getFeatures().size() == 0 : "b1 should not be associated with any group.";
+        assert b2.getFeatures().get(0) == g1 : "b2 should now be assocation with g1";
+        assert b3.getFeatures().size() == 0 : "b3 should not be associated with any group.";
         assert g1.getArtifacts().get(0) == b2 : "g1 should be assocation with b2";
         assert g1.getArtifacts().size() == 1 : "g1 should be associated with one bundle";
 
@@ -291,10 +291,10 @@ public class RepositoryAdminTest extends
         assert (bg.getLeft().size() == 1) && bg.getLeft().contains(b2) : "The left side of the association should now be b2.";
         assert (bg.getLeft().size() == 1) && !bg.getLeft().contains(b3) : "The left side of the association should not be b3.";
         assert (bg.getRight().size() == 1) && bg.getRight().contains(g1) : "The right side of the association should now be g1.";
-        assert b1.getGroups().size() == 0 : "b1 should not be associated with any group.";
-        assert b15.getGroups().size() == 0 : "b15 should not be associated with any group.";
-        assert b2.getGroups().get(0) == g1 : "b2 should now be assocation with g1";
-        assert b3.getGroups().size() == 0 : "b3 should not be associated with any group.";
+        assert b1.getFeatures().size() == 0 : "b1 should not be associated with any group.";
+        assert b15.getFeatures().size() == 0 : "b15 should not be associated with any group.";
+        assert b2.getFeatures().get(0) == g1 : "b2 should now be assocation with g1";
+        assert b3.getFeatures().size() == 0 : "b3 should not be associated with any group.";
         assert g1.getArtifacts().get(0) == b2 : "g1 should be assocation with b2";
         assert g1.getArtifacts().size() == 1 : "g1 should be associated with one bundle";
 
@@ -311,9 +311,9 @@ public class RepositoryAdminTest extends
         assert (bg.getLeft().size() == 1) && bg.getLeft().contains(b15) : "The left side of the association should now be b15.";
         assert (bg.getLeft().size() == 1) && !bg.getLeft().contains(b3) : "The left side of the association should not be b3.";
         assert (bg.getRight().size() == 1) && bg.getRight().contains(g1) : "The right side of the association should now be g1.";
-        assert b1.getGroups().size() == 0 : "b1 should not be associated with any group.";
-        assert b15.getGroups().get(0) == g1 : "b15 should now be assocation with g1";
-        assert b3.getGroups().size() == 0 : "b3 should not be associated with any group.";
+        assert b1.getFeatures().size() == 0 : "b1 should not be associated with any group.";
+        assert b15.getFeatures().get(0) == g1 : "b15 should now be assocation with g1";
+        assert b3.getFeatures().size() == 0 : "b3 should not be associated with any group.";
         assert g1.getArtifacts().get(0) == b15 : "g1 should be assocation with b15";
         assert g1.getArtifacts().size() == 1 : "g1 should be associated with one bundle";
 

Modified: ace/trunk/ace-log-servlet/src/main/java/org/apache/ace/server/log/servlet/LogServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-log-servlet/src/main/java/org/apache/ace/server/log/servlet/LogServlet.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-log-servlet/src/main/java/org/apache/ace/server/log/servlet/LogServlet.java (original)
+++ ace/trunk/ace-log-servlet/src/main/java/org/apache/ace/server/log/servlet/LogServlet.java Fri Mar 16 12:05:39 2012
@@ -160,7 +160,7 @@ public class LogServlet extends HttpServ
             // gateway and log id are specified, return only the events that are in the range that matches these id's
             if (range != null) {
                 LogDescriptor storeDescriptor = m_store.getDescriptor(gatewayID, Long.parseLong(logID));
-                outputRange(output, new LogDescriptor(storeDescriptor.getGatewayID(), storeDescriptor.getLogID(), new SortedRangeSet(range)));
+                outputRange(output, new LogDescriptor(storeDescriptor.getTargetID(), storeDescriptor.getLogID(), new SortedRangeSet(range)));
             }
             else {
                 outputRange(output, m_store.getDescriptor(gatewayID, Long.parseLong(logID)));

Modified: ace/trunk/ace-log-servlet/src/test/java/org/apache/ace/server/log/servlet/LogServletTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-log-servlet/src/test/java/org/apache/ace/server/log/servlet/LogServletTest.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-log-servlet/src/test/java/org/apache/ace/server/log/servlet/LogServletTest.java (original)
+++ ace/trunk/ace-log-servlet/src/test/java/org/apache/ace/server/log/servlet/LogServletTest.java Fri Mar 16 12:05:39 2012
@@ -62,7 +62,7 @@ public class LogServletTest {
     @Test(groups = { UNIT })
     public void queryLog() throws Exception {
         MockServletOutputStream output = new MockServletOutputStream();
-        boolean result = m_logServlet.handleQuery(m_range.getGatewayID(), String.valueOf(m_range.getLogID()), null, output);
+        boolean result = m_logServlet.handleQuery(m_range.getTargetID(), String.valueOf(m_range.getLogID()), null, output);
         assert result;
         assert m_range.toRepresentation().equals(output.m_text);
         output.m_text = "";
@@ -74,14 +74,14 @@ public class LogServletTest {
     @Test(groups = { UNIT })
     public void receiveLog() throws Exception {
         MockServletOutputStream output = new MockServletOutputStream();
-        boolean result = m_logServlet.handleReceive(m_range.getGatewayID(), String.valueOf(m_range.getLogID()), "1", null, output);
+        boolean result = m_logServlet.handleReceive(m_range.getTargetID(), String.valueOf(m_range.getLogID()), "1", null, output);
         assert result;
         String expected = m_event1.toRepresentation() + "\n";
         String actual = output.m_text;
         assert expected.equals(actual) : "We expected '" + expected + "', but received '" + actual + "'";
 
         output = new MockServletOutputStream();
-        result = m_logServlet.handleReceive(m_range.getGatewayID(), String.valueOf(m_range.getLogID()), null , null, output);
+        result = m_logServlet.handleReceive(m_range.getTargetID(), String.valueOf(m_range.getLogID()), null , null, output);
         assert result;
         expected = m_event1.toRepresentation() + "\n" + m_event2.toRepresentation() + "\n";
         actual = output.m_text;

Modified: ace/trunk/ace-log-task/src/main/java/org/apache/ace/server/log/task/LogSyncTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-log-task/src/main/java/org/apache/ace/server/log/task/LogSyncTask.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-log-task/src/main/java/org/apache/ace/server/log/task/LogSyncTask.java (original)
+++ ace/trunk/ace-log-task/src/main/java/org/apache/ace/server/log/task/LogSyncTask.java Fri Mar 16 12:05:39 2012
@@ -181,7 +181,7 @@ public class LogSyncTask implements Runn
                  * simply be ignored.
                  */
                 receiveConnection = new Connection(new URL(host, m_endpoint + "/" + COMMAND_RECEIVE + "?" + GWID_KEY +
-                    "=" + l.getGatewayID() + "&" + LOGID_KEY + "=" + l.getLogID() + "&" + RANGE_KEY + "=" + l.getRangeSet().toRepresentation()));
+                    "=" + l.getTargetID() + "&" + LOGID_KEY + "=" + l.getLogID() + "&" + RANGE_KEY + "=" + l.getRangeSet().toRepresentation()));
                 InputStream receiveInput = receiveConnection.getInputStream();
                 BufferedReader reader = new BufferedReader(new InputStreamReader(receiveInput));
                 readLogs(reader);
@@ -229,10 +229,10 @@ public class LogSyncTask implements Runn
         for (LogDescriptor s : source) {
             LogDescriptor diffs = s;
             for (LogDescriptor d : destination) {
-                if ((s.getLogID() == d.getLogID()) && (s.getGatewayID().equals(d.getGatewayID()))) {
+                if ((s.getLogID() == d.getLogID()) && (s.getTargetID().equals(d.getTargetID()))) {
                     SortedRangeSet rangeDiff = d.getRangeSet().diffDest(s.getRangeSet());
                     if (!isEmptyRangeSet(rangeDiff)) {
-                        diffs = new LogDescriptor(s.getGatewayID(), s.getLogID(), rangeDiff);
+                        diffs = new LogDescriptor(s.getTargetID(), s.getLogID(), rangeDiff);
                     }
                     else {
                         diffs = null;

Modified: ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogDescriptor.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogDescriptor.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogDescriptor.java (original)
+++ ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogDescriptor.java Fri Mar 16 12:05:39 2012
@@ -80,7 +80,7 @@ public class LogDescriptor {
      *
      * @return Unique gateway identifier.
      */
-    public String getGatewayID() {
+    public String getTargetID() {
         return m_gatewayID;
     }
 

Modified: ace/trunk/ace-log/src/test/java/org/apache/ace/log/LogDescriptorTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-log/src/test/java/org/apache/ace/log/LogDescriptorTest.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-log/src/test/java/org/apache/ace/log/LogDescriptorTest.java (original)
+++ ace/trunk/ace-log/src/test/java/org/apache/ace/log/LogDescriptorTest.java Fri Mar 16 12:05:39 2012
@@ -34,7 +34,7 @@ public class LogDescriptorTest {
     @Test(groups = { UNIT })
     public void deserializeDescriptor() {
         LogDescriptor descriptor = new LogDescriptor("gwid,1,2-3");
-        assert descriptor.getGatewayID().equals("gwid") : "Gateway ID not correctly parsed.";
+        assert descriptor.getTargetID().equals("gwid") : "Gateway ID not correctly parsed.";
         assert descriptor.getLogID() == 1 : "Log ID not correctly parsed.";
         assert descriptor.getRangeSet().toRepresentation().equals("2-3") : "There should be nothing in the diff between the set in the descriptor and the check-set.";
     }
@@ -42,7 +42,7 @@ public class LogDescriptorTest {
     @Test(groups = { UNIT })
     public void deserializeMultiRangeDescriptor() {
         LogDescriptor descriptor = new LogDescriptor("gwid,1,1-4$k6$k8$k10-20");
-        assert descriptor.getGatewayID().equals("gwid") : "Gateway ID not correctly parsed.";
+        assert descriptor.getTargetID().equals("gwid") : "Gateway ID not correctly parsed.";
         assert descriptor.getLogID() == 1 : "Log ID not correctly parsed.";
         String representation = descriptor.getRangeSet().toRepresentation();
         assert representation.equals("1-4,6,8,10-20") : "There should be nothing in the diff between the set in the descriptor and the check-set, but we parsed: " + representation;
@@ -52,7 +52,7 @@ public class LogDescriptorTest {
     public void deserializeMultiRangeDescriptorWithFunnyGWID() {
         String line = "gw$$id,1,1-4$k6$k8$k10-20";
         LogDescriptor descriptor = new LogDescriptor(line);
-        assert descriptor.getGatewayID().equals("gw$id") : "Gateway ID not correctly parsed.";
+        assert descriptor.getTargetID().equals("gw$id") : "Gateway ID not correctly parsed.";
         assert descriptor.getLogID() == 1 : "Log ID not correctly parsed.";
         assert line.equals(descriptor.toRepresentation()) : "Converting the line back to the representation failed.";
         String representation = descriptor.getRangeSet().toRepresentation();

Modified: ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/impl/LogStoreImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/impl/LogStoreImpl.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/impl/LogStoreImpl.java (original)
+++ ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/impl/LogStoreImpl.java Fri Mar 16 12:05:39 2012
@@ -77,7 +77,7 @@ public class LogStoreImpl implements Log
         BufferedReader in = null;
         try {
             File log = new File(new File(m_dir,
-                    gatewayIDToFilename(descriptor.getGatewayID())),
+                    gatewayIDToFilename(descriptor.getTargetID())),
                     String.valueOf(descriptor.getLogID()));
             if (!log.isFile()) {
                 return result;

Modified: ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java?rev=1301449&r1=1301448&r2=1301449&view=diff
==============================================================================
--- ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java (original)
+++ ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java Fri Mar 16 12:05:39 2012
@@ -77,8 +77,8 @@ public class ServerLogStoreTester {
         assert m_logStore.getDescriptors().size() == 3 * 4 : "Incorrect amount of ranges returned from store";
         List<LogEvent> stored = new ArrayList<LogEvent>();
         for (LogDescriptor range : m_logStore.getDescriptors()) {
-            for (LogDescriptor range2 : m_logStore.getDescriptors(range.getGatewayID())) {
-                stored.addAll(m_logStore.get(m_logStore.getDescriptor(range2.getGatewayID(), range2.getLogID())));
+            for (LogDescriptor range2 : m_logStore.getDescriptors(range.getTargetID())) {
+                stored.addAll(m_logStore.get(m_logStore.getDescriptor(range2.getTargetID(), range2.getLogID())));
             }
         }
 



Mime
View raw message