This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tenant.git
commit 7aded9e97d180c237fcfcd27c9c4b12ca4906d13 Author: Felix Meschberger <[email protected]> AuthorDate: Fri Mar 1 08:01:05 2013 +0000 Declare implementation concept for TenantProvider and -Customizer: - Provider not to be implemented by consumers - Customizer to be implemented by consumers git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1451513 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/sling/tenant/TenantProvider.java | 19 ++++++++++++++----- .../org/apache/sling/tenant/spi/TenantCustomizer.java | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/sling/tenant/TenantProvider.java b/src/main/java/org/apache/sling/tenant/TenantProvider.java index 345b766..b491deb 100644 --- a/src/main/java/org/apache/sling/tenant/TenantProvider.java +++ b/src/main/java/org/apache/sling/tenant/TenantProvider.java @@ -20,6 +20,8 @@ package org.apache.sling.tenant; import java.util.Iterator; +import aQute.bnd.annotation.ProviderType; + /** * The <code>TenantProvider</code> defines the service interface of for a sevice * which may be asked for {@link Tenant tenant instances}. @@ -27,6 +29,7 @@ import java.util.Iterator; * For now this provider interface provides access to a tenant applying to a * particular request as well as to all tenants known to this provider. */ +@ProviderType public interface TenantProvider { /** @@ -38,6 +41,9 @@ public interface TenantProvider { /** * Returns an iterator of all {@link Tenant tenants} known to this provider. * If no tenants are known the iterator is empty. + * <p> + * This method is equivalent to calling {@link #getTenants(String)} with + * {@code null} or an empty string. */ Iterator<Tenant> getTenants(); @@ -46,14 +52,17 @@ public interface TenantProvider { * <code>tenantFilter</code>. * <p> * The <code>tenantFilter</code> is a valid OSGi filter string as defined in - * Section 3.2.6, Filter Syntax, of the OSGi Core Specification, Release 4. + * Section 3.2.6, Filter Syntax, of the OSGi Core Specification, Release 4 + * or {@code null} to return all tenants. + * <p> + * Calling this method with an empty string or {@code null} is equivalent to + * calling the {@link #getTenants()} method and returns all tenants. * <p> - * If no tenants match the <code>tenantFilter</code> or the - * <code>tenantFilter</code> is not a valid filter string the iterator is - * empty. + * If no tenants match the <code>tenantFilter</code> the iterator is empty. + * {@code null} is never returned. * * @throws IllegalArgumentException if filter syntax is invalid. A more - * detailed exception may be wrapped by the exception. + * detailed exception may be wrapped by the exception. */ Iterator<Tenant> getTenants(String tenantFilter); } diff --git a/src/main/java/org/apache/sling/tenant/spi/TenantCustomizer.java b/src/main/java/org/apache/sling/tenant/spi/TenantCustomizer.java index f25edf6..d4ab46f 100644 --- a/src/main/java/org/apache/sling/tenant/spi/TenantCustomizer.java +++ b/src/main/java/org/apache/sling/tenant/spi/TenantCustomizer.java @@ -23,10 +23,13 @@ import java.util.Map; import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.tenant.Tenant; +import aQute.bnd.annotation.ConsumerType; + /** * This is a service interface which services are called by the WebConsole * plugin (or admin tool) to complete the Tenant setup. */ +@ConsumerType public interface TenantCustomizer { /** -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
