public interface User extends Authorizable
Authorizable
that can be authenticated and
impersonated.getCredentials()
,
getImpersonation()
Modifier and Type | Method and Description |
---|---|
void |
changePassword(String password)
Change the password of this user.
|
void |
changePassword(String password,
String oldPassword)
Change the password of this user.
|
void |
disable(String reason)
Disable this user thus preventing future login if the
reason
is a non-null String.Note however, that this user will still be accessible by UserManager.getAuthorizable(java.lang.String) . |
Credentials |
getCredentials()
Returns the internal
Credentials representation for this
user. |
String |
getDisabledReason()
|
Impersonation |
getImpersonation() |
boolean |
isAdmin() |
boolean |
isDisabled()
Returns
true if this user is disabled, false
otherwise. |
declaredMemberOf, getID, getPath, getPrincipal, getProperty, getPropertyNames, getPropertyNames, hasProperty, isGroup, memberOf, remove, removeProperty, setProperty, setProperty
boolean isAdmin()
Credentials getCredentials() throws RepositoryException
Credentials
representation for this
user. This method is expected to be used for validation during the
login process. However, the return value should neither be usable nor
used for Repository.login(javax.jcr.Credentials, java.lang.String)
.Credentials
for this user.RepositoryException
- If an error occurs.Impersonation getImpersonation() throws RepositoryException
Impersonation
for this User
.RepositoryException
- If an error occurs.void changePassword(String password) throws RepositoryException
password
- The new password.RepositoryException
- If an error occurs.void changePassword(String password, String oldPassword) throws RepositoryException
password
- The new password.oldPassword
- The old password.RepositoryException
- If the old password doesn't match or if
an error occurs.void disable(String reason) throws RepositoryException
reason
is a non-null String.UserManager.getAuthorizable(java.lang.String)
.reason
- String describing the reason for disable this user or
null
if the user account should be enabled again.RepositoryException
- If an error occurs.boolean isDisabled() throws RepositoryException
true
if this user is disabled, false
otherwise.true
if this user is disabled, false
otherwise.RepositoryException
- If an error occurs.String getDisabledReason() throws RepositoryException
null
if this user is not disabled.RepositoryException
- If an error occurs.Copyright © 2004-2017 The Apache Software Foundation. All Rights Reserved.