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 7a998eb972499a1a558878eb2bea876b7fcead18 Author: Marius Petria <[email protected]> AuthorDate: Wed Feb 4 10:01:48 2015 +0000 SLING-4391: changing distribution event api to contain constants git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/distribution/api@1657075 13f79535-47bb-0310-9956-ffa450edef68 --- ...tType.java => DistributionEventProperties.java} | 48 ++++----------------- .../event/DistributionEventTopics.java | 49 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 41 deletions(-) diff --git a/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java b/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java similarity index 50% rename from src/main/java/org/apache/sling/distribution/event/DistributionEventType.java rename to src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java index a144842..06c6acf 100644 --- a/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java +++ b/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java @@ -18,64 +18,30 @@ */ package org.apache.sling.distribution.event; + /** - * an enum of the possible types of events related to distribution + * an interface containing of the possible properties of events related to distribution */ -public enum DistributionEventType { - - /** - * event for package created - */ - AGENT_PACKAGE_CREATED, - - /** - * event for package queued - */ - AGENT_PACKAGE_QUEUED, - - /** - * event for package distributed - */ - AGENT_PACKAGE_DISTRIBUTED, - - /** - * event for package imported - */ - IMPORTER_PACKAGE_IMPORTED; - - /** - * common event topic base for distribution events - */ - public static final String EVENT_TOPIC_BASE = "org/apache/sling/distribution"; +public interface DistributionEventProperties { /** * property containing the name of component generating the event */ - public static final String PROPERTY_DISTRIBUTION_COMPONENT_NAME = "distribution.component.name"; + public static final String DISTRIBUTION_COMPONENT_NAME = "distribution.component.name"; /** * property containing the kind of the component generating the event */ - public static final String PROPERTY_DISTRIBUTION_COMPONENT_KIND= "distribution.component.kind"; + public static final String DISTRIBUTION_COMPONENT_KIND= "distribution.component.kind"; /** * property containing the type of the distribution request */ - public static final String PROPERTY_DISTRIBUTION_TYPE = "distribution.type"; + public static final String DISTRIBUTION_TYPE = "distribution.type"; /** * property containing the type of the distribution paths */ - public static final String PROPERTY_DISTRIBUTION_PATHS= "distribution.paths"; - - /** - * get the event topic for this event type - * - * @return the event topic - */ - public String getTopic() { - return EVENT_TOPIC_BASE + "/" + name().toLowerCase().replace('_', '/'); - } - + public static final String DISTRIBUTION_PATHS= "distribution.paths"; } diff --git a/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java b/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java new file mode 100644 index 0000000..890ebe0 --- /dev/null +++ b/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java @@ -0,0 +1,49 @@ +/* + * 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.event; + +/** + * an interface containing of the possible topics of events related to distribution + */ +public interface DistributionEventTopics { + + + public static final String EVENT_BASE = "org/apache/sling/distribution"; + + /** + * event for package created + */ + public static final String AGENT_PACKAGE_CREATED = EVENT_BASE + "/agent/package/created"; + + /** + * event for package queued + */ + public static final String AGENT_PACKAGE_QUEUED = EVENT_BASE + "/agent/package/queued"; + + /** + * event for package distributed + */ + public static final String AGENT_PACKAGE_DISTRIBUTED = EVENT_BASE + "/agent/package/distributed"; + + + /** + * event for package imported + */ + public static final String IMPORTER_PACKAGE_IMPORTED = EVENT_BASE + "/importer/package/imported"; +} -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
