/**
* Return the description of this group.
*/
+ @Override
public String getDescription() {
return (this.description);
*
* @param description The new description
*/
+ @Override
public void setDescription(String description) {
this.description = description;
* Return the group name of this group, which must be unique
* within the scope of a {@link UserDatabase}.
*/
+ @Override
public String getGroupname() {
return (this.groupname);
*
* @param groupname The new group name
*/
+ @Override
public void setGroupname(String groupname) {
this.groupname = groupname;
/**
* Return the set of {@link Role}s assigned specifically to this group.
*/
+ @Override
public abstract Iterator<Role> getRoles();
/**
* Return the {@link UserDatabase} within which this Group is defined.
*/
+ @Override
public abstract UserDatabase getUserDatabase();
* Return an Iterator over the set of {@link org.apache.catalina.User}s that
* are members of this group.
*/
+ @Override
public abstract Iterator<User> getUsers();
*
* @param role The new role
*/
+ @Override
public abstract void addRole(Role role);
*
* @param role The role to check
*/
+ @Override
public abstract boolean isInRole(Role role);
*
* @param role The old role
*/
+ @Override
public abstract void removeRole(Role role);
/**
* Remove all {@link Role}s from those assigned to this group.
*/
+ @Override
public abstract void removeRoles();
/**
* Make the principal name the same as the group name.
*/
+ @Override
public String getName() {
return (getGroupname());
/**
* Return the description of this role.
*/
+ @Override
public String getDescription() {
return (this.description);
*
* @param description The new description
*/
+ @Override
public void setDescription(String description) {
this.description = description;
* Return the role name of this role, which must be unique
* within the scope of a {@link UserDatabase}.
*/
+ @Override
public String getRolename() {
return (this.rolename);
*
* @param rolename The new role name
*/
+ @Override
public void setRolename(String rolename) {
this.rolename = rolename;
/**
* Return the {@link UserDatabase} within which this Role is defined.
*/
+ @Override
public abstract UserDatabase getUserDatabase();
/**
* Make the principal name the same as the role name.
*/
+ @Override
public String getName() {
return (getRolename());
/**
* Return the full name of this user.
*/
+ @Override
public String getFullName() {
return (this.fullName);
*
* @param fullName The new full name
*/
+ @Override
public void setFullName(String fullName) {
this.fullName = fullName;
/**
* Return the set of {@link Group}s to which this user belongs.
*/
+ @Override
public abstract Iterator<Group> getGroups();
* identifier of an encoding scheme surrounded by curly braces, such as
* <code>{md5}xxxxx</code>.
*/
+ @Override
public String getPassword() {
return (this.password);
*
* @param password The new logon password
*/
+ @Override
public void setPassword(String password) {
this.password = password;
/**
* Return the set of {@link Role}s assigned specifically to this user.
*/
+ @Override
public abstract Iterator<Role> getRoles();
* Return the logon username of this user, which must be unique
* within the scope of a {@link org.apache.catalina.UserDatabase}.
*/
+ @Override
public String getUsername() {
return (this.username);
*
* @param username The new logon username
*/
+ @Override
public void setUsername(String username) {
this.username = username;
*
* @param group The new group
*/
+ @Override
public abstract void addGroup(Group group);
*
* @param role The new role
*/
+ @Override
public abstract void addRole(Role role);
*
* @param group The group to check
*/
+ @Override
public abstract boolean isInGroup(Group group);
*
* @param role The role to check
*/
+ @Override
public abstract boolean isInRole(Role role);
*
* @param group The old group
*/
+ @Override
public abstract void removeGroup(Group group);
/**
* Remove all {@link Group}s from those this user belongs to.
*/
+ @Override
public abstract void removeGroups();
*
* @param role The old role
*/
+ @Override
public abstract void removeRole(Role role);
/**
* Remove all {@link Role}s from those assigned to this user.
*/
+ @Override
public abstract void removeRoles();
/**
* Make the principal name the same as the group name.
*/
+ @Override
public String getName() {
return (getUsername());
/**
* Return the {@link UserDatabase} within which this User is defined.
*/
+ @Override
public UserDatabase getUserDatabase() {
return (this.database);
/**
* Return the set of {@link Group}s defined in this user database.
*/
+ @Override
public Iterator<Group> getGroups() {
synchronized (groups) {
/**
* Return the unique global identifier of this user database.
*/
+ @Override
public String getId() {
return (this.id);
/**
* Return the set of {@link Role}s defined in this user database.
*/
+ @Override
public Iterator<Role> getRoles() {
synchronized (roles) {
/**
* Return the set of {@link User}s defined in this user database.
*/
+ @Override
public Iterator<User> getUsers() {
synchronized (users) {
*
* @exception Exception if any exception is thrown during closing
*/
+ @Override
public void close() throws Exception {
save();
* @param groupname The group name of the new group (must be unique)
* @param description The description of this group
*/
+ @Override
public Group createGroup(String groupname, String description) {
if (groupname == null || groupname.length() == 0) {
* @param rolename The role name of the new group (must be unique)
* @param description The description of this group
*/
+ @Override
public Role createRole(String rolename, String description) {
if (rolename == null || rolename.length() == 0) {
* @param password The logon password of the new user
* @param fullName The full name of the new user
*/
+ @Override
public User createUser(String username, String password,
String fullName) {
*
* @param groupname Name of the group to return
*/
+ @Override
public Group findGroup(String groupname) {
synchronized (groups) {
*
* @param rolename Name of the role to return
*/
+ @Override
public Role findRole(String rolename) {
synchronized (roles) {
*
* @param username Name of the user to return
*/
+ @Override
public User findUser(String username) {
synchronized (users) {
*
* @exception Exception if any exception is thrown during opening
*/
+ @Override
public void open() throws Exception {
synchronized (groups) {
*
* @param group The group to be removed
*/
+ @Override
public void removeGroup(Group group) {
synchronized (groups) {
*
* @param role The role to be removed
*/
+ @Override
public void removeRole(Role role) {
synchronized (roles) {
*
* @param user The user to be removed
*/
+ @Override
public void removeUser(User user) {
synchronized (users) {
*
* @exception Exception if any exception is thrown during saving
*/
+ @Override
public void save() throws Exception {
if (getReadonly()) {
this.database = database;
}
+ @Override
public Object createObject(Attributes attributes) {
String groupname = attributes.getValue("groupname");
if (groupname == null) {
private Digester digester = null;
+ @Override
public Digester getDigester() {
return (this.digester);
}
+ @Override
public void setDigester(Digester digester) {
this.digester = digester;
}
this.database = database;
}
+ @Override
public Object createObject(Attributes attributes) {
String rolename = attributes.getValue("rolename");
if (rolename == null) {
private Digester digester = null;
+ @Override
public Digester getDigester() {
return (this.digester);
}
+ @Override
public void setDigester(Digester digester) {
this.digester = digester;
}
this.database = database;
}
+ @Override
public Object createObject(Attributes attributes) {
String username = attributes.getValue("username");
if (username == null) {
private Digester digester = null;
+ @Override
public Digester getDigester() {
return (this.digester);
}
+ @Override
public void setDigester(Digester digester) {
this.digester = digester;
}
* @param environment The possibly null environment that is used in
* creating this object
*/
+ @Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx,
Hashtable<?,?> environment)
throws Exception {