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 TypeMethodDescriptionbooleanaddLicense(License license) Adds the given license to this ILicensee.booleanAdds 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.getLicenses.getLicenses(boolean core) Getter for the fieldlicenses.longgetMembers.getMemberships.getName()getName.getOwner()Getter for the fieldowner.inthashCode()booleanhasUserPrivilege(String privilegeName) hasUserPrivilege.booleanisActive()isActive.booleanbooleanremoveLicense(License license) Removes the given license from this ILicensee.booleanremoveMember(User user) remove User from GroupvoidsetActive(boolean active) Setter for the fieldactive.voidsetDescription(String description) Setter for the fielddescription.voidSetter for the fieldid.voidsetLicenses(List<License> licenses) Setter for the fieldlicenses.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, 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.
-
addLicense
Adds the given license to this ILicensee.- Specified by:
addLicensein interfaceILicensee- Parameters:
license- aLicenseobject.- Returns:
- a boolean.
-
removeLicense
Removes the given license from this ILicensee.- Specified by:
removeLicensein interfaceILicensee- Parameters:
license- aLicenseobject.- Returns:
- a boolean.
-
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
-
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
-
getLicenses
getLicenses.
- Specified by:
getLicensesin interfaceILicensee- Returns:
- a
Listobject.
-
setLicenses
Setter for the field
licenses.- Parameters:
licenses- the licenses to set
-
getLicenses
Getter for the field
licenses.- Parameters:
core- a boolean.- Returns:
- List of filtered licenses whose type's core attribute matches the given value
-
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
-