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 String
AUTHORIZABLES_PATH
static String
GROUP_ADMIN_GROUP_NAME
Configuration key and default value for the the name of the 'GroupAdmin' group-principalstatic String
GROUPS_PATH
static Name
MIX_REP_IMPERSONATABLE
static Name
N_MEMBERS
static NameFactory
NF
static Name
NT_REP_AUTHORIZABLE
static Name
NT_REP_AUTHORIZABLE_FOLDER
static Name
NT_REP_GROUP
static Name
NT_REP_MEMBERS
static Name
NT_REP_USER
static Name
P_DISABLED
static Name
P_GROUPS
Deprecated.As of 2.0 group membership is stored with the group node.static Name
P_IMPERSONATORS
Name of the user property containing the principal names of those allowed to impersonate.static Name
P_MEMBERS
static Name
P_PASSWORD
static Name
P_PRINCIPAL_NAME
static Name
P_USERID
Deprecated.As of 2.0 the id-hash is stored with the jcr:uuid making the rep:userId property redundant.static String
SECURITY_ROOT_PATH
root-path to security related content e.g.static String
USER_ADMIN_GROUP_NAME
Configuration key and default value for the the name of the 'UserAdmin' group-principal.static String
USERS_PATH
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserImpl(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:
isGroup
in interfaceAuthorizable
- See Also:
Authorizable.isGroup()
-
getPrincipal
public Principal getPrincipal() throws RepositoryException
- Specified by:
getPrincipal
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.getPrincipal()
-
isAdmin
public boolean isAdmin()
- Specified by:
isAdmin
in interfaceUser
- See Also:
User.isAdmin()
-
isSystemUser
public boolean isSystemUser()
- Specified by:
isSystemUser
in interfaceUser
-
getCredentials
public Credentials getCredentials() throws RepositoryException
- Specified by:
getCredentials
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.getCredentials()
-
getImpersonation
public Impersonation getImpersonation() throws RepositoryException
- Specified by:
getImpersonation
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.getImpersonation()
-
changePassword
public void changePassword(String password) throws RepositoryException
- Specified by:
changePassword
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.changePassword(String)
-
changePassword
public void changePassword(String password, String oldPassword) throws RepositoryException
- Specified by:
changePassword
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.changePassword(String, String)
-
disable
public void disable(String reason) throws RepositoryException
- Specified by:
disable
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.disable(String)
-
isDisabled
public boolean isDisabled() throws RepositoryException
- Specified by:
isDisabled
in interfaceUser
- Throws:
RepositoryException
- See Also:
User.isDisabled()
-
getDisabledReason
public String getDisabledReason() throws RepositoryException
- Specified by:
getDisabledReason
in 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:
getID
in 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:
declaredMemberOf
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.declaredMemberOf()
-
memberOf
public Iterator<Group> memberOf() throws RepositoryException
- Specified by:
memberOf
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.memberOf()
-
getPropertyNames
public Iterator<String> getPropertyNames() throws RepositoryException
- Specified by:
getPropertyNames
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.getPropertyNames()
-
getPropertyNames
public Iterator<String> getPropertyNames(String relPath) throws RepositoryException
- Specified by:
getPropertyNames
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.getPropertyNames(String)
-
hasProperty
public boolean hasProperty(String relPath) throws RepositoryException
- Specified by:
hasProperty
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.getProperty(String)
-
getProperty
public Value[] getProperty(String relPath) throws RepositoryException
- Specified by:
getProperty
in 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:
setProperty
in 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:
setProperty
in 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:
removeProperty
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.removeProperty(String)
-
remove
public void remove() throws RepositoryException
- Specified by:
remove
in interfaceAuthorizable
- Throws:
RepositoryException
- See Also:
Authorizable.remove()
-
getPath
public String getPath() throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
getPath
in interfaceAuthorizable
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
- See Also:
Authorizable.getPath()
-
-