Interface Tenant


  • @ProviderType
    public interface Tenant
    The Tenant interface represents a tenant which may be used to further customize request and other processing.

    This interface is intended to be implemented by the implementor of the TenantProvider interface to be returned by the tenant accessor methods.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROP_DESCRIPTION
      The name of the property whose string representation is used as this tenant's description (value is "sling.tenant.description").
      static java.lang.String PROP_NAME
      The name of the property whose string representation is used as this tenant's name (value is "sling.tenant.name").
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns a human readable description of this tenant.
      java.lang.String getId()
      Returns the unique identifier of this tenant.
      java.lang.String getName()
      Returns the name of the tenant.
      java.lang.Object getProperty​(java.lang.String name)
      Returns the named property or null if no such property exists or if the property value itself is null.
      <Type> Type getProperty​(java.lang.String name, Type type)
      Returns the named property converted to the requested type or null if the property does not exist, the property value itself is null or cannot be converted to the requested type.
      java.util.Iterator<java.lang.String> getPropertyNames()
      Returns an iterator or String values representing the names of defined properties of this tenant.
    • Method Detail

      • getId

        java.lang.String getId()
        Returns the unique identifier of this tenant.

        The tenant identifier has not predefined mapping to a property and may be generated automatically by the TenantProvider.

      • getName

        java.lang.String getName()
        Returns the name of the tenant. This is a short name for quickly identifying this tenant. This name is not required to be globally unique.

        The name of the tenant is the string representation of the PROP_NAME property or null if the property is not defined.

      • getDescription

        java.lang.String getDescription()
        Returns a human readable description of this tenant.

        The description of the tenant is the string representation of the PROP_DESCRIPTION property or null if the property is not defined.

      • getProperty

        java.lang.Object getProperty​(java.lang.String name)
        Returns the named property or null if no such property exists or if the property value itself is null.
      • getProperty

        <Type> Type getProperty​(java.lang.String name,
                                Type type)
        Returns the named property converted to the requested type or null if the property does not exist, the property value itself is null or cannot be converted to the requested type.
      • getPropertyNames

        java.util.Iterator<java.lang.String> getPropertyNames()
        Returns an iterator or String values representing the names of defined properties of this tenant.