sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1638060 - in /sling/trunk/contrib/extensions/distribution: api/ api/src/main/java/org/apache/sling/distribution/agent/ api/src/main/java/org/apache/sling/distribution/communication/ api/src/main/java/org/apache/sling/distribution/event/ ap...
Date Tue, 11 Nov 2014 10:12:30 GMT
Author: tommaso
Date: Tue Nov 11 10:12:29 2014
New Revision: 1638060

URL: http://svn.apache.org/r1638060
Log:
SLING-4153 - removed serializable, made request constructors consistent, adjusted jsr305 annotations

Modified:
    sling/trunk/contrib/extensions/distribution/api/   (props changed)
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/communication/DistributionRequest.java
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.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/queue/impl/jobhandling/JobHandlingDistributionQueueProvider.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/AbstractDistributionPackageBuilder.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackage.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionTriggerServlet.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/impl/AdvancedHttpDistributionTransportHandler.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/RemoteEventDistributionTrigger.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/util/RequestUtils.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/serialization/impl/VoidDistributionPackageBuilderTest.java

Propchange: sling/trunk/contrib/extensions/distribution/api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Nov 11 10:12:29 2014
@@ -1 +1,3 @@
+target
+
 *.iml

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java
(original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java
Tue Nov 11 10:12:29 2014
@@ -44,6 +44,7 @@ public interface DistributionAgent exten
      * retrieves the names of the queues for this agent.
      * @return the list of queue names
      */
+    @Nonnull
     Iterable<String> getQueueNames();
 
     /**
@@ -54,7 +55,7 @@ public interface DistributionAgent exten
      * @throws DistributionAgentException if an error occurs in retrieving the queue
      */
     @CheckForNull
-    DistributionQueue getQueue(@Nullable String name) throws DistributionAgentException;
+    DistributionQueue getQueue(@Nonnull String name) throws DistributionAgentException;
 
     /**
      * executes a {@link org.apache.sling.distribution.communication.DistributionRequest}

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/communication/DistributionRequest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/communication/DistributionRequest.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/communication/DistributionRequest.java
(original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/communication/DistributionRequest.java
Tue Nov 11 10:12:29 2014
@@ -32,7 +32,7 @@ public class DistributionRequest {
 
     private final String[] paths;
 
-    public DistributionRequest(@Nonnull DistributionActionType action, @Nonnull String[]
paths) {
+    public DistributionRequest(@Nonnull DistributionActionType action, @Nonnull String...
paths) {
         this(System.currentTimeMillis(), action, paths);
     }
 
@@ -45,7 +45,7 @@ public class DistributionRequest {
     /**
      * get the time this distribution request was created
      *
-     * @return a <code>long</code> representing the distribution request creation
time e.g. as returned by {@code System#currentTimeMillis}
+     * @return the distribution request creation time as returned by {@code System#currentTimeMillis}
      */
     public long getTime() {
         return time;
@@ -54,16 +54,16 @@ public class DistributionRequest {
     /**
      * get the {@link DistributionActionType} associated with this request
      *
-     * @return the action as a <code>distributionActionType</code>
+     * @return the action as a {@link org.apache.sling.distribution.communication.DistributionActionType}
      */
-    public DistributionActionType getAction() {
+    public DistributionActionType getActionType() {
         return action;
     }
 
     /**
      * get the paths for this distribution request
      *
-     * @return an array of <code>String</code>s representing the paths
+     * @return an array of paths
      */
     public String[] getPaths() {
         return paths;

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
(original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
Tue Nov 11 10:12:29 2014
@@ -34,7 +34,7 @@ public enum DistributionEventType {
     PACKAGE_QUEUED,
 
     /**
-     * event for package replicated
+     * event for package distributed
      */
     PACKAGE_DISTRIBUTED,
 

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java
(original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java
Tue Nov 11 10:12:29 2014
@@ -21,7 +21,6 @@ package org.apache.sling.distribution.pa
 import javax.annotation.Nonnull;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Serializable;
 
 import aQute.bnd.annotation.ConsumerType;
 
@@ -29,7 +28,7 @@ import aQute.bnd.annotation.ConsumerType
  * A distribution package
  */
 @ConsumerType
-public interface DistributionPackage extends Serializable {
+public interface DistributionPackage {
 
     /**
      * get package id. the id is a unique string that can be used to retrieve

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.java
Tue Nov 11 10:12:29 2014
@@ -46,10 +46,10 @@ public class PrivilegeDistributionReques
         Session session = resourceResolver.adaptTo(Session.class);
 
         try {
-           if (DistributionActionType.ADD.equals(distributionRequest.getAction())) {
+           if (DistributionActionType.ADD.equals(distributionRequest.getActionType())) {
                checkPermissionForAdd(session, distributionRequest.getPaths());
            }
-           else if (DistributionActionType.DELETE.equals(distributionRequest.getAction()))
{
+           else if (DistributionActionType.DELETE.equals(distributionRequest.getActionType()))
{
                checkPermissionForDelete(session, distributionRequest.getPaths());
            }
 

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=1638060&r1=1638059&r2=1638060&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
Tue Nov 11 10:12:29 2014
@@ -199,14 +199,15 @@ public class SimpleDistributionAgent imp
         return distributionResponse;
     }
 
+    @Nonnull
     public Iterable<String> getQueueNames() {
         return queueDistributionStrategy.getQueueNames();
     }
 
-    public DistributionQueue getQueue(String queueName) throws DistributionAgentException
{
+    public DistributionQueue getQueue(@Nonnull String queueName) throws DistributionAgentException
{
         DistributionQueue queue;
         try {
-            if (queueName != null && queueName.length() > 0) {
+            if (queueName.length() > 0) {
                 queue = queueProvider.getQueue(queueName);
             } else {
                 queue = queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME);

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueProvider.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueProvider.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingDistributionQueueProvider.java
Tue Nov 11 10:12:29 2014
@@ -75,6 +75,7 @@ public class JobHandlingDistributionQueu
         String childTopic = topic + "/*";
         jobProps.put(JobConsumer.PROPERTY_TOPICS, new String[]{topic, childTopic});
         log.info("registering job consumer for agent {}", name);
+        log.info("qp: {}, jp: {}", queueProcessor, jobProps);
         jobConsumer = context.registerService(JobConsumer.class.getName(), new DistributionAgentJobConsumer(queueProcessor),
jobProps);
         log.info("job consumer for agent {} registered", name);
     }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/AbstractDistributionPackageBuilder.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/AbstractDistributionPackageBuilder.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/AbstractDistributionPackageBuilder.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/AbstractDistributionPackageBuilder.java
Tue Nov 11 10:12:29 2014
@@ -62,15 +62,15 @@ public abstract class AbstractDistributi
     public DistributionPackage createPackage(@Nonnull ResourceResolver resourceResolver,
@Nonnull DistributionRequest request)
             throws DistributionPackageBuildingException {
         DistributionPackage distributionPackage;
-        if (DistributionActionType.ADD.equals(request.getAction())) {
+        if (DistributionActionType.ADD.equals(request.getActionType())) {
             distributionPackage = createPackageForAdd(resourceResolver, request);
-        } else if (DistributionActionType.DELETE.equals(request.getAction())) {
+        } else if (DistributionActionType.DELETE.equals(request.getActionType())) {
             distributionPackage = new VoidDistributionPackage(request, type);
-        } else if (DistributionActionType.POLL.equals(request.getAction())) {
+        } else if (DistributionActionType.POLL.equals(request.getActionType())) {
             distributionPackage = new VoidDistributionPackage(request, type);
         } else {
             throw new DistributionPackageBuildingException("unknown action type "
-                    + request.getAction());
+                    + request.getActionType());
         }
         if (distributionPackage != null && distributionEventFactory != null) {
             Dictionary<String, Object> dictionary = new Hashtable<String, Object>();

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackage.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackage.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackage.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackage.java
Tue Nov 11 10:12:29 2014
@@ -54,8 +54,8 @@ public class VoidDistributionPackage ext
     public VoidDistributionPackage(DistributionRequest request, String type) {
         this.type = type;
         this.paths = request.getPaths();
-        this.action = request.getAction().toString();
-        this.id = request.getAction().toString()
+        this.action = request.getActionType().toString();
+        this.id = request.getActionType().toString()
                 + ':' + Arrays.toString(request.getPaths()).replaceAll("\\[", "").replaceAll("\\]",
"")
                 + ':' + request.getTime()
                 + ':' + type;

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=1638060&r1=1638059&r2=1638060&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
Tue Nov 11 10:12:29 2014
@@ -28,6 +28,7 @@ import org.apache.sling.api.servlets.Sli
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.communication.DistributionParameter;
 import org.apache.sling.distribution.queue.DistributionQueue;
+import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
 import org.apache.sling.distribution.resources.DistributionConstants;
@@ -49,7 +50,7 @@ public class DistributionAgentQueueServl
 
         if (agent != null) {
             try {
-                DistributionQueue queue = agent.getQueue(queueName);
+                DistributionQueue queue = agent.getQueue(queueName != null ? queueName :
DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME);
                 response.getWriter().write(toJSoN(queue)); // TODO : use json writer
                 response.setStatus(200);
             } catch (Exception e) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionTriggerServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionTriggerServlet.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionTriggerServlet.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionTriggerServlet.java
Tue Nov 11 10:12:29 2014
@@ -106,11 +106,11 @@ public class DistributionTriggerServlet 
         // write the actual data
         // this could be simple text or could be JSON-encoded text that the
         // client then decodes
-        writer.write("data: " + distributionRequest.getAction() + " " + Arrays.toString(distributionRequest.getPaths())
+ "\n\n");
+        writer.write("data: " + distributionRequest.getActionType() + " " + Arrays.toString(distributionRequest.getPaths())
+ "\n\n");
 
         // flush the buffers to make sure the container sends the bytes
         writer.flush();
-        log.debug("SSE event {}: {} {}", new Object[]{distributionRequest.getTime(), distributionRequest.getAction(),
+        log.debug("SSE event {}: {} {}", new Object[]{distributionRequest.getTime(), distributionRequest.getActionType(),
                 distributionRequest.getPaths()});
     }
 }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/impl/AdvancedHttpDistributionTransportHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/impl/AdvancedHttpDistributionTransportHandler.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/impl/AdvancedHttpDistributionTransportHandler.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/impl/AdvancedHttpDistributionTransportHandler.java
Tue Nov 11 10:12:29 2014
@@ -144,7 +144,6 @@ public class AdvancedHttpDistributionTra
                                 DistributionEndpoint distributionEndpoint) throws IOException
{
         String type = distributionPackage.getType();
 
-
         Request req = Request.Post(distributionEndpoint.getUri()).useExpectContinue();
 
         if (useCustomHeaders) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/RemoteEventDistributionTrigger.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/RemoteEventDistributionTrigger.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/RemoteEventDistributionTrigger.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/RemoteEventDistributionTrigger.java
Tue Nov 11 10:12:29 2014
@@ -129,7 +129,7 @@ public class RemoteEventDistributionTrig
             handler.handle(distributionRequest);
             log.info("distribution request to agent {} sent ({} {})", new Object[]{
                     handler,
-                    distributionRequest.getAction(),
+                    distributionRequest.getActionType(),
                     distributionRequest.getPaths()});
 
             super.onContentReceived(decoder, ioctrl);

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/util/RequestUtils.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/util/RequestUtils.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/util/RequestUtils.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/util/RequestUtils.java
Tue Nov 11 10:12:29 2014
@@ -43,7 +43,7 @@ public class RequestUtils {
 
     public static URI appendDistributionRequest(URI uri, DistributionRequest distributionRequest)
throws URISyntaxException {
         URIBuilder uriBuilder = new URIBuilder(uri);
-        uriBuilder.addParameter(DistributionParameter.ACTION.toString(), distributionRequest.getAction().getName());
+        uriBuilder.addParameter(DistributionParameter.ACTION.toString(), distributionRequest.getActionType().getName());
         for (String path : distributionRequest.getPaths()) {
             uriBuilder.addParameter(DistributionParameter.PATH.toString(), path);
         }

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=1638060&r1=1638059&r2=1638060&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
Tue Nov 11 10:12:29 2014
@@ -161,7 +161,7 @@ public class SimpleDistributionAgentTest
         DistributionQueue queue = mock(DistributionQueue.class);
         when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME))
                 .thenReturn(queue);
-        assertNotNull(agent.getQueue(null));
+        assertNotNull(agent.getQueue(""));
     }
 
     @Test

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackageBuilderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackageBuilderTest.java?rev=1638060&r1=1638059&r2=1638060&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackageBuilderTest.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/serialization/impl/VoidDistributionPackageBuilderTest.java
Tue Nov 11 10:12:29 2014
@@ -47,7 +47,7 @@ public class VoidDistributionPackageBuil
         String[] paths = new String[0];
         for (DistributionActionType action : DistributionActionType.values()) {
             DistributionRequest request = mock(DistributionRequest.class);
-            when(request.getAction()).thenReturn(action);
+            when(request.getActionType()).thenReturn(action);
             when(request.getPaths()).thenReturn(paths);
             when(request.getTime()).thenReturn(System.currentTimeMillis());
             DistributionPackage distributionPackage = voiddistributionPackageBuilder.createPackage(resourceResolver,
request);



Mime
View raw message