sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1637333 [4/12] - in /sling/trunk/contrib/extensions: distribution/ distribution/core/ distribution/core/src/main/java/org/apache/sling/distribution/ distribution/core/src/main/java/org/apache/sling/distribution/agent/ distribution/core/src...
Date Fri, 07 Nov 2014 10:28:08 GMT
Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/monitor/ReplicationQueueHealthCheck.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/monitor/ReplicationQueueHealthCheck.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/monitor/ReplicationQueueHealthCheck.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.monitor;
+package org.apache.sling.distribution.monitor;
 
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -36,37 +36,36 @@ import org.apache.sling.commons.osgi.Pro
 import org.apache.sling.hc.api.HealthCheck;
 import org.apache.sling.hc.api.Result;
 import org.apache.sling.hc.util.FormattingResultLog;
-import org.apache.sling.replication.agent.ReplicationAgent;
-import org.apache.sling.replication.queue.ReplicationQueue;
-import org.apache.sling.replication.queue.ReplicationQueueItem;
-import org.apache.sling.replication.queue.ReplicationQueueItemState;
-import org.apache.sling.replication.queue.ReplicationQueueProvider;
+import org.apache.sling.distribution.agent.DistributionAgent;
+import org.apache.sling.distribution.queue.DistributionQueue;
+import org.apache.sling.distribution.queue.DistributionQueueItem;
+import org.apache.sling.distribution.queue.DistributionQueueItemState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * {@link HealthCheck} that checks if replication queues' first item has been retried more than a configurable amount
+ * {@link HealthCheck} that checks if distribution queues' first item has been retried more than a configurable amount
  * of times
  */
 @Component(immediate = true,
         metatype = true,
-        label = "Apache Sling Replication Queue Health Check")
+        label = "Apache Sling Distribution Queue Health Check")
 @Properties({
-        @Property(name = HealthCheck.NAME, value = "SlingReplicationQueueHC", description = "Health Check name", label = "Name"),
+        @Property(name = HealthCheck.NAME, value = "SlingDistributionQueueHC", description = "Health Check name", label = "Name"),
         @Property(name = HealthCheck.TAGS, unbounded = PropertyUnbounded.ARRAY, description = "Health Check tags", label = "Tags"),
-        @Property(name = HealthCheck.MBEAN_NAME, value = "slingReplicationQueue", description = "Health Check MBean name", label = "MBean name")
+        @Property(name = HealthCheck.MBEAN_NAME, value = "slingDistributionQueue", description = "Health Check MBean name", label = "MBean name")
 })
 @References({
-        @Reference(name = "replicationAgent",
-                referenceInterface = ReplicationAgent.class,
+        @Reference(name = "distributionAgent",
+                referenceInterface = DistributionAgent.class,
                 cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
                 policy = ReferencePolicy.DYNAMIC)
 })
 
 @Service(value = HealthCheck.class)
-public class ReplicationQueueHealthCheck implements HealthCheck {
+public class DistributionQueueHealthCheck implements HealthCheck {
 
-    private static final Logger log = LoggerFactory.getLogger(ReplicationQueueHealthCheck.class);
+    private static final Logger log = LoggerFactory.getLogger(DistributionQueueHealthCheck.class);
 
     private static final int DEFAULT_NUMBER_OF_RETRIES_ALLOWED = 3;
 
@@ -75,7 +74,7 @@ public class ReplicationQueueHealthCheck
     @Property(intValue = DEFAULT_NUMBER_OF_RETRIES_ALLOWED, description = "Number of allowed retries", label = "Allowed retries")
     private static final String NUMBER_OF_RETRIES_ALLOWED = "numberOfRetriesAllowed";
 
-    private final List<ReplicationAgent> replicationAgents = new CopyOnWriteArrayList<ReplicationAgent>();
+    private final List<DistributionAgent> distributionAgents = new CopyOnWriteArrayList<DistributionAgent>();
 
     @Activate
     public void activate(final Map<String, Object> properties) {
@@ -85,33 +84,33 @@ public class ReplicationQueueHealthCheck
 
     @Deactivate
     protected void deactivate() {
-        replicationAgents.clear();
+        distributionAgents.clear();
     }
 
-    protected void bindReplicationAgent(final ReplicationAgent replicationAgent) {
-        replicationAgents.add(replicationAgent);
+    protected void bindDistributionAgent(final DistributionAgent distributionAgent) {
+        distributionAgents.add(distributionAgent);
 
-        log.debug("Registering replication agent {} ", replicationAgent);
+        log.debug("Registering distribution agent {} ", distributionAgent);
     }
 
-    protected void unbindReplicationAgent(final ReplicationAgent replicationAgent) {
-        replicationAgents.remove(replicationAgent);
-        log.debug("Unregistering replication agent {} ", replicationAgent);
+    protected void unbindDistributionAgent(final DistributionAgent distributionAgent) {
+        distributionAgents.remove(distributionAgent);
+        log.debug("Unregistering distribution agent {} ", distributionAgent);
     }
 
     public Result execute() {
         final FormattingResultLog resultLog = new FormattingResultLog();
         Map<String, Integer> failures = new HashMap<String, Integer>();
-        if (replicationAgents.size() > 0) {
+        if (distributionAgents.size() > 0) {
 
-            for (ReplicationAgent replicationAgent : replicationAgents) {
-                for (String queueName : replicationAgent.getQueueNames()) {
+            for (DistributionAgent distributionAgent : distributionAgents) {
+                for (String queueName : distributionAgent.getQueueNames()) {
                     try {
-                        ReplicationQueue q = replicationAgent.getQueue(queueName);
+                        DistributionQueue q = distributionAgent.getQueue(queueName);
 
-                        ReplicationQueueItem item = q.getHead();
+                        DistributionQueueItem item = q.getHead();
                         if (item != null) {
-                            ReplicationQueueItemState status = q.getStatus(item);
+                            DistributionQueueItemState status = q.getStatus(item);
                             if (status.getAttempts() <= numberOfRetriesAllowed) {
                                 resultLog.debug("Queue: [{}], first item: [{}], number of retries: {}", q.getName(), item.getId(), status.getAttempts());
                             } else {
@@ -125,18 +124,18 @@ public class ReplicationQueueHealthCheck
                         }
 
                     } catch (Exception e) {
-                        resultLog.warn("Exception while inspecting replication queue [{}]: {}", queueName, e);
+                        resultLog.warn("Exception while inspecting distribution queue [{}]: {}", queueName, e);
                     }
                 }
             }
         } else {
-            resultLog.debug("No replication queue providers found");
+            resultLog.debug("No distribution queue providers found");
         }
 
         if (failures.size() > 0) {
             // a specific log entry (using markdown) to provide a recommended user action
             for (Map.Entry<String, Integer> entry : failures.entrySet()) {
-                resultLog.warn("Replication queue {}'s first item in the default queue has been retried {} times (threshold: {})",
+                resultLog.warn("Distribution queue {}'s first item in the default queue has been retried {} times (threshold: {})",
                         entry.getKey(), entry.getValue(), numberOfRetriesAllowed);
             }
         }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackage.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackage.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackage.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 import aQute.bnd.annotation.ConsumerType;
 
@@ -26,14 +26,14 @@ import java.io.InputStream;
 import java.io.Serializable;
 
 /**
- * A replication package
+ * A distribution package
  */
 @ConsumerType
-public interface ReplicationPackage extends Serializable {
+public interface DistributionPackage extends Serializable {
 
     /**
      * get package id. the id is a unique string that can be used to retrieve
-     * the package from an {@link ReplicationPackageExporter}
+     * the package from an {@link DistributionPackageExporter}
      *
      * @return the package id
      */
@@ -96,6 +96,6 @@ public interface ReplicationPackage exte
      * @return the associated metadata to this package
      */
     @Nonnull
-    ReplicationPackageInfo getInfo();
+    DistributionPackageInfo getInfo();
 
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExportException.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExportException.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExportException.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java Fri Nov  7 10:28:02 2014
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 /**
- * This represents an error happening while exporting a {@link ReplicationPackage}
+ * This represents an error happening while exporting a {@link DistributionPackage}
  */
 @SuppressWarnings("serial")
-public class ReplicationPackageExportException extends Exception {
+public class DistributionPackageExportException extends Exception {
 
-    public ReplicationPackageExportException(String message) {
+    public DistributionPackageExportException(String message) {
         super(message);
     }
 
-    public ReplicationPackageExportException(Throwable t) {
+    public DistributionPackageExportException(Throwable t) {
         super(t);
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 
 import javax.annotation.CheckForNull;
@@ -25,36 +25,36 @@ import java.util.List;
 
 import aQute.bnd.annotation.ConsumerType;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.component.ReplicationComponent;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.DistributionComponent;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 
 /**
- * A {@link org.apache.sling.replication.packaging.ReplicationPackageExporter) is responsible of exporting
- * {@link org.apache.sling.replication.packaging.ReplicationPackage}s to be then imported by a {@link org.apache.sling.replication.agent.ReplicationAgent}
- * (via a {@link org.apache.sling.replication.packaging.ReplicationPackageImporter}).
+ * A {@link DistributionPackageExporter ) is responsible of exporting
+ * {@link DistributionPackage }s to be then imported by a {@link org.apache.sling.distribution.agent.DistributionAgent }
+ * (via a {@link DistributionPackageImporter }).
  */
 @ConsumerType
-public interface ReplicationPackageExporter extends ReplicationComponent {
+public interface DistributionPackageExporter extends DistributionComponent {
 
     /**
-     * Exports the {@link org.apache.sling.replication.packaging.ReplicationPackage}s built from the
-     * passed {@link org.apache.sling.replication.communication.ReplicationRequest}.
+     * Exports the {@link DistributionPackage}s built from the
+     * passed {@link org.apache.sling.distribution.communication.DistributionRequest}.
      *
      * @param resourceResolver   - the resource resolver used to export the packages
-     * @param replicationRequest - the request containing the information about which content is to be exported
-     * @return a <code>List</code> of {@link org.apache.sling.replication.packaging.ReplicationPackage}s
+     * @param distributionRequest - the request containing the information about which content is to be exported
+     * @return a <code>List</code> of {@link DistributionPackage}s
      */
     @Nonnull
-    List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException;
+    List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException;
 
     /**
-     * Retrieves a {@link org.apache.sling.replication.packaging.ReplicationPackage} given its 'id', if it already exists.
+     * Retrieves a {@link DistributionPackage} given its 'id', if it already exists.
      *
      * @param resourceResolver     - the resource resolver use to obtain the package.
-     * @param replicationPackageId - the id of the package to be retrieved
-     * @return a {@link org.apache.sling.replication.packaging.ReplicationPackage} if available, <code>null</code> otherwise
+     * @param distributionPackageId - the id of the package to be retrieved
+     * @return a {@link DistributionPackage} if available, <code>null</code> otherwise
      */
     @CheckForNull
-    ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId);
+    DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId);
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImportException.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImportException.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImportException.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java Fri Nov  7 10:28:02 2014
@@ -16,25 +16,25 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
-import org.apache.sling.replication.serialization.ReplicationPackageReadingException;
+import org.apache.sling.distribution.serialization.DistributionPackageReadingException;
 
 /**
- * This represents an error happening while importing a {@link org.apache.sling.replication.packaging.ReplicationPackage}
+ * This represents an error happening while importing a {@link DistributionPackage}
  */
 @SuppressWarnings("serial")
-public class ReplicationPackageImportException extends Exception {
+public class DistributionPackageImportException extends Exception {
 
-    public ReplicationPackageImportException(String message) {
+    public DistributionPackageImportException(String message) {
         super(message);
     }
 
-    public ReplicationPackageImportException(Throwable t) {
+    public DistributionPackageImportException(Throwable t) {
         super(t);
     }
 
-    public ReplicationPackageImportException(String message, ReplicationPackageReadingException e) {
+    public DistributionPackageImportException(String message, DistributionPackageReadingException e) {
         super(message, e);
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
@@ -24,34 +24,34 @@ import java.io.InputStream;
 
 import aQute.bnd.annotation.ConsumerType;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.replication.component.ReplicationComponent;
+import org.apache.sling.distribution.component.DistributionComponent;
 
 /**
- * A {@link org.apache.sling.replication.packaging.ReplicationPackageImporter} is responsible for importing
- * {@link org.apache.sling.replication.packaging.ReplicationPackage}s into the resource tree.
+ * A {@link DistributionPackageImporter} is responsible for importing
+ * {@link DistributionPackage}s into the resource tree.
  */
 @ConsumerType
-public interface ReplicationPackageImporter extends ReplicationComponent {
+public interface DistributionPackageImporter extends DistributionComponent {
 
     /**
-     * Imports the given replication package into the underlying system
+     * Imports the given distribution package into the underlying system
      *
      * @param resourceResolver   - the resource resolver used to import the resources
-     * @param replicationPackage - the package to be imported
+     * @param distributionPackage - the package to be imported
      * @return <code>true</code> if the import succeeded, <code>false</code> otherwise
-     * @throws ReplicationPackageImportException if any error occurs during import
+     * @throws DistributionPackageImportException if any error occurs during import
      */
-    boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationPackage replicationPackage) throws ReplicationPackageImportException;
+    boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionPackage distributionPackage) throws DistributionPackageImportException;
 
     /**
-     * Tries to convert an {@link java.io.InputStream} to a {@link ReplicationPackage} and then imports it into the underlying system
+     * Tries to convert an {@link java.io.InputStream} to a {@link DistributionPackage} and then imports it into the underlying system
      *
      * @param resourceResolver - the resource resolver used to read the package
      * @param stream           the {@link InputStream} of the package to be converted and installed
-     * @return a {@link ReplicationPackage} if the stream has been successfully converted and installed
-     * @throws ReplicationPackageImportException when the stream cannot be read as a {@link ReplicationPackage} and installed
+     * @return a {@link DistributionPackage} if the stream has been successfully converted and installed
+     * @throws DistributionPackageImportException when the stream cannot be read as a {@link DistributionPackage} and installed
      */
     @CheckForNull
-    ReplicationPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws ReplicationPackageImportException;
+    DistributionPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws DistributionPackageImportException;
 
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageInfo.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageInfo.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/ReplicationPackageInfo.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java Fri Nov  7 10:28:02 2014
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 
 /**
  * Additional information about a package.
  * Additional information is optional and components should expect every piece of it to be null.
  */
-public class ReplicationPackageInfo {
+public class DistributionPackageInfo {
 
     private String origin;
 
@@ -48,7 +48,7 @@ public class ReplicationPackageInfo {
      * fills the current info object from the provided one.
      * @param packageInfo package metadata
      */
-    public void fillInfo(ReplicationPackageInfo packageInfo) {
+    public void fillInfo(DistributionPackageInfo packageInfo) {
         if (packageInfo != null) {
             this.setOrigin(packageInfo.getOrigin());
         }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java Fri Nov  7 10:28:02 2014
@@ -16,17 +16,17 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging;
+package org.apache.sling.distribution.packaging;
 
 import javax.annotation.Nonnull;
 
 import aQute.bnd.annotation.ConsumerType;
 
 /**
- * A {@link ReplicationPackage} that offers basic reference counting
+ * A {@link DistributionPackage} that offers basic reference counting
  */
 @ConsumerType
-public interface SharedReplicationPackage extends ReplicationPackage {
+public interface SharedDistributionPackage extends DistributionPackage {
 
 
     /**

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporter.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import java.util.ArrayList;
@@ -25,30 +25,30 @@ import java.util.Map;
 
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.replication.agent.ReplicationAgent;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.queue.ReplicationQueue;
-import org.apache.sling.replication.queue.ReplicationQueueItem;
-import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
+import org.apache.sling.distribution.agent.DistributionAgent;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.queue.DistributionQueue;
+import org.apache.sling.distribution.queue.DistributionQueueItem;
+import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class AgentReplicationPackageExporter implements ReplicationPackageExporter {
+public class AgentDistributionPackageExporter implements DistributionPackageExporter {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     public static final String QUEUE_NAME = "queue";
 
-    private ReplicationAgent agent;
-    private final ReplicationPackageBuilder packageBuilder;
+    private DistributionAgent agent;
+    private final DistributionPackageBuilder packageBuilder;
     private String queueName;
 
-    public AgentReplicationPackageExporter(Map<String, Object> config, ReplicationAgent agent, ReplicationPackageBuilder packageBuilder) {
+    public AgentDistributionPackageExporter(Map<String, Object> config, DistributionAgent agent, DistributionPackageBuilder packageBuilder) {
         this (PropertiesUtil.toString(config.get(QUEUE_NAME), ""), agent, packageBuilder);
     }
 
-    public AgentReplicationPackageExporter(String queueName, ReplicationAgent agent, ReplicationPackageBuilder packageBuilder) {
+    public AgentDistributionPackageExporter(String queueName, DistributionAgent agent, DistributionPackageBuilder packageBuilder) {
 
         if (agent == null || packageBuilder == null) {
             throw new IllegalArgumentException("Agent and package builder are required");
@@ -59,20 +59,20 @@ public class AgentReplicationPackageExpo
     }
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) {
 
-        List<ReplicationPackage> result = new ArrayList<ReplicationPackage>();
+        List<DistributionPackage> result = new ArrayList<DistributionPackage>();
         try {
             log.info("getting item from queue {}", queueName);
 
-            ReplicationQueue queue = agent.getQueue(queueName);
-            ReplicationQueueItem info = queue.getHead();
-            ReplicationPackage replicationPackage;
+            DistributionQueue queue = agent.getQueue(queueName);
+            DistributionQueueItem info = queue.getHead();
+            DistributionPackage distributionPackage;
             if (info != null) {
-                replicationPackage = packageBuilder.getPackage(resourceResolver, info.getId());
+                distributionPackage = packageBuilder.getPackage(resourceResolver, info.getId());
                 queue.remove(info.getId());
-                if (replicationPackage != null) {
-                    result.add(replicationPackage);
+                if (distributionPackage != null) {
+                    result.add(distributionPackage);
                 }
             }
 
@@ -83,7 +83,7 @@ public class AgentReplicationPackageExpo
         return result;
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
         return null;
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporterFactory.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporterFactory.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/AgentReplicationPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -33,45 +33,45 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.replication.agent.ReplicationAgent;
-import org.apache.sling.replication.component.ReplicationComponent;
-import org.apache.sling.replication.component.ReplicationComponentFactory;
-import org.apache.sling.replication.component.ReplicationComponentProvider;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.component.impl.SettingsUtils;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
+import org.apache.sling.distribution.agent.DistributionAgent;
+import org.apache.sling.distribution.component.DistributionComponent;
+import org.apache.sling.distribution.component.DistributionComponentFactory;
+import org.apache.sling.distribution.component.DistributionComponentProvider;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.impl.SettingsUtils;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Component(label = "Sling Replication - Agent Based Package Exporter",
+@Component(label = "Sling Distribution - Agent Based Package Exporter",
         metatype = true,
         configurationFactory = true,
         specVersion = "1.1",
         policy = ConfigurationPolicy.REQUIRE)
-@Service(value = ReplicationPackageExporter.class)
-public class AgentReplicationPackageExporterFactory implements ReplicationPackageExporter, ReplicationComponentProvider {
+@Service(value = DistributionPackageExporter.class)
+public class AgentDistributionPackageExporterFactory implements DistributionPackageExporter, DistributionComponentProvider {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Property(value = ReplicationComponentFactory.PACKAGE_EXPORTER_AGENT, propertyPrivate = true)
-    private static final String TYPE = ReplicationComponentFactory.COMPONENT_TYPE;
+    @Property(value = DistributionComponentFactory.PACKAGE_EXPORTER_AGENT, propertyPrivate = true)
+    private static final String TYPE = DistributionComponentFactory.COMPONENT_TYPE;
 
     @Property
-    private static final String NAME = ReplicationComponentFactory.COMPONENT_NAME;
+    private static final String NAME = DistributionComponentFactory.COMPONENT_NAME;
 
-    @Property(label = "Target ReplicationAgent", name = "ReplicationAgent.target")
-    @Reference(name = "ReplicationAgent", policy = ReferencePolicy.STATIC)
-    private ReplicationAgent agent;
+    @Property(label = "Target DistributionAgent", name = "DistributionAgent.target")
+    @Reference(name = "DistributionAgent", policy = ReferencePolicy.STATIC)
+    private DistributionAgent agent;
 
 
     @Property(label = "Package Builder Properties", cardinality = 100)
-    public static final String PACKAGE_BUILDER = ReplicationComponentFactory.COMPONENT_PACKAGE_BUILDER;
+    public static final String PACKAGE_BUILDER = DistributionComponentFactory.COMPONENT_PACKAGE_BUILDER;
 
     @Reference
-    ReplicationComponentFactory replicationComponentFactory;
+    DistributionComponentFactory distributionComponentFactory;
 
-    ReplicationPackageExporter packageExporter;
+    DistributionPackageExporter packageExporter;
 
 
     @Activate
@@ -82,22 +82,22 @@ public class AgentReplicationPackageExpo
         String[] packageBuilderProperties = PropertiesUtil.toStringArray(config.get(PACKAGE_BUILDER));
         properties.put(PACKAGE_BUILDER, SettingsUtils.parseLines(packageBuilderProperties));
 
-        packageExporter = replicationComponentFactory.createComponent(ReplicationPackageExporter.class, properties, this);
+        packageExporter = distributionComponentFactory.createComponent(DistributionPackageExporter.class, properties, this);
     }
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
 
-       return packageExporter.exportPackages(resourceResolver, replicationRequest);
+       return packageExporter.exportPackages(resourceResolver, distributionRequest);
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
-        return packageExporter.getPackage(resourceResolver, replicationPackageId);
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
+        return packageExporter.getPackage(resourceResolver, distributionPackageId);
     }
 
-    public <ComponentType extends ReplicationComponent> ComponentType getComponent(@Nonnull Class<ComponentType> type,
+    public <ComponentType extends DistributionComponent> ComponentType getComponent(@Nonnull Class<ComponentType> type,
                                                                                    @Nullable String componentName) {
-        if (type.isAssignableFrom(ReplicationAgent.class)) {
+        if (type.isAssignableFrom(DistributionAgent.class)) {
             return (ComponentType) agent;
         }
         return null;

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java Fri Nov  7 10:28:02 2014
@@ -16,43 +16,43 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 
 /**
- * {@link org.apache.sling.replication.packaging.ReplicationPackageExporter} implementation which creates a FileVault based
- * {@link org.apache.sling.replication.packaging.ReplicationPackage} locally.
+ * {@link org.apache.sling.distribution.packaging.DistributionPackageExporter} implementation which creates a FileVault based
+ * {@link org.apache.sling.distribution.packaging.DistributionPackage} locally.
  */
-public class LocalReplicationPackageExporter implements ReplicationPackageExporter {
+public class LocalDistributionPackageExporter implements DistributionPackageExporter {
 
-    private ReplicationPackageBuilder packageBuilder;
+    private DistributionPackageBuilder packageBuilder;
 
-    public LocalReplicationPackageExporter(ReplicationPackageBuilder packageBuilder) {
+    public LocalDistributionPackageExporter(DistributionPackageBuilder packageBuilder) {
         this.packageBuilder = packageBuilder;
     }
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException {
-        List<ReplicationPackage> result = new ArrayList<ReplicationPackage>();
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+        List<DistributionPackage> result = new ArrayList<DistributionPackage>();
 
-        ReplicationPackage createdPackage = packageBuilder.createPackage(resourceResolver, replicationRequest);
+        DistributionPackage createdPackage = packageBuilder.createPackage(resourceResolver, distributionRequest);
         if (createdPackage != null) {
             result.add(createdPackage);
         }
         return result;
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
-        return packageBuilder.getPackage(resourceResolver, replicationPackageId);
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
+        return packageBuilder.getPackage(resourceResolver, distributionPackageId);
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporterFactory.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporterFactory.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/LocalReplicationPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import java.util.HashMap;
@@ -31,42 +31,42 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.replication.component.ReplicationComponentFactory;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.component.impl.SettingsUtils;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
+import org.apache.sling.distribution.component.DistributionComponentFactory;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.impl.SettingsUtils;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * {@link org.apache.sling.replication.packaging.ReplicationPackageExporter} implementation which creates a FileVault based
- * {@link org.apache.sling.replication.packaging.ReplicationPackage} locally.
+ * {@link org.apache.sling.distribution.packaging.DistributionPackageExporter} implementation which creates a FileVault based
+ * {@link org.apache.sling.distribution.packaging.DistributionPackage} locally.
  */
-@Component(label = "Sling Replication - Local Package Exporter Factory",
+@Component(label = "Sling Distribution - Local Package Exporter Factory",
         metatype = true,
         configurationFactory = true,
         specVersion = "1.1",
         policy = ConfigurationPolicy.REQUIRE)
-@Service(value = ReplicationPackageExporter.class)
-public class LocalReplicationPackageExporterFactory implements ReplicationPackageExporter {
+@Service(value = DistributionPackageExporter.class)
+public class LocalDistributionPackageExporterFactory implements DistributionPackageExporter {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Property(value = ReplicationComponentFactory.PACKAGE_EXPORTER_LOCAL, propertyPrivate = true)
-    private static final String TYPE = ReplicationComponentFactory.COMPONENT_TYPE;
+    @Property(value = DistributionComponentFactory.PACKAGE_EXPORTER_LOCAL, propertyPrivate = true)
+    private static final String TYPE = DistributionComponentFactory.COMPONENT_TYPE;
 
     @Property
-    private static final String NAME = ReplicationComponentFactory.COMPONENT_NAME;
+    private static final String NAME = DistributionComponentFactory.COMPONENT_NAME;
 
     @Property(label = "Package Builder Properties", cardinality = 100)
-    public static final String PACKAGE_BUILDER = ReplicationComponentFactory.COMPONENT_PACKAGE_BUILDER;
+    public static final String PACKAGE_BUILDER = DistributionComponentFactory.COMPONENT_PACKAGE_BUILDER;
 
     @Reference
-    ReplicationComponentFactory replicationComponentFactory;
+    DistributionComponentFactory distributionComponentFactory;
 
-    ReplicationPackageExporter exporter;
+    DistributionPackageExporter exporter;
 
     @Activate
     public void activate(Map<String, Object> config) {
@@ -75,16 +75,16 @@ public class LocalReplicationPackageExpo
         String[] packageBuilderProperties = PropertiesUtil.toStringArray(config.get(PACKAGE_BUILDER));
         properties.put(PACKAGE_BUILDER, SettingsUtils.parseLines(packageBuilderProperties));
 
-        exporter = replicationComponentFactory.createComponent(ReplicationPackageExporter.class, properties, null);
+        exporter = distributionComponentFactory.createComponent(DistributionPackageExporter.class, properties, null);
     }
 
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException {
-        return exporter.exportPackages(resourceResolver, replicationRequest);
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+        return exporter.exportPackages(resourceResolver, distributionRequest);
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
-        return exporter.getPackage(resourceResolver, replicationPackageId);
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
+        return exporter.getPackage(resourceResolver, distributionPackageId);
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java Fri Nov  7 10:28:02 2014
@@ -16,42 +16,42 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.replication.transport.impl.ReplicationEndpoint;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
-import org.apache.sling.replication.transport.ReplicationTransportHandler;
-import org.apache.sling.replication.transport.authentication.TransportAuthenticationProvider;
-import org.apache.sling.replication.transport.impl.MultipleEndpointReplicationTransportHandler;
-import org.apache.sling.replication.transport.impl.SimpleHttpReplicationTransportHandler;
-import org.apache.sling.replication.transport.impl.TransportEndpointStrategyType;
+import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.transport.DistributionTransportHandler;
+import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.transport.impl.MultipleEndpointDistributionTransportHandler;
+import org.apache.sling.distribution.transport.impl.SimpleHttpDistributionTransportHandler;
+import org.apache.sling.distribution.transport.impl.TransportEndpointStrategyType;
 
 /**
- * Default implementation of {@link org.apache.sling.replication.packaging.ReplicationPackageExporter}
+ * Default implementation of {@link org.apache.sling.distribution.packaging.DistributionPackageExporter}
  */
-public class RemoteReplicationPackageExporter implements ReplicationPackageExporter {
+public class RemoteDistributionPackageExporter implements DistributionPackageExporter {
 
 
-    private final ReplicationPackageBuilder packageBuilder;
+    private final DistributionPackageBuilder packageBuilder;
 
-    ReplicationTransportHandler transportHandler;
+    DistributionTransportHandler transportHandler;
 
 
 
-    public RemoteReplicationPackageExporter(ReplicationPackageBuilder packageBuilder,
-                                            TransportAuthenticationProvider transportAuthenticationProvider,
-                                            String[] endpoints,
-                                            String transportEndpointStrategyName,
-                                            int pollItems) {
+    public RemoteDistributionPackageExporter(DistributionPackageBuilder packageBuilder,
+                                             TransportAuthenticationProvider transportAuthenticationProvider,
+                                             String[] endpoints,
+                                             String transportEndpointStrategyName,
+                                             int pollItems) {
         if (packageBuilder == null) {
             throw new IllegalArgumentException("packageBuilder is required");
         }
@@ -60,28 +60,28 @@ public class RemoteReplicationPackageExp
 
         TransportEndpointStrategyType transportEndpointStrategyType = TransportEndpointStrategyType.valueOf(transportEndpointStrategyName);
 
-        List<ReplicationTransportHandler> transportHandlers = new ArrayList<ReplicationTransportHandler>();
+        List<DistributionTransportHandler> transportHandlers = new ArrayList<DistributionTransportHandler>();
 
         for (String endpoint : endpoints) {
             if (endpoint != null && endpoint.length() > 0) {
-                transportHandlers.add(new SimpleHttpReplicationTransportHandler(transportAuthenticationProvider,
-                        new ReplicationEndpoint(endpoint), packageBuilder, pollItems));
+                transportHandlers.add(new SimpleHttpDistributionTransportHandler(transportAuthenticationProvider,
+                        new DistributionEndpoint(endpoint), packageBuilder, pollItems));
             }
         }
-        transportHandler = new MultipleEndpointReplicationTransportHandler(transportHandlers,
+        transportHandler = new MultipleEndpointDistributionTransportHandler(transportHandlers,
                 transportEndpointStrategyType);
     }
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
         try {
-            return transportHandler.retrievePackages(resourceResolver, replicationRequest);
+            return transportHandler.retrievePackages(resourceResolver, distributionRequest);
         } catch (Exception e) {
-            throw new ReplicationPackageBuildingException(e);
+            throw new DistributionPackageBuildingException(e);
         }
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
-        return packageBuilder.getPackage(resourceResolver, replicationPackageId);
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
+        return packageBuilder.getPackage(resourceResolver, distributionPackageId);
     }
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporterFactory.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporterFactory.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/exporter/RemoteReplicationPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.exporter;
+package org.apache.sling.distribution.packaging.impl.exporter;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -35,45 +35,45 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.replication.component.ReplicationComponent;
-import org.apache.sling.replication.component.ReplicationComponentFactory;
-import org.apache.sling.replication.component.ReplicationComponentProvider;
-import org.apache.sling.replication.communication.ReplicationRequest;
-import org.apache.sling.replication.component.impl.SettingsUtils;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageExporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
-import org.apache.sling.replication.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.component.DistributionComponent;
+import org.apache.sling.distribution.component.DistributionComponentFactory;
+import org.apache.sling.distribution.component.DistributionComponentProvider;
+import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.impl.SettingsUtils;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
+import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Default implementation of {@link org.apache.sling.replication.packaging.ReplicationPackageExporter}
+ * Default implementation of {@link org.apache.sling.distribution.packaging.DistributionPackageExporter}
  */
-@Component(label = "Sling Replication - Remote Package Exporter Factory",
+@Component(label = "Sling Distribution - Remote Package Exporter Factory",
         metatype = true,
         configurationFactory = true,
         specVersion = "1.1",
         policy = ConfigurationPolicy.REQUIRE)
-@Service(value = ReplicationPackageExporter.class)
-public class RemoteReplicationPackageExporterFactory implements ReplicationPackageExporter, ReplicationComponentProvider {
-    private static final String TRANSPORT_AUTHENTICATION_PROVIDER_TARGET = ReplicationComponentFactory.COMPONENT_TRANSPORT_AUTHENTICATION_PROVIDER + ".target";
+@Service(value = DistributionPackageExporter.class)
+public class RemoteDistributionPackageExporterFactory implements DistributionPackageExporter, DistributionComponentProvider {
+    private static final String TRANSPORT_AUTHENTICATION_PROVIDER_TARGET = DistributionComponentFactory.COMPONENT_TRANSPORT_AUTHENTICATION_PROVIDER + ".target";
 
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Property(value = ReplicationComponentFactory.PACKAGE_EXPORTER_REMOTE, propertyPrivate = true)
-    private static final String TYPE = ReplicationComponentFactory.COMPONENT_TYPE;
+    @Property(value = DistributionComponentFactory.PACKAGE_EXPORTER_REMOTE, propertyPrivate = true)
+    private static final String TYPE = DistributionComponentFactory.COMPONENT_TYPE;
 
     @Property
-    private static final String NAME = ReplicationComponentFactory.COMPONENT_NAME;
+    private static final String NAME = DistributionComponentFactory.COMPONENT_NAME;
 
     @Property(name = TRANSPORT_AUTHENTICATION_PROVIDER_TARGET)
     @Reference(name = "TransportAuthenticationProvider", policy = ReferencePolicy.STATIC)
     private volatile TransportAuthenticationProvider transportAuthenticationProvider;
 
     @Property(cardinality = 100)
-    public static final String ENDPOINTS = ReplicationComponentFactory.PACKAGE_EXPORTER_REMOTE_PROPERTY_ENDPOINTS;
+    public static final String ENDPOINTS = DistributionComponentFactory.PACKAGE_EXPORTER_REMOTE_PROPERTY_ENDPOINTS;
 
     @Property(name = "poll items", description = "number of subsequent poll requests to make", intValue = 1)
     public static final String POLL_ITEMS = "poll.items";
@@ -87,16 +87,16 @@ public class RemoteReplicationPackageExp
             )},
             value = "One"
     )
-    private static final String ENDPOINT_STRATEGY = ReplicationComponentFactory.PACKAGE_EXPORTER_REMOTE_PROPERTY_ENDPOINTS_STRATEGY;
+    private static final String ENDPOINT_STRATEGY = DistributionComponentFactory.PACKAGE_EXPORTER_REMOTE_PROPERTY_ENDPOINTS_STRATEGY;
 
 
     @Property(label = "Package Builder Properties", cardinality = 100)
-    public static final String PACKAGE_BUILDER = ReplicationComponentFactory.COMPONENT_PACKAGE_BUILDER;
+    public static final String PACKAGE_BUILDER = DistributionComponentFactory.COMPONENT_PACKAGE_BUILDER;
 
     @Reference
-    ReplicationComponentFactory replicationComponentFactory;
+    DistributionComponentFactory distributionComponentFactory;
 
-    ReplicationPackageExporter exporter;
+    DistributionPackageExporter exporter;
 
     @Activate
     protected void activate(Map<String, Object> config) throws Exception {
@@ -105,7 +105,7 @@ public class RemoteReplicationPackageExp
         String[] packageBuilderProperties = PropertiesUtil.toStringArray(config.get(PACKAGE_BUILDER));
         properties.put(PACKAGE_BUILDER, SettingsUtils.parseLines(packageBuilderProperties));
 
-        exporter = replicationComponentFactory.createComponent(ReplicationPackageExporter.class, properties, this);
+        exporter = distributionComponentFactory.createComponent(DistributionPackageExporter.class, properties, this);
     }
 
 
@@ -115,15 +115,15 @@ public class RemoteReplicationPackageExp
     }
 
     @Nonnull
-    public List<ReplicationPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationRequest replicationRequest) throws ReplicationPackageBuildingException {
-        return exporter.exportPackages(resourceResolver, replicationRequest);
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+        return exporter.exportPackages(resourceResolver, distributionRequest);
     }
 
-    public ReplicationPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String replicationPackageId) {
-        return exporter.getPackage(resourceResolver, replicationPackageId);
+    public DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId) {
+        return exporter.getPackage(resourceResolver, distributionPackageId);
     }
 
-    public <ComponentType extends ReplicationComponent> ComponentType getComponent(@Nonnull Class<ComponentType> type,
+    public <ComponentType extends DistributionComponent> ComponentType getComponent(@Nonnull Class<ComponentType> type,
                                                                                    @Nullable String componentName) {
         if (type.isAssignableFrom(TransportAuthenticationProvider.class)) {
             return (ComponentType) transportAuthenticationProvider;

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/AdvancedRemoteReplicationPackageImporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/AdvancedRemoteReplicationPackageImporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/AdvancedRemoteReplicationPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.importer;
+package org.apache.sling.distribution.packaging.impl.importer;
 
 import javax.annotation.Nonnull;
 import java.io.InputStream;
@@ -34,31 +34,31 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.replication.transport.impl.ReplicationEndpoint;
-import org.apache.sling.replication.component.ReplicationComponentFactory;
-import org.apache.sling.replication.event.impl.ReplicationEventFactory;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageImportException;
-import org.apache.sling.replication.packaging.ReplicationPackageImporter;
-import org.apache.sling.replication.transport.ReplicationTransportHandler;
-import org.apache.sling.replication.transport.authentication.TransportAuthenticationProvider;
-import org.apache.sling.replication.transport.impl.AdvancedHttpReplicationTransportHandler;
-import org.apache.sling.replication.transport.impl.MultipleEndpointReplicationTransportHandler;
-import org.apache.sling.replication.transport.impl.TransportEndpointStrategyType;
+import org.apache.sling.distribution.event.impl.DistributionEventFactory;
+import org.apache.sling.distribution.packaging.DistributionPackageImportException;
+import org.apache.sling.distribution.packaging.DistributionPackageImporter;
+import org.apache.sling.distribution.transport.impl.AdvancedHttpDistributionTransportHandler;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
+import org.apache.sling.distribution.component.DistributionComponentFactory;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.transport.DistributionTransportHandler;
+import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.transport.impl.MultipleEndpointDistributionTransportHandler;
+import org.apache.sling.distribution.transport.impl.TransportEndpointStrategyType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Implementation of {@link org.apache.sling.replication.packaging.ReplicationPackageImporter} supporting multiple
+ * Implementation of {@link org.apache.sling.distribution.packaging.DistributionPackageImporter} supporting multiple
  * endpoints and custom HTTP headers and body.
  */
-@Component(label = "Advanced Remote Replication Package Importer",
+@Component(label = "Advanced Remote Distribution Package Importer",
         configurationFactory = true,
         specVersion = "1.1",
         policy = ConfigurationPolicy.REQUIRE)
-@Service(value = ReplicationPackageImporter.class)
-public class AdvancedRemoteReplicationPackageImporter implements ReplicationPackageImporter {
-    private static final String TRANSPORT_AUTHENTICATION_PROVIDER_TARGET = ReplicationComponentFactory.COMPONENT_TRANSPORT_AUTHENTICATION_PROVIDER + ".target";
+@Service(value = DistributionPackageImporter.class)
+public class AdvancedRemoteDistributionPackageImporter implements DistributionPackageImporter {
+    private static final String TRANSPORT_AUTHENTICATION_PROVIDER_TARGET = DistributionComponentFactory.COMPONENT_TRANSPORT_AUTHENTICATION_PROVIDER + ".target";
 
 
     private final Logger log = LoggerFactory.getLogger(getClass());
@@ -94,9 +94,9 @@ public class AdvancedRemoteReplicationPa
     private static final String CUSTOM_BODY = "customBody";
 
     @Reference
-    private ReplicationEventFactory replicationEventFactory;
+    private DistributionEventFactory distributionEventFactory;
 
-    ReplicationTransportHandler transportHandler;
+    DistributionTransportHandler transportHandler;
 
     @Activate
     protected void activate(Map<String, ?> config) throws Exception {
@@ -113,26 +113,26 @@ public class AdvancedRemoteReplicationPa
         String customBody = PropertiesUtil.toString(config.get(CUSTOM_BODY), "");
 
 
-        List<ReplicationTransportHandler> transportHandlers = new ArrayList<ReplicationTransportHandler>();
+        List<DistributionTransportHandler> transportHandlers = new ArrayList<DistributionTransportHandler>();
 
         for (String endpoint : endpoints) {
             if (endpoint != null && endpoint.length() > 0) {
-                transportHandlers.add(new AdvancedHttpReplicationTransportHandler(useCustomHeaders, customHeaders,
+                transportHandlers.add(new AdvancedHttpDistributionTransportHandler(useCustomHeaders, customHeaders,
                         useCustomBody, customBody,
                         transportAuthenticationProvider,
-                        new ReplicationEndpoint(endpoint), null, -1));
+                        new DistributionEndpoint(endpoint), null, -1));
             }
         }
-        transportHandler = new MultipleEndpointReplicationTransportHandler(transportHandlers,
+        transportHandler = new MultipleEndpointDistributionTransportHandler(transportHandlers,
                 transportEndpointStrategyType);
 
     }
 
 
-    public boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationPackage replicationPackage) {
+    public boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionPackage distributionPackage) {
         boolean result = false;
         try {
-            transportHandler.deliverPackage(resourceResolver, replicationPackage);
+            transportHandler.deliverPackage(resourceResolver, distributionPackage);
             result = true;
         } catch (Exception e) {
             log.error("failed delivery", e);
@@ -140,8 +140,8 @@ public class AdvancedRemoteReplicationPa
         return result;
     }
 
-    public ReplicationPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws ReplicationPackageImportException {
-        throw new ReplicationPackageImportException("not supported");
+    public DistributionPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws DistributionPackageImportException {
+        throw new DistributionPackageImportException("not supported");
     }
 
 }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java (from r1637123, sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/LocalReplicationPackageImporter.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java&p1=sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/LocalReplicationPackageImporter.java&r1=1637123&r2=1637333&rev=1637333&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/impl/importer/LocalReplicationPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java Fri Nov  7 10:28:02 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.replication.packaging.impl.importer;
+package org.apache.sling.distribution.packaging.impl.importer;
 
 import javax.annotation.Nonnull;
 import java.io.InputStream;
@@ -25,78 +25,78 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.replication.event.impl.ReplicationEventFactory;
-import org.apache.sling.replication.event.ReplicationEventType;
-import org.apache.sling.replication.packaging.ReplicationPackage;
-import org.apache.sling.replication.packaging.ReplicationPackageImportException;
-import org.apache.sling.replication.packaging.ReplicationPackageImporter;
-import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
-import org.apache.sling.replication.serialization.ReplicationPackageReadingException;
+import org.apache.sling.distribution.event.DistributionEventType;
+import org.apache.sling.distribution.event.impl.DistributionEventFactory;
+import org.apache.sling.distribution.packaging.DistributionPackageImportException;
+import org.apache.sling.distribution.packaging.DistributionPackageImporter;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
+import org.apache.sling.distribution.serialization.DistributionPackageReadingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * {@link org.apache.sling.replication.packaging.ReplicationPackageImporter} implementation which imports a FileVault
- * based {@link org.apache.sling.replication.packaging.ReplicationPackage} locally.
+ * {@link org.apache.sling.distribution.packaging.DistributionPackageImporter} implementation which imports a FileVault
+ * based {@link org.apache.sling.distribution.packaging.DistributionPackage} locally.
  */
 
-public class LocalReplicationPackageImporter implements ReplicationPackageImporter {
+public class LocalDistributionPackageImporter implements DistributionPackageImporter {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private final ReplicationPackageBuilder packageBuilder;
+    private final DistributionPackageBuilder packageBuilder;
 
-    private final ReplicationEventFactory replicationEventFactory;
+    private final DistributionEventFactory distributionEventFactory;
 
 
-    public LocalReplicationPackageImporter(ReplicationPackageBuilder packageBuilder,
-                                           ReplicationEventFactory replicationEventFactory) {
+    public LocalDistributionPackageImporter(DistributionPackageBuilder packageBuilder,
+                                            DistributionEventFactory distributionEventFactory) {
 
         if (packageBuilder == null) {
             throw new IllegalArgumentException("A package builder is required");
         }
 
-        if (replicationEventFactory == null) {
+        if (distributionEventFactory == null) {
             throw new IllegalArgumentException("An event factory is required");
         }
-        this.replicationEventFactory = replicationEventFactory;
+        this.distributionEventFactory = distributionEventFactory;
         this.packageBuilder = packageBuilder;
     }
 
 
-    public boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationPackage replicationPackage) throws ReplicationPackageImportException {
+    public boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionPackage distributionPackage) throws DistributionPackageImportException {
         boolean success;
         try {
-            success = packageBuilder.installPackage(resourceResolver, replicationPackage);
+            success = packageBuilder.installPackage(resourceResolver, distributionPackage);
 
             if (success) {
-                log.info("replication package read and installed for path(s) {}", Arrays.toString(replicationPackage.getPaths()));
+                log.info("Distribution package read and installed for path(s) {}", Arrays.toString(distributionPackage.getPaths()));
 
                 Dictionary<String, Object> dictionary = new Hashtable<String, Object>();
-                dictionary.put("replication.action", replicationPackage.getAction());
-                dictionary.put("replication.path", replicationPackage.getPaths());
-                replicationEventFactory.generateEvent(ReplicationEventType.PACKAGE_INSTALLED, dictionary);
+                dictionary.put("distribution.action", distributionPackage.getAction());
+                dictionary.put("distribution.path", distributionPackage.getPaths());
+                distributionEventFactory.generateEvent(DistributionEventType.PACKAGE_INSTALLED, dictionary);
 
             } else {
-                log.warn("could not read a replication package");
+                log.warn("could not read a distribution package");
             }
         } catch (Exception e) {
-            log.error("cannot import a package from the given stream of type {}", replicationPackage.getType());
-            throw new ReplicationPackageImportException(e);
+            log.error("cannot import a package from the given stream of type {}", distributionPackage.getType());
+            throw new DistributionPackageImportException(e);
         }
         return success;
     }
 
-    public ReplicationPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws ReplicationPackageImportException {
+    public DistributionPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws DistributionPackageImportException {
         try {
-            ReplicationPackage replicationPackage = packageBuilder.readPackage(resourceResolver, stream);
-            if (importPackage(resourceResolver, replicationPackage)) {
-                return replicationPackage;
+            DistributionPackage distributionPackage = packageBuilder.readPackage(resourceResolver, stream);
+            if (importPackage(resourceResolver, distributionPackage)) {
+                return distributionPackage;
             } else {
-                throw new ReplicationPackageImportException("could not import the package " + replicationPackage);
+                throw new DistributionPackageImportException("could not import the package " + distributionPackage);
             }
-        } catch (ReplicationPackageReadingException e) {
-            throw new ReplicationPackageImportException("cannot read a package from the given stream", e);
+        } catch (DistributionPackageReadingException e) {
+            throw new DistributionPackageImportException("cannot read a package from the given stream", e);
         }
     }
 



Mime
View raw message