|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserManager
Manages users.
Field Summary | |
---|---|
static String |
ANONYMOUS_USER
Anonymous user name. |
static String |
SYSTEM_PSWD
Magnolia system default password. |
static String |
SYSTEM_USER
Magnolia system user name. |
Method Summary | |
---|---|
User |
addGroup(User user,
String groupName)
Adds user to a group. |
User |
addRole(User user,
String roleName)
Grants user role. |
User |
changePassword(User user,
String newPassword)
Sets a new password. |
User |
createUser(String name,
String pw)
Creates a user without security restrictions. |
User |
createUser(String path,
String name,
String pw)
Creates a user on given path. |
Map<String,ACL> |
getACLs(User user)
Returns all ACLs assigned to the given user. |
Collection<User> |
getAllUsers()
Get all users. |
User |
getAnonymousUser()
Get Anonymous user, this user must always exist in magnolia repository. |
int |
getLockTimePeriod()
Gets a time period for account lock. |
int |
getMaxFailedLoginAttempts()
Gets a number of failed attempts before locking account. |
User |
getSystemUser()
Get system user, this user must always exist in magnolia repository. |
User |
getUser(String name)
Find a specific user. |
User |
getUser(Subject subject)
Deprecated. jaas login module should just request the user, not pass the subject around to the user manager |
User |
getUserById(String id)
Find a specific user. |
boolean |
hasAny(String principal,
String resourceName,
String resourceType)
Checks whether principal belongs to the named resource. |
User |
removeGroup(User user,
String groupName)
Removes user from a group. |
User |
removeRole(User user,
String roleName)
Removes role from a user. |
void |
setLockTimePeriod(int lockTimePeriod)
Sets a time period for account lock. |
void |
setMaxFailedLoginAttempts(int maxFailedLoginAttempts)
Sets a number of failed attempts before locking account. |
User |
setProperty(User user,
String propertyName,
String propertyValue)
Sets given property for the user and returns updated user object with new value of the property. |
User |
setProperty(User user,
String propertyName,
javax.jcr.Value propertyValue)
Deprecated. since 4.5.7 - use setProperty(User, String, String) |
void |
updateLastAccessTimestamp(User user)
Updates last access timestamp for the user. |
Field Detail |
---|
static final String SYSTEM_USER
static final String SYSTEM_PSWD
static final String ANONYMOUS_USER
Method Detail |
---|
User getUser(String name) throws UnsupportedOperationException
name
- the name of the user
UnsupportedOperationException
User getUserById(String id) throws UnsupportedOperationException
id
- user identifier
UnsupportedOperationException
@Deprecated User getUser(Subject subject) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser getSystemUser() throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser getAnonymousUser() throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationCollection<User> getAllUsers() throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser createUser(String name, String pw) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser createUser(String path, String name, String pw) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser changePassword(User user, String newPassword) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operation@Deprecated User setProperty(User user, String propertyName, javax.jcr.Value propertyValue)
setProperty(User, String, String)
user
- User to be updated. If property doesn't exist yet, it will be created. If the value is null, property will be removed if existing.propertyName
- Name of the property.propertyValue
- Value of the property. Use org.apache.jackrabbit.value.ValueFactoryImpl to convert type to Value.
User setProperty(User user, String propertyName, String propertyValue)
void setLockTimePeriod(int lockTimePeriod) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationint getLockTimePeriod() throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationvoid setMaxFailedLoginAttempts(int maxFailedLoginAttempts) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationint getMaxFailedLoginAttempts() throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationUser addRole(User user, String roleName)
User addGroup(User user, String groupName)
void updateLastAccessTimestamp(User user) throws UnsupportedOperationException
UnsupportedOperationException
- if the current implementation doesn't support this operationboolean hasAny(String principal, String resourceName, String resourceType)
name
- principal nameresourceName
- either group or role nameresourceType
- either group or role see
Map<String,ACL> getACLs(User user)
User removeGroup(User user, String groupName)
User removeRole(User user, String roleName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |