sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1644622 - in /sling/trunk/contrib/extensions/distribution: api/src/main/java/org/apache/sling/distribution/queue/ core/src/main/java/org/apache/sling/distribution/agent/impl/ core/src/main/java/org/apache/sling/distribution/monitor/ core/s...
Date Thu, 11 Dec 2014 13:00:38 GMT
Author: tommaso
Date: Thu Dec 11 13:00:37 2014
New Revision: 1644622

URL: http://svn.apache.org/r1644622
Log:
SLING-4153 - renamed QueueItemState to QueueItemStatus

Added:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java
      - copied, changed from r1644012, sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java
Removed:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java
Modified:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/DistributionQueueDispatchingStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueue.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheckTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueTest.java

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java (original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java Thu Dec 11 13:00:37 2014
@@ -56,14 +56,14 @@ public interface DistributionQueue {
     boolean add(@Nonnull DistributionQueueItem item);
 
     /**
-     * get the state of a certain item in the queue
+     * get the status of a certain item in the queue
      *
      * @param item the distribution item to get the status for
      * @return the item status in the queue
      * @throws DistributionQueueException if any error occurs while getting the status
      */
     @Nonnull
-    DistributionQueueItemState getState(@Nonnull DistributionQueueItem item)
+    DistributionQueueItemStatus getStatus(@Nonnull DistributionQueueItem item)
             throws DistributionQueueException;
 
     /**

Copied: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java (from r1644012, sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java?p2=sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java&p1=sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java&r1=1644012&r2=1644622&rev=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java (original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java Thu Dec 11 13:00:37 2014
@@ -24,7 +24,7 @@ import java.util.Calendar;
  * the current status of a certain item in a {@link DistributionQueue}
  */
 
-public class DistributionQueueItemState {
+public class DistributionQueueItemStatus {
 
     private final int attempts;
 
@@ -34,14 +34,14 @@ public class DistributionQueueItemState
 
     private final String queueName;
 
-    public DistributionQueueItemState(Calendar entered, ItemState state, int attempts, String queueName) {
+    public DistributionQueueItemStatus(Calendar entered, ItemState state, int attempts, String queueName) {
         this.entered = entered;
         this.state = state;
         this.attempts = attempts;
         this.queueName = queueName;
     }
 
-    public DistributionQueueItemState(ItemState state, String queueName) {
+    public DistributionQueueItemStatus(ItemState state, String queueName) {
         this(Calendar.getInstance(), state, 0, queueName);
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java Thu Dec 11 13:00:37 2014
@@ -22,12 +22,11 @@ import javax.annotation.Nonnull;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
+
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.PersistenceException;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -50,7 +49,7 @@ import org.apache.sling.distribution.que
 import org.apache.sling.distribution.queue.impl.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProcessor;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.apache.sling.distribution.trigger.DistributionRequestHandler;
@@ -59,7 +58,7 @@ import org.apache.sling.distribution.tri
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
+import static org.apache.sling.distribution.queue.DistributionQueueItemStatus.ItemState;
 
 /**
  * Basic implementation of a {@link org.apache.sling.distribution.agent.DistributionAgent}
@@ -187,8 +186,8 @@ public class SimpleDistributionAgent imp
 
         // dispatch the distribution package to the queue distribution handler
         try {
-            Iterable<DistributionQueueItemState> states = queueDistributionStrategy.add(distributionPackage, queueProvider);
-            for (DistributionQueueItemState state : states) {
+            Iterable<DistributionQueueItemStatus> states = queueDistributionStrategy.add(distributionPackage, queueProvider);
+            for (DistributionQueueItemStatus state : states) {
                 DistributionRequestState requestState = getRequestStateFromQueueState(state.getItemState());
                 distributionResponses.add(new DistributionResponse(requestState, state.getItemState().toString()));
             }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java Thu Dec 11 13:00:37 2014
@@ -38,7 +38,7 @@ import org.apache.sling.commons.osgi.Pro
 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.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.hc.api.HealthCheck;
 import org.apache.sling.hc.api.Result;
 import org.apache.sling.hc.util.FormattingResultLog;
@@ -112,7 +112,7 @@ public class DistributionQueueHealthChec
 
                         DistributionQueueItem item = q.getHead();
                         if (item != null) {
-                            DistributionQueueItemState status = q.getState(item);
+                            DistributionQueueItemStatus status = q.getStatus(item);
                             if (status.getAttempts() <= numberOfRetriesAllowed) {
                                 resultLog.debug("Queue: [{}], first item: [{}], number of retries: {}", q.getName(), item.getId(), status.getAttempts());
                             } else {

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/DistributionQueueDispatchingStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/DistributionQueueDispatchingStrategy.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/DistributionQueueDispatchingStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/DistributionQueueDispatchingStrategy.java Thu Dec 11 13:00:37 2014
@@ -24,7 +24,7 @@ import java.util.List;
 import aQute.bnd.annotation.ConsumerType;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueueException;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 
 /**
@@ -45,11 +45,11 @@ public interface DistributionQueueDispat
      *
      * @param distributionPackage a {@link org.apache.sling.distribution.packaging.DistributionPackage} to distribute
      * @param queueProvider       the {@link org.apache.sling.distribution.queue.DistributionQueueProvider} used to provide the queues to be used for the given package
-     * @return an {@link java.lang.Iterable} of {@link org.apache.sling.distribution.queue.DistributionQueueItemState}s representing
+     * @return an {@link java.lang.Iterable} of {@link org.apache.sling.distribution.queue.DistributionQueueItemStatus}s representing
      * the states of the {@link org.apache.sling.distribution.queue.DistributionQueueItem}s added to one or more {@link org.apache.sling.distribution.queue.DistributionQueue}s
      * @throws org.apache.sling.distribution.queue.DistributionQueueException if any internal error happens during distribution
      */
-    Iterable<DistributionQueueItemState> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException;
+    Iterable<DistributionQueueItemStatus> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException;
 
 
     /**

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java Thu Dec 11 13:00:37 2014
@@ -31,7 +31,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
@@ -78,15 +78,15 @@ public class ErrorAwareQueueDispatchingS
         timeThreshold = PropertiesUtil.toInteger(ctx.getProperties().get(TIME_THRESHOLD), 600000);
     }
 
-    public Iterable<DistributionQueueItemState> add(@Nonnull DistributionPackage distributionPackage,
+    public Iterable<DistributionQueueItemStatus> add(@Nonnull DistributionPackage distributionPackage,
                                                     @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException {
         checkAndRemoveStuckItems(queueProvider);
         DistributionQueueItem queueItem = getItem(distributionPackage);
         DistributionQueue queue = queueProvider.getQueue(DEFAULT_QUEUE_NAME);
         if (queue.add(queueItem)) {
-            return Arrays.asList(queue.getState(queueItem));
+            return Arrays.asList(queue.getStatus(queueItem));
         } else {
-            return Arrays.asList(new DistributionQueueItemState(DistributionQueueItemState.ItemState.ERROR, queue.getName()));
+            return Arrays.asList(new DistributionQueueItemStatus(DistributionQueueItemStatus.ItemState.ERROR, queue.getName()));
         }
     }
 
@@ -100,7 +100,7 @@ public class ErrorAwareQueueDispatchingS
         // get first item in the queue with its status
         DistributionQueueItem firstItem = defaultQueue.getHead();
         if (firstItem != null) {
-            DistributionQueueItemState status = defaultQueue.getState(firstItem);
+            DistributionQueueItemStatus status = defaultQueue.getStatus(firstItem);
             // if item is still in the queue after a max no. of attempts, move it to the error queue
             int attempts = status.getAttempts();
             Calendar entered = status.getEntered();

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java Thu Dec 11 13:00:37 2014
@@ -26,7 +26,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -76,13 +76,13 @@ public class PriorityPathQueueDispatchin
         return queue;
     }
 
-    public Iterable<DistributionQueueItemState> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException {
+    public Iterable<DistributionQueueItemStatus> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException {
         DistributionQueueItem queueItem = getItem(distributionPackage);
         DistributionQueue queue = getQueue(queueItem, queueProvider);
         if (queue.add(queueItem)) {
-            return Arrays.asList(queue.getState(queueItem));
+            return Arrays.asList(queue.getStatus(queueItem));
         } else {
-            return Arrays.asList(new DistributionQueueItemState(DistributionQueueItemState.ItemState.ERROR, queue.getName()));
+            return Arrays.asList(new DistributionQueueItemStatus(DistributionQueueItemStatus.ItemState.ERROR, queue.getName()));
         }
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java Thu Dec 11 13:00:37 2014
@@ -26,7 +26,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,13 +39,13 @@ public class SingleQueueDispatchingStrat
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    public Iterable<DistributionQueueItemState> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException {
+    public Iterable<DistributionQueueItemStatus> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException {
         DistributionQueueItem queueItem = getItem(distributionPackage);
         DistributionQueue queue = queueProvider.getQueue(DEFAULT_QUEUE_NAME);
         if (queue.add(queueItem)) {
-            return Arrays.asList(queue.getState(queueItem));
+            return Arrays.asList(queue.getStatus(queueItem));
         } else {
-            return Arrays.asList(new DistributionQueueItemState(DistributionQueueItemState.ItemState.ERROR, queue.getName()));
+            return Arrays.asList(new DistributionQueueItemStatus(DistributionQueueItemStatus.ItemState.ERROR, queue.getName()));
         }
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueue.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueue.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueue.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueue.java Thu Dec 11 13:00:37 2014
@@ -28,8 +28,8 @@ import org.apache.sling.distribution.que
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemSelector;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
-import org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus.ItemState;
 import org.apache.sling.event.jobs.Job;
 import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.event.jobs.JobManager.QueryType;
@@ -77,14 +77,14 @@ public class JobHandlingDistributionQueu
     }
 
     @Nonnull
-    public DistributionQueueItemState getState(@Nonnull DistributionQueueItem distributionPackage)
+    public DistributionQueueItemStatus getStatus(@Nonnull DistributionQueueItem distributionPackage)
             throws DistributionQueueException {
         try {
             Map<String, Object> properties = JobHandlingUtils.createIdProperties(distributionPackage.getId());
             Job job = jobManager.getJob(topic, properties);
             if (job != null) {
 
-                DistributionQueueItemState itemState = new DistributionQueueItemState(job.getCreated(),
+                DistributionQueueItemStatus itemState = new DistributionQueueItemStatus(job.getCreated(),
                         ItemState.valueOf(job.getJobState().toString()),
                         job.getRetryCount(), name);
 
@@ -92,7 +92,7 @@ public class JobHandlingDistributionQueu
 
                 return itemState;
             } else {
-                DistributionQueueItemState itemState = new DistributionQueueItemState(ItemState.DROPPED, name);
+                DistributionQueueItemStatus itemState = new DistributionQueueItemStatus(ItemState.DROPPED, name);
                 return itemState;
             }
         } catch (Exception e) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java Thu Dec 11 13:00:37 2014
@@ -29,8 +29,8 @@ import java.util.concurrent.TimeUnit;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemSelector;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
-import org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus.ItemState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,13 +48,13 @@ public class SimpleDistributionQueue imp
 
     private final BlockingQueue<DistributionQueueItem> queue;
 
-    private final Map<DistributionQueueItem, DistributionQueueItemState> statusMap;
+    private final Map<DistributionQueueItem, DistributionQueueItemStatus> statusMap;
 
     public SimpleDistributionQueue(String agentName, String name) {
         log.info("starting a simple queue for agent {}", agentName);
         this.name = name;
         this.queue = new LinkedBlockingQueue<DistributionQueueItem>();
-        this.statusMap = new WeakHashMap<DistributionQueueItem, DistributionQueueItemState>(10);
+        this.statusMap = new WeakHashMap<DistributionQueueItem, DistributionQueueItemStatus>(10);
     }
 
     @Nonnull
@@ -71,27 +71,27 @@ public class SimpleDistributionQueue imp
         } catch (InterruptedException e) {
             log.error("cannot add an item to the queue", e);
         } finally {
-            statusMap.put(item, new DistributionQueueItemState(Calendar.getInstance(), itemState, 0, name));
+            statusMap.put(item, new DistributionQueueItemStatus(Calendar.getInstance(), itemState, 0, name));
         }
         return result;
     }
 
     @Nonnull
-    public DistributionQueueItemState getState(@Nonnull DistributionQueueItem queueItem) {
-        DistributionQueueItemState itemStatus = statusMap.get(queueItem);
+    public DistributionQueueItemStatus getStatus(@Nonnull DistributionQueueItem queueItem) {
+        DistributionQueueItemStatus itemStatus = statusMap.get(queueItem);
 
         if (queue.contains(queueItem)) {
             return itemStatus;
         } else {
-            return new DistributionQueueItemState(itemStatus.getEntered(), ItemState.SUCCEEDED, itemStatus.getAttempts(), name);
+            return new DistributionQueueItemStatus(itemStatus.getEntered(), ItemState.SUCCEEDED, itemStatus.getAttempts(), name);
         }
     }
 
     public DistributionQueueItem getHead() {
         DistributionQueueItem element = queue.peek();
         if (element != null) {
-            DistributionQueueItemState itemState = statusMap.get(element);
-            statusMap.put(element, new DistributionQueueItemState(itemState.getEntered(),
+            DistributionQueueItemStatus itemState = statusMap.get(element);
+            statusMap.put(element, new DistributionQueueItemStatus(itemState.getEntered(),
                     itemState.getItemState(),
                     itemState.getAttempts() + 1, name));
         }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java Thu Dec 11 13:00:37 2014
@@ -30,7 +30,7 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.impl.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.resources.DistributionConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -106,7 +106,7 @@ public class DistributionAgentQueueServl
                 builder.append('{');
                 builder.append(toJSoN(item));
                 builder.append(',');
-                builder.append(toJSoN(queue.getState(item)));
+                builder.append(toJSoN(queue.getStatus(item)));
                 builder.append("},");
             }
             builder.deleteCharAt(builder.length() - 1);
@@ -116,7 +116,7 @@ public class DistributionAgentQueueServl
         return builder.toString();
     }
 
-    private String toJSoN(DistributionQueueItemState status) {
+    private String toJSoN(DistributionQueueItemStatus status) {
         StringBuilder builder = new StringBuilder("\"attempts\":" + status.getAttempts() + ",\"state\":\"" +
                 status.getItemState().name() + "\"");
         if (status.getEntered() != null) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java Thu Dec 11 13:00:37 2014
@@ -32,7 +32,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.packaging.DistributionPackageInfo;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.impl.DistributionQueueDispatchingStrategy;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.apache.sling.distribution.queue.impl.simple.SimpleDistributionQueue;
 import org.junit.Test;
@@ -57,7 +57,7 @@ public class SimpleDistributionAgentTest
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
-        Iterable<DistributionQueueItemState> states = Arrays.asList(new DistributionQueueItemState(DistributionQueueItemState.ItemState.ERROR, DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME));
+        Iterable<DistributionQueueItemStatus> states = Arrays.asList(new DistributionQueueItemStatus(DistributionQueueItemStatus.ItemState.ERROR, DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME));
         when(distributionHandler.add(any(DistributionPackage.class), any(DistributionQueueProvider.class))).thenReturn(states);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
@@ -101,7 +101,7 @@ public class SimpleDistributionAgentTest
         ResourceResolver resourceResolver = mock(ResourceResolver.class);
 
         when(distributionPackage.getInfo()).thenReturn(new DistributionPackageInfo());
-        Iterable<DistributionQueueItemState> states = Arrays.asList(new DistributionQueueItemState(DistributionQueueItemState.ItemState.QUEUED,
+        Iterable<DistributionQueueItemStatus> states = Arrays.asList(new DistributionQueueItemStatus(DistributionQueueItemStatus.ItemState.QUEUED,
                 DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME));
         when(distributionHandler.add(any(DistributionPackage.class), any(DistributionQueueProvider.class))).thenReturn(states);
         when(packageExporter.exportPackages(any(ResourceResolver.class), any(DistributionRequest.class)))

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheckTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheckTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheckTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheckTest.java Thu Dec 11 13:00:37 2014
@@ -25,7 +25,7 @@ import java.util.List;
 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.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.hc.api.Result;
 import org.junit.Test;
 
@@ -77,9 +77,9 @@ public class DistributionQueueHealthChec
         distributionQueueHealthCheck.activate(Collections.<String, Object>emptyMap());
         DistributionQueue queue = mock(DistributionQueue.class);
         DistributionQueueItem item = mock(DistributionQueueItem.class);
-        DistributionQueueItemState status = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus status = mock(DistributionQueueItemStatus.class);
         when(status.getAttempts()).thenReturn(1);
-        when(queue.getState(item)).thenReturn(status);
+        when(queue.getStatus(item)).thenReturn(status);
         when(queue.getHead()).thenReturn(item);
         DistributionAgent distributionAgent = mock(DistributionAgent.class);
 
@@ -102,9 +102,9 @@ public class DistributionQueueHealthChec
         distributionQueueHealthCheck.activate(Collections.<String, Object>emptyMap());
         DistributionQueue queue = mock(DistributionQueue.class);
         DistributionQueueItem item = mock(DistributionQueueItem.class);
-        DistributionQueueItemState status = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus status = mock(DistributionQueueItemStatus.class);
         when(status.getAttempts()).thenReturn(10);
-        when(queue.getState(item)).thenReturn(status);
+        when(queue.getStatus(item)).thenReturn(status);
         when(queue.getHead()).thenReturn(item);
         DistributionAgent distributionAgent = mock(DistributionAgent.class);
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java Thu Dec 11 13:00:37 2014
@@ -24,7 +24,7 @@ import java.util.Iterator;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.junit.Test;
 import org.osgi.service.component.ComponentContext;
@@ -48,12 +48,12 @@ public class ErrorAwareQueueDistribution
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -69,13 +69,13 @@ public class ErrorAwareQueueDistribution
 
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(queueItem)).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
         when(state.isSuccessful()).thenReturn(false);
-        when(queue.getState(queueItem)).thenReturn(state);
+        when(queue.getStatus(queueItem)).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -101,14 +101,14 @@ public class ErrorAwareQueueDistribution
         DistributionQueue errorQueue = mock(DistributionQueue.class);
         when(errorQueue.add(queueItem)).thenReturn(true);
         when(queueProvider.getQueue(ErrorAwareQueueDispatchingStrategy.ERROR_QUEUE_NAME)).thenReturn(errorQueue);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
         when(state.isSuccessful()).thenReturn(false);
         when(state.getAttempts()).thenReturn(2);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -130,11 +130,11 @@ public class ErrorAwareQueueDistribution
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         when(queue.getHead()).thenReturn(mock(DistributionQueueItem.class));
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
         when(state.isSuccessful()).thenReturn(false);
         when(state.getAttempts()).thenReturn(2);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
-        Iterable<DistributionQueueItemState> returnedState = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
+        Iterable<DistributionQueueItemStatus> returnedState = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedState);
     }
 
@@ -146,12 +146,12 @@ public class ErrorAwareQueueDistribution
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java Thu Dec 11 13:00:37 2014
@@ -24,7 +24,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.packaging.DistributionPackageInfo;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.junit.Test;
 
@@ -51,12 +51,12 @@ public class PriorityPathQueueDistributi
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -74,12 +74,12 @@ public class PriorityPathQueueDistributi
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue("/content")).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -97,9 +97,9 @@ public class PriorityPathQueueDistributi
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(false);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -119,9 +119,9 @@ public class PriorityPathQueueDistributi
         when(queueProvider.getQueue("/content")).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(false);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -139,12 +139,12 @@ public class PriorityPathQueueDistributi
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -163,12 +163,12 @@ public class PriorityPathQueueDistributi
 
         when(queueProvider.getQueue("/apps")).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java Thu Dec 11 13:00:37 2014
@@ -23,7 +23,7 @@ import java.util.Iterator;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.junit.Test;
 
@@ -46,12 +46,12 @@ public class SingleQueueDistributionStra
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -66,12 +66,12 @@ public class SingleQueueDistributionStra
         DistributionQueueItem queueItem = mock(DistributionQueueItem.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(queueItem)).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
         when(state.isSuccessful()).thenReturn(false);
-        when(queue.getState(queueItem)).thenReturn(state);
-        Iterable<DistributionQueueItemState> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
+        when(queue.getStatus(queueItem)).thenReturn(state);
+        Iterable<DistributionQueueItemStatus> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());
@@ -85,12 +85,12 @@ public class SingleQueueDistributionStra
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
-        DistributionQueueItemState state = mock(DistributionQueueItemState.class);
-        when(queue.getState(any(DistributionQueueItem.class))).thenReturn(state);
+        DistributionQueueItemStatus state = mock(DistributionQueueItemStatus.class);
+        when(queue.getStatus(any(DistributionQueueItem.class))).thenReturn(state);
 
-        Iterable<DistributionQueueItemState> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
+        Iterable<DistributionQueueItemStatus> returnedStates = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
         assertNotNull(returnedStates);
-        Iterator<DistributionQueueItemState> iterator = returnedStates.iterator();
+        Iterator<DistributionQueueItemStatus> iterator = returnedStates.iterator();
         assertNotNull(iterator);
         assertTrue(iterator.hasNext());
         assertNotNull(iterator.next());

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueTest.java Thu Dec 11 13:00:37 2014
@@ -25,8 +25,8 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.packaging.DistributionPackageInfo;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
-import org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus.ItemState;
 import org.apache.sling.event.jobs.Job;
 import org.apache.sling.event.jobs.JobBuilder;
 import org.apache.sling.event.jobs.JobManager;
@@ -87,7 +87,7 @@ public class JobHandlingDistributionQueu
         packageInfo.setRequestType(DistributionRequestType.ADD);
         when(distributionQueueItem.getPackageInfo()).thenReturn(packageInfo);
         assertTrue(queue.add(distributionQueueItem));
-        DistributionQueueItemState status = queue.getState(distributionQueueItem);
+        DistributionQueueItemStatus status = queue.getStatus(distributionQueueItem);
         assertNotNull(status);
         assertFalse(status.isSuccessful());
         assertEquals(ItemState.DROPPED, status.getItemState());

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueTest.java?rev=1644622&r1=1644621&r2=1644622&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueTest.java Thu Dec 11 13:00:37 2014
@@ -20,7 +20,7 @@ package org.apache.sling.distribution.qu
 
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
-import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemStatus;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -52,7 +52,7 @@ public class SimpleDistributionQueueTest
         assertFalse(queue.isEmpty());
         assertNotNull(queue.remove(pkg.getId()));
         assertTrue(queue.isEmpty());
-        DistributionQueueItemState status = queue.getState(pkg);
+        DistributionQueueItemStatus status = queue.getStatus(pkg);
         assertNotNull(status);
         assertTrue(status.isSuccessful());
     }
@@ -68,7 +68,7 @@ public class SimpleDistributionQueueTest
         assertFalse(queue.isEmpty());
         assertNotNull(queue.remove(pkg.getId()));
         assertTrue(queue.isEmpty());
-        DistributionQueueItemState status = queue.getState(pkg);
+        DistributionQueueItemStatus status = queue.getStatus(pkg);
         assertNotNull(status);
         assertTrue(status.isSuccessful());
         assertEquals(1, status.getAttempts());



Mime
View raw message