Package org.apache.sling.tenant.spi
Interface TenantCustomizer
-
@Deprecated @ConsumerType public interface TenantCustomizer
Deprecated.This interface will not be supported in future versions. UseTenantManagerHook
instead.This is a service interface to customize tenant setup and administration. Tools can hook into the tenant creation, changing a tenant and removing thereof by implementing this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
remove(Tenant tenant, ResourceResolver resolver)
Deprecated.Called to remove the setup for the given Tenant.java.util.Map<java.lang.String,java.lang.Object>
setup(Tenant tenant, ResourceResolver resolver)
Deprecated.Method called to create or update the given tenant.
-
-
-
Method Detail
-
setup
java.util.Map<java.lang.String,java.lang.Object> setup(Tenant tenant, ResourceResolver resolver)
Deprecated.Method called to create or update the given tenant. The method may return additional properties to be added to the Tenant's property list. The ResourceResolver allows for access to the persistence.The
ResourceResolver.commit
method must not be called by this method.This method is not expected to throw an exception. Any exception thrown is logged but otherwise ignored.
- Parameters:
tenant
- TheTenant
to be configured by this callresolver
- TheResourceResolver
providing access to the persistence for further setup. Note, that thisresolver
will have administrative privileges.- Returns:
- Additional properties to be added to the tenant. These properties
may later be accessed through the tenant's
property accessor methods.
null
or an empty map may be returned to not add properties.
-
remove
void remove(Tenant tenant, ResourceResolver resolver)
Deprecated.Called to remove the setup for the given Tenant. This reverts all changes done by the #setup method. The ResourceResolver allows for access to the persistence.The
ResourceResolver.commit
method must not be called by this method.This method is not expected to throw an exception. Any exception thrown is logged but otherwise ignored.
- Parameters:
tenant
- TheTenant
about to be removedresolver
- TheResourceResolver
providing access to the persistence for further cleanup. Note, that thisresolver
will have administrative privileges.
-
-