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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addLicense
(License license) Adds the given license to this ILicensee.boolean
Adds membership relation between the given user and role and persists immediately.boolean
changeMemberRole
(User user, Role role) changeMemberRole.boolean
Getter for the fielddescription
.getId()
Getter for the fieldid
.getLicenses.getLicenses
(boolean core) Getter for the fieldlicenses
.long
getMembers.getMemberships.getName()
getName.getOwner()
Getter for the fieldowner
.int
hashCode()
boolean
hasUserPrivilege
(String privilegeName) hasUserPrivilege.boolean
isActive()
isActive.boolean
boolean
removeLicense
(License license) Removes the given license from this ILicensee.boolean
removeMember
(User user) remove User from Groupvoid
setActive
(boolean active) Setter for the fieldactive
.void
setDescription
(String description) Setter for the fielddescription
.void
Setter for the fieldid
.void
setLicenses
(List<License> licenses) Setter for the fieldlicenses
.void
setMemberships
(List<UserRole> memberships) void
Setter for the fieldname
.void
Setter 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
- aUser
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
hasUserPrivilege
hasUserPrivilege.
- Parameters:
privilegeName
- aString
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
addLicense
Adds the given license to this ILicensee.- Specified by:
addLicense
in interfaceILicensee
- Parameters:
license
- aLicense
object.- Returns:
- a boolean.
-
removeLicense
Removes the given license from this ILicensee.- Specified by:
removeLicense
in interfaceILicensee
- Parameters:
license
- aLicense
object.- 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:
getLicenses
in interfaceILicensee
- Returns:
- a
List
object.
-
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
List
object. - Throws:
DAOException
- if any.
-
setMemberships
- Parameters:
memberships
- the memberships to set
-
getMembers
getMembers.
- Returns:
- a
Set
object. - Throws:
DAOException
- if any.
-
getMembersAndOwner
- Returns:
- Set
- Throws:
DAOException
-
toString
-