This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.distribution.api-0.1.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-api.git
commit 6e7027194cb84c42d6f12bf4befa57853887d8f3 Author: Marius Petria <[email protected]> AuthorDate: Mon Dec 15 12:51:50 2014 +0000 SLING-4153: moving all extensions API from api package to core git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/distribution/api@1645643 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 5 - .../distribution/agent/DistributionAgent.java | 77 -------------- .../agent/DistributionAgentException.java | 34 ------ .../sling/distribution/agent/package-info.java | 24 ----- .../communication/DistributionResponse.java | 2 +- .../distribution/communication/Distributor.java | 29 +++++- .../communication/SimpleDistributionRequest.java | 5 +- .../packaging/DistributionPackage.java | 75 -------------- .../DistributionPackageExportException.java | 34 ------ .../packaging/DistributionPackageExporter.java | 67 ------------ .../DistributionPackageImportException.java | 38 ------- .../packaging/DistributionPackageImporter.java | 55 ---------- .../packaging/DistributionPackageInfo.java | 115 --------------------- .../packaging/SharedDistributionPackage.java | 43 -------- .../sling/distribution/packaging/package-info.java | 24 ----- .../distribution/queue/DistributionQueue.java | 102 ------------------ .../queue/DistributionQueueException.java | 34 ------ .../distribution/queue/DistributionQueueItem.java | 69 ------------- .../queue/DistributionQueueItemStatus.java | 85 --------------- .../queue/DistributionQueueProcessor.java | 39 ------- .../queue/DistributionQueueProvider.java | 54 ---------- .../sling/distribution/queue/package-info.java | 24 ----- .../transport/DistributionTransportSecret.java | 3 +- .../DistributionTransportSecretProvider.java | 3 +- .../trigger/DistributionRequestHandler.java | 40 ------- .../distribution/trigger/DistributionTrigger.java | 50 --------- .../trigger/DistributionTriggerException.java | 33 ------ .../sling/distribution/trigger/package-info.java | 24 ----- 28 files changed, 33 insertions(+), 1154 deletions(-) diff --git a/pom.xml b/pom.xml index a39cf1c..7f5219a 100644 --- a/pom.xml +++ b/pom.xml @@ -69,13 +69,8 @@ <instructions> <Bundle-SymbolicName>org.apache.sling.distribution.api</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 </Export-Package> </instructions> diff --git a/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java b/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java deleted file mode 100644 index 3a7a575..0000000 --- a/src/main/java/org/apache/sling/distribution/agent/DistributionAgent.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.agent; - -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; - -import aQute.bnd.annotation.ProviderType; -import org.apache.sling.api.resource.ResourceResolver; -import org.apache.sling.distribution.communication.DistributionRequest; -import org.apache.sling.distribution.communication.DistributionResponse; -import org.apache.sling.distribution.queue.DistributionQueue; - -/** - * A distribution agent is responsible for handling {@link org.apache.sling.distribution.communication.DistributionRequest}s. - * <p/> - * This means executing actions of e.g.: a specific {@link org.apache.sling.distribution.communication.DistributionRequestType}s on - * specific path(s) which will resume pulling resources from a certain Sling instance and / or pushing resources to - * other instances. - */ -@ProviderType -public interface DistributionAgent { - - /** - * retrieves the names of the queues for this agent. - * - * @return the list of queue names - */ - @Nonnull - Iterable<String> getQueueNames(); - - /** - * get the agent queue with the given name - * - * @param name a queue name - * @return a {@link org.apache.sling.distribution.queue.DistributionQueue} with the given name bound to this agent, if it exists, - * {@code null} otherwise - * @throws DistributionAgentException if an error occurs in retrieving the queue - */ - @CheckForNull - DistributionQueue getQueue(@Nonnull String name) throws DistributionAgentException; - - /** - * Perform a {@link org.apache.sling.distribution.communication.DistributionRequest} to distribute content from a source - * instance to a target instance. - * The content to be sent will be assembled according to the information contained in the request. - * A {@link org.apache.sling.distribution.communication.DistributionResponse} holding the {@link org.apache.sling.distribution.communication.DistributionRequestState} - * of the provided request will be returned. - * Synchronous {@link org.apache.sling.distribution.agent.DistributionAgent}s will usually block until the execution has finished - * while asynchronous agents will usually return the response as soon as the content to be distributed has been assembled - * and scheduled for distribution. - * - * @param distributionRequest the distribution request - * @param resourceResolver the resource resolver used for authorizing the request, - * @return a {@link org.apache.sling.distribution.communication.DistributionResponse} - * @throws DistributionAgentException if any error happens during the execution of the request or if the authentication fails - */ - @Nonnull - DistributionResponse execute(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionAgentException; - -} diff --git a/src/main/java/org/apache/sling/distribution/agent/DistributionAgentException.java b/src/main/java/org/apache/sling/distribution/agent/DistributionAgentException.java deleted file mode 100644 index 6b8bb28..0000000 --- a/src/main/java/org/apache/sling/distribution/agent/DistributionAgentException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.agent; - -/** - * Represents errors happened while {@link DistributionAgent}s do distributions. - */ -@SuppressWarnings("serial") -public class DistributionAgentException extends Exception { - - public DistributionAgentException(Exception e) { - super(e); - } - - public DistributionAgentException(String string) { - super(string); - } -} diff --git a/src/main/java/org/apache/sling/distribution/agent/package-info.java b/src/main/java/org/apache/sling/distribution/agent/package-info.java deleted file mode 100644 index d3f2e4c..0000000 --- a/src/main/java/org/apache/sling/distribution/agent/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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.agent; - -import aQute.bnd.annotation.Version; - diff --git a/src/main/java/org/apache/sling/distribution/communication/DistributionResponse.java b/src/main/java/org/apache/sling/distribution/communication/DistributionResponse.java index 44c35a5..423dbe2 100644 --- a/src/main/java/org/apache/sling/distribution/communication/DistributionResponse.java +++ b/src/main/java/org/apache/sling/distribution/communication/DistributionResponse.java @@ -26,7 +26,7 @@ import javax.annotation.Nullable; /** * A {@link org.apache.sling.distribution.communication.DistributionResponse} represents the outcome of a - * {@link org.apache.sling.distribution.communication.DistributionRequest} as handled by a certain {@link org.apache.sling.distribution.agent.DistributionAgent}. + * {@link org.apache.sling.distribution.communication.DistributionRequest} as handled by a certain distribution agent. * Such a response will include the {@link org.apache.sling.distribution.communication.DistributionRequestState state} of * the {@link org.apache.sling.distribution.communication.DistributionRequest request} and optionally a message for more * verbose information about the outcome of the request. diff --git a/src/main/java/org/apache/sling/distribution/communication/Distributor.java b/src/main/java/org/apache/sling/distribution/communication/Distributor.java index 376b22c..ac492be 100644 --- a/src/main/java/org/apache/sling/distribution/communication/Distributor.java +++ b/src/main/java/org/apache/sling/distribution/communication/Distributor.java @@ -1,11 +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.communication; import aQute.bnd.annotation.ProviderType; import org.apache.sling.api.resource.ResourceResolver; -import org.apache.sling.distribution.agent.DistributionAgentException; import javax.annotation.Nonnull; +/** + * A distributor is responsible for dispatching {@link org.apache.sling.distribution.communication.DistributionRequest}s to distribution agents. + * <p/> + * The distribution agents are executing the requests by creating packages from a source Sling instance containing content for the specified paths + * and then pushing and installing these on a target instance. + */ @ProviderType public interface Distributor { /** @@ -14,7 +38,7 @@ public interface Distributor { * The content to be sent will be assembled according to the information contained in the request. * A {@link org.apache.sling.distribution.communication.DistributionResponse} holding the {@link org.apache.sling.distribution.communication.DistributionRequestState} * of the provided request will be returned. - * Synchronous {@link org.apache.sling.distribution.agent.DistributionAgent}s will usually block until the execution has finished + * Synchronous distribution agents will usually block until the execution has finished * while asynchronous agents will usually return the response as soon as the content to be distributed has been assembled * and scheduled for distribution. * @@ -23,6 +47,7 @@ public interface Distributor { * @param resourceResolver the resource resolver used for authorizing the request, * @return a {@link org.apache.sling.distribution.communication.DistributionResponse} */ + @Nonnull DistributionResponse distribute(@Nonnull String agentName, @Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest); diff --git a/src/main/java/org/apache/sling/distribution/communication/SimpleDistributionRequest.java b/src/main/java/org/apache/sling/distribution/communication/SimpleDistributionRequest.java index 98e092e..201e5e0 100644 --- a/src/main/java/org/apache/sling/distribution/communication/SimpleDistributionRequest.java +++ b/src/main/java/org/apache/sling/distribution/communication/SimpleDistributionRequest.java @@ -40,7 +40,7 @@ public final class SimpleDistributionRequest implements DistributionRequest { */ public SimpleDistributionRequest(@Nonnull DistributionRequestType requestType, boolean isDeep, @Nonnull String... paths) { this.requestType = requestType; - deep = isDeep; + this.deep = isDeep; this.paths = paths; } @@ -82,9 +82,10 @@ public final class SimpleDistributionRequest implements DistributionRequest { @Override public String toString() { - return "DistributionRequest{" + + return "SimpleDistributionRequest{" + ", requestType=" + requestType + ", paths=" + Arrays.toString(paths) + + ", deep=" + deep + '}'; } diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java deleted file mode 100644 index ec661f2..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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.packaging; - -import javax.annotation.Nonnull; -import java.io.IOException; -import java.io.InputStream; - -import aQute.bnd.annotation.ConsumerType; - -/** - * A distribution package - */ -@ConsumerType -public interface DistributionPackage { - - /** - * get package id. the id is a unique string that can be used to retrieve - * the package from an {@link DistributionPackageExporter} - * - * @return the package id - */ - @Nonnull - String getId(); - - /** - * get the type of package - * - * @return the package type - */ - @Nonnull - String getType(); - - /** - * creates a package stream. - * a new stream is created for each call and it is the caller's obligation to close the stream. - * - * @return an {@link InputStream} - * @throws IOException - */ - @Nonnull - InputStream createInputStream() throws IOException; - - /** - * releases all resources associated with this package - */ - void delete(); - - /** - * gets an additional info holder for this package. - * The additional info object contains control information rather than content information. - * For example info.origin can be used to skip distributing back to the originating endpoint. - * - * @return the associated metadata to this package - */ - @Nonnull - DistributionPackageInfo getInfo(); - -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java deleted file mode 100644 index b225686..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExportException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.packaging; - -/** - * This represents an error happening while exporting a {@link DistributionPackage} - */ -@SuppressWarnings("serial") -public class DistributionPackageExportException extends Exception { - - public DistributionPackageExportException(String message) { - super(message); - } - - public DistributionPackageExportException(Throwable t) { - super(t); - } -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java deleted file mode 100644 index 25aed24..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageExporter.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.packaging; - - -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; -import java.util.List; - -import aQute.bnd.annotation.ConsumerType; -import org.apache.sling.api.resource.ResourceResolver; -import org.apache.sling.distribution.communication.DistributionRequest; - -/** - * A {@link DistributionPackageExporter ) is responsible of exporting - * {@link DistributionPackage }s to be then imported by a {@link org.apache.sling.distribution.agent.DistributionAgent } - * (via a {@link DistributionPackageImporter }). - * <p/> - * Exporting a {@link org.apache.sling.distribution.packaging.DistributionPackage} means obtaining that package by either - * directly creating it by bundling local Sling resources together or retrieving it from a remote endpoint, e.g. by - * executing an HTTP POST request on another Sling instance exposing already created packages (for remotely changed resources). - */ -@ConsumerType -public interface DistributionPackageExporter { - - /** - * Exports the {@link DistributionPackage}s built from the - * passed {@link org.apache.sling.distribution.communication.DistributionRequest}. - * - * @param resourceResolver - the resource resolver used to export the packages, for example a 'local' exporter - * will use the resource resolver to read the content and assemble the binary in a certain - * location in the repository while a 'remote' exporter will use the resolver just to - * store the binary of the remotely fetched packages in the repository. - * @param distributionRequest - the request containing the needed information for content to be exported - * @return a {@link java.util.List} of {@link DistributionPackage}s - */ - @Nonnull - List<DistributionPackage> exportPackages(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionRequest distributionRequest) throws DistributionPackageExportException; - - /** - * Retrieves a {@link DistributionPackage} given its identifier, if it already exists. - * This will be used for example to get already created (and cached) packages that were not yet distributed to the - * target instance. - * - * @param resourceResolver - the resource resolver use to obtain the package. - * @param distributionPackageId - the {@link DistributionPackage#getId() id of the package} to be retrieved - * @return a {@link DistributionPackage} if available, {@code null} otherwise - */ - @CheckForNull - DistributionPackage getPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull String distributionPackageId); -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java deleted file mode 100644 index e22ec91..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImportException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.packaging; - -/** - * This represents an error happening while importing a {@link DistributionPackage} - */ -@SuppressWarnings("serial") -public class DistributionPackageImportException extends Exception { - - public DistributionPackageImportException(String message) { - super(message); - } - - public DistributionPackageImportException(Throwable t) { - super(t); - } - - public DistributionPackageImportException(String message, Exception e) { - super(message, e); - } -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java deleted file mode 100644 index a97b215..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageImporter.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.packaging; - -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; -import java.io.InputStream; - -import aQute.bnd.annotation.ConsumerType; -import org.apache.sling.api.resource.ResourceResolver; - -/** - * A {@link DistributionPackageImporter} is responsible for importing - * {@link DistributionPackage}s into the resource tree. - */ -@ConsumerType -public interface DistributionPackageImporter { - - /** - * Imports the given distribution package into the underlying system - * - * @param resourceResolver - the resource resolver used to import the resources - * @param distributionPackage - the package to be imported - * @throws DistributionPackageImportException if any error occurs during import - */ - void importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull DistributionPackage distributionPackage) throws DistributionPackageImportException; - - /** - * Tries to convert an {@link java.io.InputStream} to a {@link DistributionPackage} and then imports it into the underlying system - * - * @param resourceResolver - the resource resolver used to read the package - * @param stream the {@link InputStream} of the package to be converted and installed - * @return a {@link DistributionPackage} if the stream has been successfully converted and installed - * @throws DistributionPackageImportException when the stream cannot be read as a {@link DistributionPackage} and installed - */ - @CheckForNull - DistributionPackage importStream(@Nonnull ResourceResolver resourceResolver, @Nonnull InputStream stream) throws DistributionPackageImportException; - -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java b/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java deleted file mode 100644 index c5b55ee..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/DistributionPackageInfo.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.packaging; - -import javax.annotation.CheckForNull; -import java.net.URI; -import java.util.Arrays; - -import org.apache.sling.distribution.communication.DistributionRequestType; - -/** - * Additional information about a package. - * Additional information is optional and components should expect every piece of it to be null. - */ -public final class DistributionPackageInfo { - - private URI origin; - private DistributionRequestType requestType; - private String[] paths; - - /** - * get the paths covered by the package holding this info - * - * @return an array of paths - */ - @CheckForNull - public String[] getPaths() { - return paths; - } - - /** - * get the request type associated to the package holding this info - * - * @return the request type - */ - @CheckForNull - public DistributionRequestType getRequestType() { - return requestType; - } - - /** - * retrieves the origin of the package holding this info - * - * @return the package origin - */ - @CheckForNull - public URI getOrigin() { - return origin; - } - - /** - * sets the origin of the package. - * - * @param origin the originating instance of this package - */ - public void setOrigin(URI origin) { - this.origin = origin; - } - - /** - * sets the request type for the package holding this info - * - * @param requestType the request type that originated this package - */ - public void setRequestType(DistributionRequestType requestType) { - this.requestType = requestType; - } - - /** - * sets the paths "covered" by the package holding this info - * - * @param paths the paths "covered" by this package - */ - public void setPaths(String[] paths) { - this.paths = paths; - } - - /** - * fills the current info object from the provided one. - * - * @param packageInfo package metadata - */ - public void fillInfo(DistributionPackageInfo packageInfo) { - if (packageInfo != null) { - this.setOrigin(packageInfo.getOrigin()); - this.setPaths(packageInfo.getPaths()); - this.setRequestType(packageInfo.getRequestType()); - } - } - - @Override - public String toString() { - return "DistributionPackageInfo{" + - "origin=" + origin + - ", requestType=" + requestType + - ", paths=" + Arrays.toString(paths) + - '}'; - } -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java b/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java deleted file mode 100644 index 647f89d..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/SharedDistributionPackage.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.packaging; - -import javax.annotation.Nonnull; - -import aQute.bnd.annotation.ConsumerType; - -/** - * A {@link DistributionPackage} that offers basic reference counting - */ -@ConsumerType -public interface SharedDistributionPackage extends DistributionPackage { - - - /** - * acquire a reference to this package and increase the reference count. - */ - void acquire(@Nonnull String holderName); - - /** - * release a reference to this package and decrease the reference count. - * when no more references are hold the package {@code DistributionPackage#delete} method is called. - */ - void release(@Nonnull String holderName); - -} diff --git a/src/main/java/org/apache/sling/distribution/packaging/package-info.java b/src/main/java/org/apache/sling/distribution/packaging/package-info.java deleted file mode 100644 index e0a3160..0000000 --- a/src/main/java/org/apache/sling/distribution/packaging/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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.packaging; - -import aQute.bnd.annotation.Version; - diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java deleted file mode 100644 index 7db554f..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueue.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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.CheckForNull; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import aQute.bnd.annotation.ProviderType; - -/** - * A queue is responsible for collecting the {@link org.apache.sling.distribution.packaging.DistributionPackage}s - * exported by a {@link org.apache.sling.distribution.agent.DistributionAgent} in - * order to be able to process them also when there are multiple (concurrent) - * {@link org.apache.sling.distribution.communication.DistributionRequest}s executed - * on that same agent. - * <p/> - * The items (packages) in the queue can then get processed according to a FIFO - * strategy or in parallel, or some other way, via {@link org.apache.sling.distribution.queue.DistributionQueueProcessor}s. - */ -@ProviderType -public interface DistributionQueue { - - /** - * get this queue name - * - * @return the queue name - */ - @Nonnull - String getName(); - - /** - * add a distribution item to this queue - * - * @param item a distribution item representing a {@link org.apache.sling.distribution.packaging.DistributionPackage} - * to distribute - * @return {@code true} if the distribution item was added correctly to the queue, - * {@code false} otherwise - */ - boolean add(@Nonnull DistributionQueueItem item); - - /** - * get the status of a certain item in the queue - * - * @param item the distribution item to get the status for - * @return the item status in the queue - * @throws DistributionQueueException if any error occurs while getting the status - */ - @Nonnull - DistributionQueueItemStatus getStatus(@Nonnull DistributionQueueItem item) - throws DistributionQueueException; - - /** - * get the first item (in a FIFO strategy, the next to be processed) from the queue - * - * @return the first item into the queue or {@code null} if the queue is empty - */ - @CheckForNull - DistributionQueueItem getHead(); - - /** - * check if the queue is empty - * - * @return {@code true} if the queue is empty, {@code false} otherwise - */ - boolean isEmpty(); - - /** - * get all the items in the queue - * - * @param skip the number of items to skip - * @param limit the maximum number of items to return. use -1 to return all items. - * @return a {@link java.lang.Iterable} of {@link DistributionQueueItem}s - */ - @Nonnull - Iterable<DistributionQueueItem> getItems(int skip, int limit); - - /** - * remove an item from the queue by specifying its id - * - * @param packageId the id of the package represented by the item - * @return the removed item, or {@code null} if the item with the given id - * doesn't exist - */ - DistributionQueueItem remove(@Nonnull String packageId); -} diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueException.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueException.java deleted file mode 100644 index c5d7520..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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; - -/** - * Represents errors happening during queue operations - */ -@SuppressWarnings("serial") -public class DistributionQueueException extends Exception { - - public DistributionQueueException(String message, Exception e) { - super(message, e); - } - - public DistributionQueueException(String string) { - super(string); - } -} diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItem.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItem.java deleted file mode 100644 index bca8db9..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItem.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 org.apache.sling.distribution.packaging.DistributionPackageInfo; - -/** - * An item in a {@link DistributionQueue} - * <p/> - * This is basically a proxy to {@link org.apache.sling.distribution.packaging.DistributionPackage} designed to avoid having - * to keep the package {@link org.apache.sling.distribution.packaging.DistributionPackage#createInputStream() stream} into - * the queues. - */ -public class DistributionQueueItem { - - private final String id; - - private final String type; - - private final DistributionPackageInfo packageInfo; - - public DistributionQueueItem(@Nonnull String id, @Nonnull String type, @Nonnull DistributionPackageInfo packageInfo) { - this.id = id; - this.type = type; - this.packageInfo = packageInfo; - } - - @Nonnull - public String getId() { - return id; - } - - @Nonnull - public String getType() { - return type; - } - - @Nonnull - public DistributionPackageInfo getPackageInfo() { - return packageInfo; - } - - @Override - public String toString() { - return "DistributionQueueItem{" + - "id='" + id + '\'' + - ", type='" + type + '\'' + - ", packageInfo=" + packageInfo + - '}'; - } -} diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java deleted file mode 100644 index c905c2a..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItemStatus.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 DistributionQueueItemStatus { - - private final int attempts; - - private final ItemState state; - - private final Calendar entered; - - private final String queueName; - - public DistributionQueueItemStatus(Calendar entered, ItemState state, int attempts, String queueName) { - this.entered = entered; - this.state = state; - this.attempts = attempts; - this.queueName = queueName; - } - - public DistributionQueueItemStatus(ItemState state, String queueName) { - this(Calendar.getInstance(), state, 0, queueName); - } - - public boolean isSuccessful() { - return ItemState.SUCCEEDED.equals(state); - } - - public int getAttempts() { - return attempts; - } - - public ItemState getItemState() { - return state; - } - - public String getQueueName() { - return queueName; - } - - @Override - public String toString() { - return "{\"attempts\":\"" + attempts + "\",\"" + "successful\":\"" + isSuccessful() + "\",\"" + "state\":\"" + state + - "\",\"" + "queueName\":\"" + queueName + "\"}"; - } - - 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 - } - -} diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java deleted file mode 100644 index e104022..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProcessor.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.ProviderType; - -/** - * Processor of {@link DistributionQueueItem}s - */ -@ProviderType -public interface DistributionQueueProcessor { - - /** - * Process an item from a certain {@link org.apache.sling.distribution.queue.DistributionQueue} - * - * @param queueName the name of the {@link org.apache.sling.distribution.queue.DistributionQueue} to be processed - * @param distributionQueueItem the {@link org.apache.sling.distribution.queue.DistributionQueueItem} to be processed - * @return {@code true} if the item was successfully processed, {@code false} otherwise - */ - public boolean process(@Nonnull String queueName, @Nonnull DistributionQueueItem distributionQueueItem); -} diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java deleted file mode 100644 index 0e2d0a8..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueProvider.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.ProviderType; - -/** - * A provider for {@link DistributionQueue}s - */ -@ProviderType -public interface DistributionQueueProvider { - - /** - * 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 processing - * - * @param queueProcessor the queue processor to be used - */ - void enableQueueProcessing(@Nonnull DistributionQueueProcessor queueProcessor) throws DistributionQueueException; - - - /** - * disables queue processing - * - */ - void disableQueueProcessing() throws DistributionQueueException; -} diff --git a/src/main/java/org/apache/sling/distribution/queue/package-info.java b/src/main/java/org/apache/sling/distribution/queue/package-info.java deleted file mode 100644 index 70795e9..0000000 --- a/src/main/java/org/apache/sling/distribution/queue/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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; - diff --git a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java index 1beceb3..476581b 100644 --- a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java +++ b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java @@ -28,8 +28,7 @@ import aQute.bnd.annotation.ConsumerType; * The secret to be transported for authenticating transport layer connecting two instances. * <p/> * Secrets can take different forms, like e.g. username and password, tokens, public keys, etc. and are meant to be used - * by transport implementations lying under {@link org.apache.sling.distribution.packaging.DistributionPackageImporter importers} - * and / or {@link org.apache.sling.distribution.packaging.DistributionPackageExporter exporters}. + * by transport implementations used by distribution agents. */ @ConsumerType public interface DistributionTransportSecret { diff --git a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java index c709ad1..ec6c3b9 100644 --- a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java +++ b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java @@ -25,8 +25,7 @@ import aQute.bnd.annotation.ConsumerType; /** * A provider for {@link org.apache.sling.distribution.transport.DistributionTransportSecret}s * <p/> - * Such providers can be used by {@link org.apache.sling.distribution.packaging.DistributionPackageExporter exporters} or - * {@link org.apache.sling.distribution.packaging.DistributionPackageImporter importers} implementations in order to plug + * Such providers can be used by distribution agents implementations in order to plug * in different types of {@link org.apache.sling.distribution.transport.DistributionTransportSecret secrets} to be used * to authenticate the underlying Sling instances. */ diff --git a/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java b/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java deleted file mode 100644 index 0d77435..0000000 --- a/src/main/java/org/apache/sling/distribution/trigger/DistributionRequestHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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); - -} diff --git a/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java b/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java deleted file mode 100644 index 5525a7f..0000000 --- a/src/main/java/org/apache/sling/distribution/trigger/DistributionTrigger.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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; - -/** - * A {@link DistributionTrigger} is responsible to trigger - * {@link org.apache.sling.distribution.communication.DistributionRequest}s upon certain 'events' (e.g. Sling / Jcr events, - * periodic pulling, 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 { - - /** - * 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 any error happen - */ - void unregister(@Nonnull DistributionRequestHandler requestHandler) throws DistributionTriggerException; -} diff --git a/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java b/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java deleted file mode 100644 index 36c91cd..0000000 --- a/src/main/java/org/apache/sling/distribution/trigger/DistributionTriggerException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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); - } -} diff --git a/src/main/java/org/apache/sling/distribution/trigger/package-info.java b/src/main/java/org/apache/sling/distribution/trigger/package-info.java deleted file mode 100644 index 5fd7c36..0000000 --- a/src/main/java/org/apache/sling/distribution/trigger/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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; - -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
