Package org.apache.sling.tenant
Interface Tenant
-
@ProviderType public interface Tenant
TheTenant
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 theproperty
whose string representation is used as this tenant'sdescription
(value is "sling.tenant.description").static java.lang.String
PROP_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 ornull
if no such property exists or if the property value itself isnull
.<Type> Type
getProperty(java.lang.String name, Type type)
Returns the named property converted to the requested type ornull
if the property does not exist, the property value itself isnull
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.
-
-
-
Field Detail
-
PROP_NAME
static final java.lang.String PROP_NAME
The name of theproperty
whose string representation is used as this tenant'sname
(value is "sling.tenant.name").- See Also:
getName()
,getProperty(String)
, Constant Field Values
-
PROP_DESCRIPTION
static final java.lang.String PROP_DESCRIPTION
The name of theproperty
whose string representation is used as this tenant'sdescription
(value is "sling.tenant.description").- See Also:
getDescription()
,getProperty(String)
, Constant Field Values
-
-
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 ornull
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 ornull
if the property is not defined.
-
getProperty
java.lang.Object getProperty(java.lang.String name)
Returns the named property ornull
if no such property exists or if the property value itself isnull
.
-
getProperty
<Type> Type getProperty(java.lang.String name, Type type)
Returns the named property converted to the requested type ornull
if the property does not exist, the property value itself isnull
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.
-
-