sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1637392 [2/3] - in /sling/trunk/contrib: ./ extensions/distribution/api/ extensions/distribution/api/src/ extensions/distribution/api/src/main/ extensions/distribution/api/src/main/java/ extensions/distribution/api/src/main/java/org/ exten...
Date Fri, 07 Nov 2014 15:52:55 GMT
Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemSelector.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemSelector.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemSelector.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemSelector.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.sling.distribution.queue;
+
+/**
+ * Class representing criteria for queue items selection.
+ */
+public class DistributionQueueItemSelector {
+    private final int skip;
+    private final int limit;
+
+    /**
+     *
+     * @param skip the number of items to skip
+     * @param limit the maximum number of items to return. use -1 to return all items.
+     */
+    public DistributionQueueItemSelector(int skip, int limit) {
+        this.skip = skip;
+        this.limit = limit;
+    }
+
+    /**
+     * @return the number of items to skip from the queue.
+     */
+    public int getSkip() {
+        return skip;
+    }
+
+    /**
+     *
+     * @return return the maximum number of items to be selected.
+     */
+    public int getLimit() {
+        return limit;
+    }
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemSelector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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/DistributionQueueItemState.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.queue;
+
+import java.util.Calendar;
+
+/**
+ * the current status of a certain item in a {@link DistributionQueue}
+ */
+
+public class DistributionQueueItemState {
+
+    private final int attempts;
+
+    private final ItemState state;
+
+    private final Calendar entered;
+
+    public DistributionQueueItemState(Calendar entered, ItemState state, int attempts) {
+
+        this.entered = entered;
+        this.state = state;
+        this.attempts = attempts;
+    }
+
+    public DistributionQueueItemState(ItemState state) {
+        this(Calendar.getInstance(), state, 0);
+    }
+
+    public boolean isSuccessful() {
+        return ItemState.SUCCEEDED.equals(state);
+    }
+
+    public int getAttempts() {
+        return attempts;
+    }
+
+    public ItemState getItemState() {
+        return state;
+    }
+
+    @Override
+    public String toString() {
+        return "{\"attempts\":\"" + attempts + "\",\"" + "successful\":\"" + isSuccessful() + "\",\"" + "state\":\"" + state + "\"}";
+    }
+
+    public Calendar getEntered() {
+        return entered;
+    }
+
+    public enum ItemState {
+        QUEUED, // waiting in queue after adding or for restart after failing
+        ACTIVE, // job is currently in processing
+        SUCCEEDED, // processing finished successfully
+        STOPPED, // processing was stopped by a user
+        GIVEN_UP, // number of retries reached
+        ERROR, // processing signaled CANCELLED or throw an exception
+        DROPPED // dropped jobs
+    }
+
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.queue;
+
+import javax.annotation.Nonnull;
+
+import aQute.bnd.annotation.ConsumerType;
+
+/**
+ * Processor of {@link DistributionQueueItem}s
+ */
+@ConsumerType
+public interface DistributionQueueProcessor {
+
+    /**
+     * Process an item from a certain <code>distributionQueue</code>
+     *
+     * @param queueName            the name of the <code>distributionQueue</code> to be processed
+     * @param distributionQueueItem the <code>distributionQueueItem</code> to be processed
+     * @return <code>true</code> if the item was successfully processed, <code>false</code> otherwise
+     */
+    public boolean process(@Nonnull String queueName, @Nonnull DistributionQueueItem distributionQueueItem);
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.queue;
+
+import javax.annotation.Nonnull;
+
+import aQute.bnd.annotation.ConsumerType;
+import org.apache.sling.distribution.component.DistributionComponent;
+
+/**
+ * A provider for {@link DistributionQueue}s
+ */
+@ConsumerType
+public interface DistributionQueueProvider extends DistributionComponent {
+
+    /**
+     * provide a named queue for the given agent
+     *
+     * @param queueName the name of the queue to retrieve
+     * @return a {@link DistributionQueue}
+     * @throws DistributionQueueException if any error happens
+     */
+    @Nonnull
+    DistributionQueue getQueue(@Nonnull String queueName) throws DistributionQueueException;
+
+    /**
+     * enables queue driven processing for an agent
+     *
+     * @param queueProcessor the queue processor to be used
+     */
+    void enableQueueProcessing(@Nonnull DistributionQueueProcessor queueProcessor) throws DistributionQueueException;
+
+
+    /**
+     * disables queue driven processing for an agent
+     *
+     */
+    void disableQueueProcessing() throws DistributionQueueException;
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/package-info.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/package-info.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/package-info.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/package-info.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@Version("0.1.0")
+package org.apache.sling.distribution.queue;
+
+import aQute.bnd.annotation.Version;
+

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationContext.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationContext.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationContext.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationContext.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.transport.authentication;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class TransportAuthenticationContext {
+    private final Map<String, Object> attributes = new HashMap<String, Object>();
+
+    @SuppressWarnings("unchecked")
+    public <T> T getAttribute(String name, Class<? extends T> klass) {
+        T result = null;
+        Object object = attributes.get(name);
+        if (klass.isInstance(object)) {
+            result = (T) object;
+        }
+        return result;
+    }
+
+    public <T> void addAttribute(String name, T object) {
+        attributes.put(name, object);
+    }
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationException.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationException.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationException.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationException.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.transport.authentication;
+
+/**
+ * Represents an error in transport authentication
+ */
+@SuppressWarnings("serial")
+public class TransportAuthenticationException extends Exception {
+
+    public TransportAuthenticationException(String string) {
+        super(string);
+    }
+
+    public TransportAuthenticationException(Exception e) {
+        super(e);
+    }
+
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationProvider.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationProvider.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationProvider.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.transport.authentication;
+
+import aQute.bnd.annotation.ConsumerType;
+import org.apache.sling.distribution.component.DistributionComponent;
+
+/**
+ * A {@link org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider} is responsible for
+ * authentication of instances sending and receiving distribution items via transport algorithms
+ * A {@link org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider} will authenticate
+ * 'authenticables' objects of type {@link A}, producing 'authenticated' objects of type {@link T}.
+ *
+ */
+@ConsumerType
+public interface TransportAuthenticationProvider<A, T> extends DistributionComponent {
+
+    /**
+     * Check if this provider is able to authenticate objects belonging to given 'authenticable' class.
+     *
+     * @param authenticable class of objects to be authenticated
+     * @return <code>true</code> if this provider can check authentication on instances of this class, <code>false</code>
+     * otherwise
+     */
+    boolean canAuthenticate(Class<A> authenticable);
+
+    /**
+     * Authenticate an 'authenticable' object by performing some implementation specific operation on it, and producing
+     * an 'authenticated' object to be passed back to a transport algorithm.
+     * The returned 'authenticated' object may be of the same class of the 'authenticable' object (e.g. passing an 'authenticable'
+     * http client and returning an 'authenticated' http client) or of a different class (e.g. passing an 'authenticable'
+     * jcr repository and returning an 'authenticated' jcr session).
+     *
+     * @param authenticable class of objects to be authenticated
+     * @param context       authentication context holding authentication information
+     * @return an 'authenticated' object to be used by the transport
+     * @throws TransportAuthenticationException
+     */
+    T authenticate(A authenticable, TransportAuthenticationContext context)
+            throws TransportAuthenticationException;
+
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/TransportAuthenticationProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/package-info.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/package-info.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/package-info.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/package-info.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@Version("0.1.0")
+package org.apache.sling.distribution.transport.authentication;
+
+import aQute.bnd.annotation.Version;
+

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/transport/authentication/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.trigger;
+
+import javax.annotation.Nonnull;
+
+import aQute.bnd.annotation.ConsumerType;
+import org.apache.sling.distribution.communication.DistributionRequest;
+
+/**
+ * An handler for {@link org.apache.sling.distribution.communication.DistributionRequest}s passed to a
+ * {@link DistributionTrigger}
+ */
+@ConsumerType
+public interface DistributionRequestHandler {
+
+    /**
+     * handle the request according to the trigger implementation.
+     *
+     * @param request a distribution request
+     */
+    void handle(@Nonnull DistributionRequest request);
+
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.trigger;
+
+import javax.annotation.Nonnull;
+
+import aQute.bnd.annotation.ConsumerType;
+import org.apache.sling.distribution.component.DistributionComponent;
+
+/**
+ * A {@link DistributionTrigger} is responsible to trigger
+ * {@link org.apache.sling.distribution.communication.DistributionRequest}s upon certain 'events' (e.g. Sling / Jcr events,
+ * periodic polling, etc.).
+ * A {@link DistributionTrigger} is meant to be stateless so that more than one
+ * {@link DistributionRequestHandler} can be registered into the same trigger.
+ */
+@ConsumerType
+public interface DistributionTrigger extends DistributionComponent {
+
+    /**
+     * register a request handler to be triggered and returns a corresponding registration id
+     *
+     * @param requestHandler handler
+     * @throws DistributionTriggerException if registration fails
+     */
+    void register(@Nonnull DistributionRequestHandler requestHandler) throws DistributionTriggerException;
+
+    /**
+     * unregister the given handler, if existing
+     *
+     * @param requestHandler handler to unregister
+     * @throws DistributionTriggerException if unregistration fails
+     */
+    void unregister(@Nonnull DistributionRequestHandler requestHandler) throws DistributionTriggerException;
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.distribution.trigger;
+
+/**
+ * Exception representing errors during (un)registration of {@link DistributionTrigger}s
+ */
+public class DistributionTriggerException extends Exception {
+
+    public DistributionTriggerException(String message, Throwable throwable) {
+        super(message, throwable);
+    }
+
+    public DistributionTriggerException(String message) {
+        super(message);
+    }
+}

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/package-info.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/package-info.java?rev=1637392&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/package-info.java (added)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/package-info.java Fri Nov  7 15:52:52 2014
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@Version("0.1.0")
+package org.apache.sling.distribution.trigger;
+
+import aQute.bnd.annotation.Version;
+

Propchange: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/trigger/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: sling/trunk/contrib/extensions/distribution/core/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/pom.xml?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/pom.xml (original)
+++ sling/trunk/contrib/extensions/distribution/core/pom.xml Fri Nov  7 15:52:52 2014
@@ -38,8 +38,8 @@
 
     <name>Apache Sling Distribution Core</name>
     <description>
-        The Apache Sling Distribution core bundle provides a set of utilities to distribute content from / to other Sling
-        instances.
+        The Apache Sling Distribution Core bundle provides the basic code infrastructure and API implementations for the
+        Sling Content Distribution module
     </description>
 
     <scm>
@@ -68,17 +68,6 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>org.apache.sling.distribution.core</Bundle-SymbolicName>
-                        <Export-Package>
-                            org.apache.sling.distribution.component,
-                            org.apache.sling.distribution.agent,
-                            org.apache.sling.distribution.communication,
-                            org.apache.sling.distribution.event,
-                            org.apache.sling.distribution.queue,
-                            org.apache.sling.distribution.trigger,
-                            org.apache.sling.distribution.packaging,
-                            org.apache.sling.distribution.transport.authentication,
-                            org.apache.sling.distribution.util
-                        </Export-Package>
                         <Embed-Dependency>httpasyncclient</Embed-Dependency>
                     </instructions>
                 </configuration>
@@ -120,6 +109,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.distribution.api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.osgi</artifactId>
             <version>2.2.0</version>
         </dependency>

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java Fri Nov  7 15:52:52 2014
@@ -32,12 +32,11 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.component.DistributionComponent;
-import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.component.DistributionComponentProvider;
+import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
 import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
@@ -46,6 +45,7 @@ import org.apache.sling.distribution.que
 import org.apache.sling.distribution.queue.impl.jobhandling.JobHandlingDistributionQueueProvider;
 import org.apache.sling.distribution.resources.impl.OsgiUtils;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.settings.SlingSettingsService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;

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=1637392&r1=1637391&r2=1637392&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 Fri Nov  7 15:52:52 2014
@@ -40,9 +40,19 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.event.DistributionEventType;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
-import org.apache.sling.distribution.packaging.*;
-import org.apache.sling.distribution.queue.*;
-import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
+import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExportException;
+import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.packaging.DistributionPackageImportException;
+import org.apache.sling.distribution.packaging.DistributionPackageImporter;
+import org.apache.sling.distribution.packaging.SharedDistributionPackage;
+import org.apache.sling.distribution.queue.DistributionQueue;
+import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+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.DistributionQueueProcessor;
+import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.apache.sling.distribution.trigger.DistributionRequestHandler;
 import org.apache.sling.distribution.trigger.DistributionTrigger;
 import org.apache.sling.distribution.trigger.DistributionTriggerException;
@@ -151,7 +161,7 @@ public class SimpleDistributionAgent imp
         return passive;
     }
 
-    private List<DistributionPackage> exportPackages(ResourceResolver agentResourceResolver, DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+    private List<DistributionPackage> exportPackages(ResourceResolver agentResourceResolver, DistributionRequest distributionRequest) throws DistributionPackageExportException {
         return distributionPackageExporter.exportPackages(agentResourceResolver, distributionRequest);
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java Fri Nov  7 15:52:52 2014
@@ -20,7 +20,10 @@ package org.apache.sling.distribution.ag
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import java.util.*;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
 
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -31,12 +34,11 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.component.DistributionComponent;
-import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.component.DistributionComponentProvider;
+import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
 import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
@@ -45,6 +47,7 @@ import org.apache.sling.distribution.que
 import org.apache.sling.distribution.queue.impl.jobhandling.JobHandlingDistributionQueueProvider;
 import org.apache.sling.distribution.resources.impl.OsgiUtils;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.settings.SlingSettingsService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java Fri Nov  7 15:52:52 2014
@@ -34,8 +34,6 @@ import org.apache.jackrabbit.vault.packa
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.commons.scheduler.Scheduler;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.agent.DistributionRequestAuthorizationStrategy;
 import org.apache.sling.distribution.agent.impl.PrivilegeDistributionRequestAuthorizationStrategy;
@@ -70,6 +68,8 @@ import org.apache.sling.distribution.tri
 import org.apache.sling.distribution.trigger.impl.RemoteEventDistributionTrigger;
 import org.apache.sling.distribution.trigger.impl.ResourceEventDistributionTrigger;
 import org.apache.sling.distribution.trigger.impl.ScheduledDistributionTrigger;
+import org.apache.sling.event.jobs.JobManager;
+import org.apache.sling.jcr.api.SlingRepository;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/GenericDistributionComponentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/GenericDistributionComponentFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/GenericDistributionComponentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/GenericDistributionComponentFactory.java Fri Nov  7 15:52:52 2014
@@ -36,9 +36,9 @@ import org.apache.felix.scr.annotations.
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.component.DistributionComponent;
-import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.component.DistributionComponentProvider;
+import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.resources.impl.OsgiUtils;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
 import org.apache.sling.distribution.trigger.DistributionTrigger;

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=1637392&r1=1637391&r2=1637392&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 Fri Nov  7 15:52:52 2014
@@ -18,7 +18,9 @@
  */
 package org.apache.sling.distribution.monitor;
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.felix.scr.annotations.Activate;
@@ -33,13 +35,13 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.References;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.commons.osgi.PropertiesUtil;
-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.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.hc.api.HealthCheck;
+import org.apache.sling.hc.api.Result;
+import org.apache.sling.hc.util.FormattingResultLog;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/AgentDistributionPackageExporterFactory.java Fri Nov  7 15:52:52 2014
@@ -34,14 +34,14 @@ import org.apache.felix.scr.annotations.
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.distribution.agent.DistributionAgent;
+import org.apache.sling.distribution.communication.DistributionRequest;
 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.DistributionPackageExportException;
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
-import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -86,8 +86,7 @@ public class AgentDistributionPackageExp
     }
 
     @Nonnull
-    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
-
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException {
        return packageExporter.exportPackages(resourceResolver, distributionRequest);
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporter.java Fri Nov  7 15:52:52 2014
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.distribution.communication.DistributionRequest;
 import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExportException;
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
 import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
 import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
@@ -42,10 +43,15 @@ public class LocalDistributionPackageExp
     }
 
     @Nonnull
-    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException {
         List<DistributionPackage> result = new ArrayList<DistributionPackage>();
 
-        DistributionPackage createdPackage = packageBuilder.createPackage(resourceResolver, distributionRequest);
+        DistributionPackage createdPackage;
+        try {
+            createdPackage = packageBuilder.createPackage(resourceResolver, distributionRequest);
+        } catch (DistributionPackageBuildingException e) {
+            throw new DistributionPackageExportException(e);
+        }
         if (createdPackage != null) {
             result.add(createdPackage);
         }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/LocalDistributionPackageExporterFactory.java Fri Nov  7 15:52:52 2014
@@ -31,12 +31,12 @@ 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.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
 import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageExportException;
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
-import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,7 +80,7 @@ public class LocalDistributionPackageExp
 
 
     @Nonnull
-    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException {
         return exporter.exportPackages(resourceResolver, distributionRequest);
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporter.java Fri Nov  7 15:52:52 2014
@@ -23,14 +23,14 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.sling.api.resource.ResourceResolver;
-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.DistributionPackageExportException;
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
+import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
 import org.apache.sling.distribution.transport.DistributionTransportHandler;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
 import org.apache.sling.distribution.transport.impl.MultipleEndpointDistributionTransportHandler;
 import org.apache.sling.distribution.transport.impl.SimpleHttpDistributionTransportHandler;
 import org.apache.sling.distribution.transport.impl.TransportEndpointStrategyType;
@@ -73,11 +73,11 @@ public class RemoteDistributionPackageEx
     }
 
     @Nonnull
-    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException {
         try {
             return transportHandler.retrievePackages(resourceResolver, distributionRequest);
         } catch (Exception e) {
-            throw new DistributionPackageBuildingException(e);
+            throw new DistributionPackageExportException(e);
         }
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/exporter/RemoteDistributionPackageExporterFactory.java Fri Nov  7 15:52:52 2014
@@ -35,14 +35,14 @@ 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.distribution.communication.DistributionRequest;
 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.DistributionPackageExportException;
 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;
@@ -115,7 +115,7 @@ public class RemoteDistributionPackageEx
     }
 
     @Nonnull
-    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageBuildingException {
+    public List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException {
         return exporter.exportPackages(resourceResolver, distributionRequest);
     }
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/AdvancedRemoteDistributionPackageImporter.java Fri Nov  7 15:52:52 2014
@@ -34,15 +34,15 @@ 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.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
+import org.apache.sling.distribution.packaging.DistributionPackage;
 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.AdvancedHttpDistributionTransportHandler;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
 import org.apache.sling.distribution.transport.impl.MultipleEndpointDistributionTransportHandler;
 import org.apache.sling.distribution.transport.impl.TransportEndpointStrategyType;
 import org.slf4j.Logger;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.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?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporter.java Fri Nov  7 15:52:52 2014
@@ -27,9 +27,9 @@ import java.util.Hashtable;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.distribution.event.DistributionEventType;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
+import org.apache.sling.distribution.packaging.DistributionPackage;
 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;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporterFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporterFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/LocalDistributionPackageImporterFactory.java Fri Nov  7 15:52:52 2014
@@ -33,9 +33,9 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.distribution.component.DistributionComponentFactory;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
+import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.packaging.DistributionPackageImportException;
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
-import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporter.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporter.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporter.java Fri Nov  7 15:52:52 2014
@@ -24,12 +24,12 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.packaging.DistributionPackageImportException;
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
-import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
-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.DistributionEndpoint;
 import org.apache.sling.distribution.transport.impl.MultipleEndpointDistributionTransportHandler;
 import org.apache.sling.distribution.transport.impl.SimpleHttpDistributionTransportHandler;
 import org.apache.sling.distribution.transport.impl.TransportEndpointStrategyType;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporterFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporterFactory.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporterFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporterFactory.java Fri Nov  7 15:52:52 2014
@@ -36,9 +36,9 @@ import org.apache.sling.api.resource.Res
 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.packaging.DistributionPackage;
 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.transport.authentication.TransportAuthenticationProvider;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RepositoryDistributionPackageImporter.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RepositoryDistributionPackageImporter.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RepositoryDistributionPackageImporter.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RepositoryDistributionPackageImporter.java Fri Nov  7 15:52:52 2014
@@ -30,15 +30,15 @@ import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.util.Text;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.distribution.event.DistributionEventType;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
+import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.packaging.DistributionPackageImportException;
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
-import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
-import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationContext;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
+import org.apache.sling.jcr.api.SlingRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java Fri Nov  7 15:52:52 2014
@@ -19,6 +19,8 @@
 package org.apache.sling.distribution.queue.impl;
 
 import javax.annotation.Nonnull;
+import java.util.Arrays;
+import java.util.List;
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
@@ -29,9 +31,6 @@ import org.apache.sling.distribution.que
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Arrays;
-import java.util.List;
-
 /**
  * The default strategy for delivering packages to queues. Each agent just manages a single queue,
  * no failure / stuck handling where each package is put regardless of anything.

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/DistributionAgentJobConsumer.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/DistributionAgentJobConsumer.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/DistributionAgentJobConsumer.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/DistributionAgentJobConsumer.java Fri Nov  7 15:52:52 2014
@@ -18,10 +18,10 @@
  */
 package org.apache.sling.distribution.queue.impl.jobhandling;
 
-import org.apache.sling.event.jobs.Job;
-import org.apache.sling.event.jobs.consumer.JobConsumer;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueProcessor;
+import org.apache.sling.event.jobs.Job;
+import org.apache.sling.event.jobs.consumer.JobConsumer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

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=1637392&r1=1637391&r2=1637392&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 Fri Nov  7 15:52:52 2014
@@ -24,11 +24,15 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
+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.DistributionQueueItemSelector;
+import org.apache.sling.distribution.queue.DistributionQueueItemState;
+import org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
 import org.apache.sling.event.jobs.Job;
 import org.apache.sling.event.jobs.JobManager;
 import org.apache.sling.event.jobs.JobManager.QueryType;
-import org.apache.sling.distribution.queue.*;
-import org.apache.sling.distribution.queue.DistributionQueueItemState.ItemState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

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=1637392&r1=1637391&r2=1637392&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 Fri Nov  7 15:52:52 2014
@@ -22,12 +22,12 @@ import javax.annotation.Nonnull;
 import java.util.Dictionary;
 import java.util.Hashtable;
 
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobConsumer;
 import org.apache.sling.distribution.queue.DistributionQueue;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueProcessor;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
+import org.apache.sling.event.jobs.JobManager;
+import org.apache.sling.event.jobs.consumer.JobConsumer;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.slf4j.Logger;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingUtils.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingUtils.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingUtils.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/jobhandling/JobHandlingUtils.java Fri Nov  7 15:52:52 2014
@@ -21,9 +21,9 @@ package org.apache.sling.distribution.qu
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.sling.event.jobs.Job;
 import org.apache.sling.distribution.packaging.DistributionPackageInfo;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
+import org.apache.sling.event.jobs.Job;
 
 public class JobHandlingUtils {
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueProvider.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueProvider.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueProvider.java Fri Nov  7 15:52:52 2014
@@ -19,6 +19,9 @@
 package org.apache.sling.distribution.queue.impl.simple;
 
 import javax.annotation.Nonnull;
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.sling.commons.scheduler.ScheduleOptions;
 import org.apache.sling.commons.scheduler.Scheduler;
@@ -29,10 +32,6 @@ import org.apache.sling.distribution.que
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
 /**
  * a queue provider {@link org.apache.sling.distribution.queue.DistributionQueueProvider} for simple in memory
  * {@link org.apache.sling.distribution.queue.DistributionQueue}s

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackage.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackage.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackage.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackage.java Fri Nov  7 15:52:52 2014
@@ -19,18 +19,19 @@
 package org.apache.sling.distribution.serialization.impl;
 
 import javax.annotation.Nonnull;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
 
-import org.apache.sling.api.resource.*;
+import org.apache.sling.api.resource.PersistenceException;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.packaging.DistributionPackageInfo;
 import org.apache.sling.distribution.packaging.SharedDistributionPackage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-
 public class ResourceSharedDistributionPackage implements SharedDistributionPackage {
     private final Logger log = LoggerFactory.getLogger(getClass());
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackageBuilder.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackageBuilder.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackageBuilder.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/serialization/impl/ResourceSharedDistributionPackageBuilder.java Fri Nov  7 15:52:52 2014
@@ -20,17 +20,24 @@ package org.apache.sling.distribution.se
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
-
-import org.apache.sling.api.resource.*;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.sling.api.resource.ModifiableValueMap;
+import org.apache.sling.api.resource.PersistenceException;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceUtil;
+import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.distribution.communication.DistributionRequest;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
 import org.apache.sling.distribution.serialization.DistributionPackageBuildingException;
 import org.apache.sling.distribution.serialization.DistributionPackageReadingException;
 
-import java.io.InputStream;
-import java.util.*;
-
 public class ResourceSharedDistributionPackageBuilder implements DistributionPackageBuilder {
 
     private String PN_ORIGINAL_ID = "original.package.id";

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java Fri Nov  7 15:52:52 2014
@@ -27,8 +27,8 @@ import org.apache.sling.api.SlingHttpSer
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
-import org.apache.sling.distribution.packaging.DistributionPackageImporter;
 import org.apache.sling.distribution.packaging.DistributionPackage;
+import org.apache.sling.distribution.packaging.DistributionPackageImporter;
 import org.apache.sling.distribution.resources.DistributionConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/RepositoryTransportAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/RepositoryTransportAuthenticationProvider.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/RepositoryTransportAuthenticationProvider.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/RepositoryTransportAuthenticationProvider.java Fri Nov  7 15:52:52 2014
@@ -21,10 +21,10 @@ package org.apache.sling.distribution.tr
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationContext;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationException;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.jcr.api.SlingRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java?rev=1637392&r1=1637391&r2=1637392&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java Fri Nov  7 15:52:52 2014
@@ -23,10 +23,10 @@ import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.fluent.Executor;
-import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationContext;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationException;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
+import org.apache.sling.distribution.transport.impl.DistributionEndpoint;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 



Mime
View raw message