Class UserImpl
- java.lang.Object
-
- org.apache.jackrabbit.core.security.user.UserImpl
-
- All Implemented Interfaces:
Authorizable,User
public class UserImpl extends Object implements User
UserImpl
-
-
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
-
Constructor Summary
Constructors Modifier Constructor Description protectedUserImpl(NodeImpl node, UserManagerImpl userManager)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.api.security.user.Authorizable
declaredMemberOf, getID, getPath, getProperty, getPropertyNames, getPropertyNames, hasProperty, memberOf, remove, removeProperty, 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
-
UserImpl
protected UserImpl(NodeImpl node, UserManagerImpl userManager)
-
-
Method Detail
-
isGroup
public boolean isGroup()
- Specified by:
isGroupin interfaceAuthorizable- See Also:
Authorizable.isGroup()
-
getPrincipal
public Principal getPrincipal() throws RepositoryException
- Specified by:
getPrincipalin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.getPrincipal()
-
isAdmin
public boolean isAdmin()
- Specified by:
isAdminin interfaceUser- See Also:
User.isAdmin()
-
isSystemUser
public boolean isSystemUser()
- Specified by:
isSystemUserin interfaceUser
-
getCredentials
public Credentials getCredentials() throws RepositoryException
- Specified by:
getCredentialsin interfaceUser- Throws:
RepositoryException- See Also:
User.getCredentials()
-
getImpersonation
public Impersonation getImpersonation() throws RepositoryException
- Specified by:
getImpersonationin interfaceUser- Throws:
RepositoryException- See Also:
User.getImpersonation()
-
changePassword
public void changePassword(String password) throws RepositoryException
- Specified by:
changePasswordin interfaceUser- Throws:
RepositoryException- See Also:
User.changePassword(String)
-
changePassword
public void changePassword(String password, String oldPassword) throws RepositoryException
- Specified by:
changePasswordin interfaceUser- Throws:
RepositoryException- See Also:
User.changePassword(String, String)
-
disable
public void disable(String reason) throws RepositoryException
- Specified by:
disablein interfaceUser- Throws:
RepositoryException- See Also:
User.disable(String)
-
isDisabled
public boolean isDisabled() throws RepositoryException- Specified by:
isDisabledin interfaceUser- Throws:
RepositoryException- See Also:
User.isDisabled()
-
getDisabledReason
public String getDisabledReason() throws RepositoryException
- Specified by:
getDisabledReasonin interfaceUser- Throws:
RepositoryException- See Also:
User.getDisabledReason()
-
getID
public String getID() throws RepositoryException
Returns the unescaped name of the node that defines thisAuthorizable.- Specified by:
getIDin interfaceAuthorizable- Returns:
- the unescaped name of the node that defines this
Authorizable. - Throws:
RepositoryException- See Also:
Authorizable.getID()
-
declaredMemberOf
public Iterator<Group> declaredMemberOf() throws RepositoryException
- Specified by:
declaredMemberOfin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.declaredMemberOf()
-
memberOf
public Iterator<Group> memberOf() throws RepositoryException
- Specified by:
memberOfin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.memberOf()
-
getPropertyNames
public Iterator<String> getPropertyNames() throws RepositoryException
- Specified by:
getPropertyNamesin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.getPropertyNames()
-
getPropertyNames
public Iterator<String> getPropertyNames(String relPath) throws RepositoryException
- Specified by:
getPropertyNamesin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.getPropertyNames(String)
-
hasProperty
public boolean hasProperty(String relPath) throws RepositoryException
- Specified by:
hasPropertyin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.getProperty(String)
-
getProperty
public Value[] getProperty(String relPath) throws RepositoryException
- Specified by:
getPropertyin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.hasProperty(String),Authorizable.getProperty(String)
-
setProperty
public void setProperty(String relPath, Value value) throws RepositoryException
Sets the Value for the given name. If a value existed, it is replaced, if not it is created.- Specified by:
setPropertyin interfaceAuthorizable- Parameters:
relPath- The relative path to the property or the property name.value- The property value.- Throws:
RepositoryException- If the specified name defines a property that needs to be modified by this user API or setting the corresponding JCR property fails.- See Also:
Authorizable.setProperty(String, Value)
-
setProperty
public void setProperty(String relPath, Value[] values) throws RepositoryException
Sets the Value[] for the given name. If a value existed, it is replaced, if not it is created.- Specified by:
setPropertyin interfaceAuthorizable- Parameters:
relPath- The relative path to the property or the property name.values- The property values.- Throws:
RepositoryException- If the specified name defines a property that needs to be modified by this user API or setting the corresponding JCR property fails.- See Also:
Authorizable.setProperty(String, Value[])
-
removeProperty
public boolean removeProperty(String relPath) throws RepositoryException
- Specified by:
removePropertyin interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.removeProperty(String)
-
remove
public void remove() throws RepositoryException- Specified by:
removein interfaceAuthorizable- Throws:
RepositoryException- See Also:
Authorizable.remove()
-
getPath
public String getPath() throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
getPathin interfaceAuthorizable- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException- See Also:
Authorizable.getPath()
-
-