public abstract class AbstractMaintenanceService
extends java.lang.Object
Constructor and Description |
---|
AbstractMaintenanceService() |
Modifier and Type | Method and Description |
---|---|
protected void |
addToGroup(java.lang.String roledDn,
java.lang.String groupDn)
Add a user or group to a group.
|
protected void |
configureJcr(Repository repository,
java.lang.String workspaceName)
Configures a workspace.
|
void |
configurePrivileges(Session session)
Adds app specific default privileges.
|
protected void |
configureStandardRoles()
To be overridden in order to programmatically set relationships between
roles.
|
void |
destroy() |
protected java.util.Set<java.lang.String> |
getRequiredRoles()
The system roles that must be available in the system.
|
protected UserAdmin |
getUserAdmin() |
protected javax.transaction.UserTransaction |
getUserTransaction() |
protected java.util.Set<java.lang.String> |
getWorkspaceNames()
To be overridden.
|
void |
init() |
protected void |
makeSureRolesExists(java.util.EnumSet<? extends Distinguished> enumSet)
Create these roles as group if they don't exist.
|
protected void |
makeSureRolesExists(java.util.Set<java.lang.String> requiredRoles)
Create these roles as group if they don't exist.
|
boolean |
prepareJcrTree(Session adminSession)
Creates the base JCR tree structure expected for this app if necessary.
|
void |
setRepository(Repository repository) |
void |
setUserAdmin(UserAdmin userAdmin) |
void |
setUserTransaction(javax.transaction.UserTransaction userTransaction) |
public void init()
protected void configureJcr(Repository repository, java.lang.String workspaceName)
protected java.util.Set<java.lang.String> getWorkspaceNames()
protected void configureStandardRoles()
public boolean prepareJcrTree(Session adminSession) throws RepositoryException, java.io.IOException
Session.hasPendingChanges()
should return
false) and saves it once the changes have been done. Thus the session can be
rolled back if an exception occurs.RepositoryException
java.io.IOException
public void configurePrivileges(Session session) throws RepositoryException
Session.hasPendingChanges()
should return
false} and saves it once the changes have been done. Thus the session can be
rolled back if an exception occurs.
Warning: no check is done and corresponding privileges are always added, so
only call this when necessaryRepositoryException
protected java.util.Set<java.lang.String> getRequiredRoles()
public void destroy()
protected void makeSureRolesExists(java.util.EnumSet<? extends Distinguished> enumSet)
protected void makeSureRolesExists(java.util.Set<java.lang.String> requiredRoles)
protected void addToGroup(java.lang.String roledDn, java.lang.String groupDn)
public void setRepository(Repository repository)
protected javax.transaction.UserTransaction getUserTransaction()
protected UserAdmin getUserAdmin()
public void setUserAdmin(UserAdmin userAdmin)
public void setUserTransaction(javax.transaction.UserTransaction userTransaction)
Copyright © 2007–2020. All rights reserved.