Class UserPerWorkspaceUserManager
- java.lang.Object
-
- org.apache.jackrabbit.core.ProtectedItemModifier
-
- org.apache.jackrabbit.core.security.user.UserManagerImpl
-
- org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager
-
- All Implemented Interfaces:
UserManager,SessionListener
public class UserPerWorkspaceUserManager extends UserManagerImpl
Derived UserManager implementation that allows to switch between autosaving and transient change mode.NOTE: This requires that the Session passed to the user manager upon creation is identical to the Session passed to
JackrabbitSecurityManager.getUserManager(Session).- See Also:
UserPerWorkspaceUserManager
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTHORIZABLES_PATHstatic StringGROUP_ADMIN_GROUP_NAMEConfiguration key and default value for the the name of the 'GroupAdmin' group-principalstatic StringGROUPS_PATHstatic NameMIX_REP_IMPERSONATABLEstatic NameN_MEMBERSstatic NameFactoryNFstatic NameNT_REP_AUTHORIZABLEstatic NameNT_REP_AUTHORIZABLE_FOLDERstatic NameNT_REP_GROUPstatic NameNT_REP_MEMBERSstatic NameNT_REP_USERstatic NameP_DISABLEDstatic NameP_GROUPSDeprecated.As of 2.0 group membership is stored with the group node.static NameP_IMPERSONATORSName of the user property containing the principal names of those allowed to impersonate.static NameP_MEMBERSstatic NameP_PASSWORDstatic NameP_PRINCIPAL_NAMEstatic NameP_USERIDDeprecated.As of 2.0 the id-hash is stored with the jcr:uuid making the rep:userId property redundant.static StringSECURITY_ROOT_PATHroot-path to security related content e.g.static StringUSER_ADMIN_GROUP_NAMEConfiguration key and default value for the the name of the 'UserAdmin' group-principal.static StringUSERS_PATH-
Fields inherited from class org.apache.jackrabbit.core.security.user.UserManagerImpl
PARAM_AUTO_EXPAND_SIZE, PARAM_AUTO_EXPAND_TREE, PARAM_COMPATIBILE_JR16, PARAM_COMPATIBLE_JR16, PARAM_DEFAULT_DEPTH, PARAM_GROUP_MEMBERSHIP_SPLIT_SIZE, PARAM_GROUPS_PATH, PARAM_PASSWORD_HASH_ALGORITHM, PARAM_PASSWORD_HASH_ITERATIONS, PARAM_USERS_PATH
-
Fields inherited from interface org.apache.jackrabbit.api.security.user.UserManager
SEARCH_TYPE_AUTHORIZABLE, SEARCH_TYPE_GROUP, SEARCH_TYPE_USER
-
-
Constructor Summary
Constructors Constructor Description UserPerWorkspaceUserManager(SessionImpl session, String adminId)Same asUserPerWorkspaceUserManager(session, adminID, null, null).UserPerWorkspaceUserManager(SessionImpl session, String adminId, Properties config)Creates a UserManager that doesn't implicitly save changes but requires an explicit call toSession.save().UserPerWorkspaceUserManager(SessionImpl session, String adminId, Properties config, MembershipCache mCache)Creates a UserManager that doesn't implicitly save changes but requires an explicit call toSession.save().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidautoSave(boolean enable)Always throwsunsupportedRepositoryOperationExceptionas modification of the autosave behavior is not supported.AuthorizablegetAuthorizableByPath(String path)Always throwsUnsupportedRepositoryOperationExceptionsince this implementation of the user management API does not allow to retrieve the path of an authorizable.booleanisAutoSave()Always returnstrueas by default the autoSave behavior cannot be altered (see alsoUserManagerImpl.autoSave(boolean).-
Methods inherited from class org.apache.jackrabbit.core.security.user.UserManagerImpl
createGroup, createGroup, createGroup, createGroup, createSystemUser, createUser, createUser, doCreateGroup, doCreateUser, findAuthorizables, findAuthorizables, findAuthorizables, getAuthorizable, getAuthorizable, getAuthorizable, getGroupsPath, getMembershipCache, getMemberSplitSize, getUsersPath, hasMemberSplitSize, loggedOut, loggingOut, setAuthorizableActions
-
Methods inherited from class org.apache.jackrabbit.core.ProtectedItemModifier
addNode, addNode, markModified, performProtected, removeItem, setProperty, setProperty, setProperty, setProperty
-
-
-
-
Field Detail
-
NF
public static final NameFactory NF
-
SECURITY_ROOT_PATH
public static final String SECURITY_ROOT_PATH
root-path to security related content e.g. principals- See Also:
- Constant Field Values
-
AUTHORIZABLES_PATH
public static final String AUTHORIZABLES_PATH
- See Also:
- Constant Field Values
-
USERS_PATH
public static final String USERS_PATH
- See Also:
- Constant Field Values
-
GROUPS_PATH
public static final String GROUPS_PATH
- See Also:
- Constant Field Values
-
USER_ADMIN_GROUP_NAME
public static final String USER_ADMIN_GROUP_NAME
Configuration key and default value for the the name of the 'UserAdmin' group-principal.- See Also:
- Constant Field Values
-
GROUP_ADMIN_GROUP_NAME
public static final String GROUP_ADMIN_GROUP_NAME
Configuration key and default value for the the name of the 'GroupAdmin' group-principal- See Also:
- Constant Field Values
-
P_PRINCIPAL_NAME
public static final Name P_PRINCIPAL_NAME
-
P_USERID
@Deprecated public static final Name P_USERID
Deprecated.As of 2.0 the id-hash is stored with the jcr:uuid making the rep:userId property redundant. It has been removed from the node type definition.
-
P_PASSWORD
public static final Name P_PASSWORD
-
P_DISABLED
public static final Name P_DISABLED
-
P_GROUPS
@Deprecated public static final Name P_GROUPS
Deprecated.As of 2.0 group membership is stored with the group node.- See Also:
P_MEMBERS
-
P_MEMBERS
public static final Name P_MEMBERS
-
N_MEMBERS
public static final Name N_MEMBERS
-
P_IMPERSONATORS
public static final Name P_IMPERSONATORS
Name of the user property containing the principal names of those allowed to impersonate.
-
NT_REP_AUTHORIZABLE
public static final Name NT_REP_AUTHORIZABLE
-
NT_REP_AUTHORIZABLE_FOLDER
public static final Name NT_REP_AUTHORIZABLE_FOLDER
-
NT_REP_USER
public static final Name NT_REP_USER
-
NT_REP_GROUP
public static final Name NT_REP_GROUP
-
NT_REP_MEMBERS
public static final Name NT_REP_MEMBERS
-
MIX_REP_IMPERSONATABLE
public static final Name MIX_REP_IMPERSONATABLE
-
-
Constructor Detail
-
UserPerWorkspaceUserManager
public UserPerWorkspaceUserManager(SessionImpl session, String adminId) throws RepositoryException
Same asUserPerWorkspaceUserManager(session, adminID, null, null).- Parameters:
session-adminId-- Throws:
RepositoryException
-
UserPerWorkspaceUserManager
public UserPerWorkspaceUserManager(SessionImpl session, String adminId, Properties config) throws RepositoryException
Creates a UserManager that doesn't implicitly save changes but requires an explicit call toSession.save().- Parameters:
session-adminId-config-- Throws:
RepositoryException
-
UserPerWorkspaceUserManager
public UserPerWorkspaceUserManager(SessionImpl session, String adminId, Properties config, MembershipCache mCache) throws RepositoryException
Creates a UserManager that doesn't implicitly save changes but requires an explicit call toSession.save().- Parameters:
session-adminId-config-- Throws:
RepositoryException
-
-
Method Detail
-
getAuthorizableByPath
public Authorizable getAuthorizableByPath(String path) throws UnsupportedRepositoryOperationException, RepositoryException
Description copied from class:UserManagerImplAlways throwsUnsupportedRepositoryOperationExceptionsince this implementation of the user management API does not allow to retrieve the path of an authorizable.- Specified by:
getAuthorizableByPathin interfaceUserManager- Overrides:
getAuthorizableByPathin classUserManagerImpl- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException- See Also:
UserManager.getAuthorizableByPath(String)
-
isAutoSave
public boolean isAutoSave()
Description copied from class:UserManagerImplAlways returnstrueas by default the autoSave behavior cannot be altered (see alsoUserManagerImpl.autoSave(boolean).- Specified by:
isAutoSavein interfaceUserManager- Overrides:
isAutoSavein classUserManagerImpl- Returns:
- Always
true. - See Also:
UserManager.isAutoSave()
-
autoSave
public void autoSave(boolean enable) throws UnsupportedRepositoryOperationException, RepositoryExceptionDescription copied from class:UserManagerImplAlways throwsunsupportedRepositoryOperationExceptionas modification of the autosave behavior is not supported.- Specified by:
autoSavein interfaceUserManager- Overrides:
autoSavein classUserManagerImpl- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException- See Also:
UserManager.autoSave(boolean)
-
-