Interface IBackingRepositoryLifecycleManager
-
public interface IBackingRepositoryLifecycleManager
Allows external code to do initialization work on the backing repository at certain lifecycle milestones. An example of a backing repository is JCR. Note that there is no code dependency between this interface andIUnifiedRepository
. This interface is for code that initializes any backing repository.Methods in this class must be called by an external caller (see example below). A caller can get a reference to the
IBackingRepositoryLifecycleManager
usingPentahoSystem
. Methods should be able to be called more than once with the same arguments with no adverse effects.Example: When a servlet-based application starts up, a
ServletContextListener
callsstartup()
. When a user logs in,#newTenant(String)
and#onNewUser(String)
are called. Finally, theServletContextListener
callsshutdown()
.This class is necessary since some implementations cannot observe logins. Example: JCR cannot observe logins--only node and property events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMetadataToRepository(String metadataProperty)
Boolean
doesMetadataExists(String metadataProperty)
void
newTenant()
To be called before any users belonging to the current tenant interact with the backing repository.void
newTenant(ITenant tenant)
To be called before any users belonging to a particular tenant interact with the backing repository.void
newUser()
To be called before current user interacts with the backing repository.void
newUser(ITenant tenant, String username)
To be called before user indicated byusername
interacts with the backing repository.void
shutdown()
To be called on repository shutdown.void
startup()
To be called before any (non-admin) users interact with the backing repository.
-
-
-
Method Detail
-
startup
void startup()
To be called before any (non-admin) users interact with the backing repository.
-
shutdown
void shutdown()
To be called on repository shutdown.
-
newTenant
void newTenant(ITenant tenant)
To be called before any users belonging to a particular tenant interact with the backing repository.- Parameters:
new
- Tenant
-
newTenant
void newTenant()
To be called before any users belonging to the current tenant interact with the backing repository.
-
newUser
void newUser(ITenant tenant, String username)
To be called before user indicated byusername
interacts with the backing repository.- Parameters:
tenant
- to which the user belongsusername
- new username
-
newUser
void newUser()
To be called before current user interacts with the backing repository.
-
addMetadataToRepository
void addMetadataToRepository(String metadataProperty)
-
-