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 String PROP_DESCRIPTION
      The name of the property whose string representation is used as this tenant's description (value is "sling.tenant.description").
      static 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
      String getDescription()
      Returns a human readable description of this tenant.
      String getId()
      Returns the unique identifier of this tenant.
      String getName()
      Returns the name of the tenant.
      Object getProperty​(String name)
      Returns the named property or null if no such property exists or if the property value itself is null.
      <Type> Type getProperty​(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.
      Iterator<String> getPropertyNames()
      Returns an iterator or String values representing the names of defined properties of this tenant.
    • Method Detail

      • getId

        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

        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

        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

        Object getProperty​(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​(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

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