Class UserGroup
java.lang.Object
io.goobi.viewer.model.security.user.AbstractLicensee
io.goobi.viewer.model.security.user.UserGroup
- All Implemented Interfaces:
ILicensee,Serializable
UserGroup class.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds membership relation between the given user and role and persists immediately.booleanchangeMemberRole(User user, Role role) changeMemberRole.booleanGetter for the fielddescription.getId()Getter for the fieldid.longgetMembers.getMemberships.getName()getName.getOwner()Getter for the fieldowner.inthashCode()booleanhasUserPrivilege(String privilegeName) hasUserPrivilege.booleanisActive()isActive.booleanbooleanremoveMember(User user) remove User from GroupvoidsetActive(boolean active) Setter for the fieldactive.voidsetDescription(String description) Setter for the fielddescription.voidSetter for the fieldid.voidsetMemberships(List<UserRole> memberships) voidSetter for the fieldname.voidSetter for the fieldowner.toString()Methods inherited from class io.goobi.viewer.model.security.user.AbstractLicensee
getAccessPermissionFromMap, getLicenses, hasLicense
-
Constructor Details
-
UserGroup
public UserGroup()
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
addMember
Adds membership relation between the given user and role and persists immediately.- Parameters:
user- User to addrole- Role to add- Returns:
- true if persistence successful, false otherwise
- Throws:
PresentationException- if any.DAOException- if any.
-
changeMemberRole
changeMemberRole.
-
removeMember
remove User from Group- Parameters:
user- aUserobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
hasUserPrivilege
hasUserPrivilege.
- Parameters:
privilegeName- aStringobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getId
Getter for the field
id.- Returns:
- the id
-
setId
Setter for the field
id.- Parameters:
id- the id to set
-
getName
getName.
-
setName
Setter for the field
name.- Parameters:
name- the name to set
-
getDescription
Getter for the field
description.- Returns:
- the description
-
setDescription
Setter for the field
description.- Parameters:
description- the description to set
-
getAccessType
- Specified by:
getAccessTypein interfaceILicensee- Returns:
- AccessType corresponding to the licensee's class
-
getOwner
Getter for the field
owner.- Returns:
- the owner
-
setOwner
Setter for the field
owner.- Parameters:
owner- the owner to set
-
isActive
public boolean isActive()isActive.
- Returns:
- the active
-
setActive
public void setActive(boolean active) Setter for the field
active.- Parameters:
active- the active to set
-
isHasMembers
- Returns:
- true if group has members other than the owner; false otherwise
- Throws:
DAOException
-
getMemberCount
- Returns:
- number of members in this group
- Throws:
DAOException
-
getMemberships
getMemberships.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
setMemberships
- Parameters:
memberships- the memberships to set
-
getMembers
getMembers.
- Returns:
- a
Setobject. - Throws:
DAOException- if any.
-
getMembersAndOwner
- Returns:
- Set
- Throws:
DAOException
-
toString
-