Package cz.metacentrum.perun.core.impl
Class GroupsManagerImpl
java.lang.Object
cz.metacentrum.perun.core.impl.GroupsManagerImpl
- All Implemented Interfaces:
GroupsManagerImplApi
Implementation of GroupsManager
- Author:
- Michal Prochazka michalp@ics.muni.cz, Slavek Licehammer glory@ics.muni.cz
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected static final RowMapper<AssignedGroup>
protected static final String
protected static final String
protected static final String
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGroupToAutoRegistration
(PerunSession sess, Group group) Adds group to the list of groups which can be registered into during vo registration.addMember
(PerunSession sess, Group group, Member member, MembershipType type, int sourceGroupId) Adds member of the VO to the group in the same VO.void
allowGroupToHierarchicalVo
(PerunSession sess, Group group, Vo vo) Sets flag required for including group to parent vo in a vo hierarchy.void
checkGroupExists
(PerunSession sess, Group group) Check if group exists in underlaying data source.createGroup
(PerunSession sess, Vo vo, Group group) Creates a new top-level group and associates it with the VO from parameter.createGroup
(PerunSession sess, Vo vo, Group parentGroup, Group group) Creates a new subgroup of the existing group.void
deleteGroup
(PerunSession sess, Vo vo, Group group) Deletes group.void
deleteGroupFromAutoRegistration
(PerunSession sess, Group group) Deletes group from list of groups which can be registered into during vo registration.void
deleteGroupReservedLogins
(PerunSession sess, Group group) Delete all Group login reservations Reserved logins must be removed from external systems (e.g.void
disallowGroupToHierarchicalVo
(PerunSession sess, Group group, Vo vo) Unsets flag required for including group to parent vo in a vo hierarchygetAdmins
(PerunSession sess, Group group) Gets list of all administrators of this group.Returns all groups which can be included to VO.getAllAllowedGroupsToHierarchicalVo
(PerunSession sess, Vo vo, Vo memberVo) Returns groups which can be included to VO from specific member VO.getAllGroups
(PerunSession sess) Get all groups from all vos.getAllGroups
(PerunSession sess, Vo vo) Get all groups of the VO.getAllGroupsWhereMemberIsActive
(PerunSession sess, Member member) Returns all member's groups where member is in active state (is valid there) Included members group.getAllMemberGroups
(PerunSession sess, Member member) Return all members groups.Return list of all reserved logins for specific application (pair is namespace and login)getAssignedGroupsToFacility
(PerunSession perunSession, Facility facility) Return list of assigned groups from all facility resourcesgetAssignedGroupsToResource
(PerunSession perunSession, Resource resource) Return list of assigned groups on the resource.getAssignedGroupsToResource
(PerunSession perunSession, Resource resource, Member member) Return list of assigned groups on the resource with specified member.getAssociatedGroupsToFacility
(PerunSession perunSession, Facility facility) Return list of all associated groups from all facility resources (does not require ACTIVE group-resource status)getAssociatedGroupsToResource
(PerunSession perunSession, Resource resource) Return list of assigned groups on the resource.getAssociatedGroupsToResource
(PerunSession perunSession, Resource resource, Member member) Return list of groups associated with the resource with specified member.getDirectAdmins
(PerunSession sess, Group group) Gets list of direct user administrators of this group.getDirectMemberGroupStatus
(PerunSession session, Member member, Group group) Returns direct members status in given group.getFacilitiesWhereGroupIsAdmin
(PerunSession session, Group group) Returns all facilities where given group si FACILITYADMIN.getGroupAdmins
(PerunSession sess, Group group) Gets list of all group administrators of this group.getGroupApplicationIds
(PerunSession sess, Group group) Return list of IDs of all applications, which belongs to Group.getGroupById
(PerunSession sess, int id) Search for the group with specified id in all VOs.getGroupByName
(PerunSession sess, Vo vo, String name) Search for the group with specified name in specified VO IMPORTANT: need to use full name of group (ex.getGroupMembers
(PerunSession sess, Group group) Get all group members ignoring theirs status.getGroupMembers
(PerunSession sess, Group group, List<Status> statuses, boolean excludeStatus) Return group members.getGroupMembersById
(PerunSession sess, Group group, int id) Get group members by member ID -> meaning we will get all (DIRECT/INDIRECT) group memberships for specified member (or user, since it will be the same).getGroupMembersByMembership
(PerunSession sess, Group group, MembershipType membershipType) Get only group members which has given membership type ignoring their status.getGroupResourcePairsByAttribute
(PerunSession sess, Attribute attribute) Returns all group-resource which have set the attribute with the value.getGroups
(PerunSession sess, Vo vo) Get all groups of users under the VO.getGroupsByAttribute
(PerunSession sess, Attribute attribute) Returns all groups which have set the attribute with the value.getGroupsByIds
(PerunSession perunSession, List<Integer> ids) Gets groups by their ids.int
getGroupsCount
(PerunSession sess) Get count of all groups.int
getGroupsCount
(PerunSession sess, Vo vo) getGroupsForAutoRegistration
(PerunSession sess, Vo vo) Returns all groups which can be registered into during vo registration.getGroupsIds
(PerunSession sess, Vo vo) Get all groups ids for given vo.getGroupsPage
(PerunSession sess, Vo vo, GroupsPageQuery query) Get page of groups from the given vo.Gets all groups which have enabled group structure synchronization.Gets all groups which have enabled synchronization.getGroupsWhereGroupIsAdmin
(PerunSession session, Group group) Returns all groups where given group si GROUPADMIN.getGroupsWithAssignedExtSourceInVo
(PerunSession sess, ExtSource source, Vo vo) Get all groups in specific vo with assigned extSourcegetGroupUsers
(PerunSession sess, Group group) Return group users sorted by name.getName
(int id) getOperandGroups
(PerunSession sess, int groupId) Return all operand groups of requested result group.getParentGroup
(PerunSession sess, Group group) Get parent group.getResourcesWhereGroupIsAdmin
(PerunSession session, Group group) Returns all resources where given group si RESOURCEADMIN.getResourcesWhereGroupIsResourceSelfService
(PerunSession session, Group group) Returns all resources where given group si RESOURCESELFSERVICE.getResultGroups
(PerunSession sess, int groupId) Return all result groups of requested operand group.getResultGroupsIds
(PerunSession sess, int groupId) Return list of all result groups ids of requested operand group.getSecurityTeamsWhereGroupIsAdmin
(PerunSession session, Group group) Returns all security teams where given group si SECURITYADMIN.getSubGroups
(PerunSession sess, Group parentGroup) Get all immediate subgroups of the parent group under the VO.int
getSubGroupsCount
(PerunSession sess, Group parentGroup) Returns number of immediate subgroups of the parent group.getSubgroupsPage
(PerunSession sess, Group group, GroupsPageQuery query) Get page of subgroups from the given parent group.getTotalGroupStatusForMembers
(PerunSession session, Group group, List<Member> members) Returns total member's status of given members in given group.getTotalMemberGroupStatus
(PerunSession session, Member member, Group group) Returns total member's status in given group.getUserGroups
(PerunSession sess, User user) Return groups where user is member.getUserGroups
(PerunSession sess, User user, List<Status> memberStatuses, List<MemberGroupStatus> memberGroupStatuses) Return groups where user is member with allowed statuses in vo and group.int
getVoId
(PerunSession sess, Group group) Get the id of the VO which is owner of the group.getVosWhereGroupIsAdmin
(PerunSession session, Group group) Returns all vos where given group si VOADMIN.boolean
groupExists
(PerunSession sess, Group group) Check if group exists in underlaying data source.boolean
isAllowedGroupToHierarchicalVo
(PerunSession sess, Group group, Vo vo) Returns flag representing if the group can be included in the (parent) vo's groupsboolean
isDirectGroupMember
(PerunSession sess, Group group, Member member) Return true if Member is direct member of the Groupboolean
isGroupForAutoRegistration
(PerunSession sess, Group group) Check if group has automatic registration enabled.boolean
isGroupMember
(PerunSession sess, Group group, Member member) Return true if Member is member of the Groupboolean
isOneWayRelationBetweenGroups
(Group resultGroup, Group operandGroup) Checks if relation exists between result group and operand group.boolean
isRelationBetweenGroups
(Group group1, Group group2) Checks if relation between groups exists.boolean
isRelationRemovable
(PerunSession sess, Group resultGroup, Group operandGroup) Check if the relation between given groups can be deleted.boolean
isUserMemberOfGroup
(PerunSession sess, User user, Group group) Checks whether the user is member of the group.void
removeGroupUnion
(PerunSession sess, Group resultGroup, Group operandGroup) Removes a union between two groups.void
removeMember
(PerunSession sess, Group group, Member member) Removes member form the group.void
removeResultGroupRelations
(PerunSession sess, Group resultGroup) Removes all relations of this result group.void
saveGroupRelation
(PerunSession sess, Group resultGroup, Group operandGroup, boolean parentFlag) Saves union operation between result group and operand group.void
setDirectGroupStatus
(PerunSession sess, Member member, Group group, MemberGroupStatus status) Set direct status of the member to specified status in given group.void
setIndirectGroupStatus
(PerunSession sess, Member member, Group group, MemberGroupStatus status) Set status of the member to specified status for indirect relations where the given group is the source group.updateGroup
(PerunSession sess, Group group) Updates group by ID.updateGroupName
(PerunSession sess, Group group) Updates group by ID.updateParentGroupId
(PerunSession sess, Group group) Updates parentGroupId.
-
Field Details
-
MEMBERSGROUP
public static final int MEMBERSGROUP- See Also:
-
ADMINSGROUP
public static final int ADMINSGROUP- See Also:
-
SUBGROUP
public static final int SUBGROUP- See Also:
-
groupMappingSelectQuery
- See Also:
-
memberGroupsMappingSelectQuery
- See Also:
-
assignedGroupMappingSelectQuery
- See Also:
-
GROUP_MAPPER
-
ASSIGNED_GROUP_MAPPER
-
-
Constructor Details
-
GroupsManagerImpl
Create new instance of this class.
-
-
Method Details
-
createGroup
Description copied from interface:GroupsManagerImplApi
Creates a new top-level group and associates it with the VO from parameter. For this method the new group has always same shortName like Name. Important: voId in object group is ignored This method sets ids and uuid to the given group object but returns a new group object loaded from the DB.- Specified by:
createGroup
in interfaceGroupsManagerImplApi
vo
- to associates group withgroup
- new group with name without ":"- Returns:
- newly created top-level group
- Throws:
GroupExistsException
-
getName
-
createGroup
public Group createGroup(PerunSession sess, Vo vo, Group parentGroup, Group group) throws GroupExistsException Description copied from interface:GroupsManagerImplApi
Creates a new subgroup of the existing group. (Stores group to underlaying data source)- Specified by:
createGroup
in interfaceGroupsManagerImplApi
group
- group.name must contain only shortName (without ":"). Hierarchy is defined by parentGroup parameter.- Returns:
- newly created sub group with full group.Name with ":"
- Throws:
GroupExistsException
-
deleteGroup
Description copied from interface:GroupsManagerImplApi
Deletes group. Delete it from table of parentgroups, table of groups_members and groups table.- Specified by:
deleteGroup
in interfaceGroupsManagerImplApi
group
- group to delete- Throws:
GroupAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
updateGroup
Description copied from interface:GroupsManagerImplApi
Updates group by ID. Update shortName and description. Return Group with correctly set parameters- Specified by:
updateGroup
in interfaceGroupsManagerImplApi
group
- to update (use only ID, shortName and description)- Returns:
- updated group with correctly set parameters
- Throws:
GroupExistsException
- if group with same name already exists in the same VO
-
updateGroupName
Description copied from interface:GroupsManagerImplApi
Updates group by ID. !! IMPORTANT This method allows to change group name the way it doesn't correspond with the groups hierarchy !! Meant for updating subgroups after parent group name is updated !! Update name (with ":"). Return Group with correctly set parameters- Specified by:
updateGroupName
in interfaceGroupsManagerImplApi
group
- to update (use only ID and name)- Returns:
- updated group with correctly set parameters
-
updateParentGroupId
Description copied from interface:GroupsManagerImplApi
Updates parentGroupId. !! IMPORTANT This method allows to change parentGroupId, but it doesn't update group and subGroup names !!- Specified by:
updateParentGroupId
in interfaceGroupsManagerImplApi
group
- to update- Returns:
- group with updated parentGroupId
-
getGroupById
Description copied from interface:GroupsManagerImplApi
Search for the group with specified id in all VOs.- Specified by:
getGroupById
in interfaceGroupsManagerImplApi
- Returns:
- group with specified id or throws GroupNotExistsException
- Throws:
GroupNotExistsException
-
getGroupUsers
Description copied from interface:GroupsManagerImplApi
Return group users sorted by name.- Specified by:
getGroupUsers
in interfaceGroupsManagerImplApi
- Returns:
- list users sorted or empty list if there are no users on specified page
-
getUserGroups
Description copied from interface:GroupsManagerImplApi
Return groups where user is member.- Specified by:
getUserGroups
in interfaceGroupsManagerImplApi
- Returns:
- list of groups
-
getUserGroups
public List<Group> getUserGroups(PerunSession sess, User user, List<Status> memberStatuses, List<MemberGroupStatus> memberGroupStatuses) Description copied from interface:GroupsManagerImplApi
Return groups where user is member with allowed statuses in vo and group. If statuses are empty or null, all statuses are used.- Specified by:
getUserGroups
in interfaceGroupsManagerImplApi
memberStatuses
- allowed statuses of member in VO- Returns:
- list of groups
-
isUserMemberOfGroup
Description copied from interface:GroupsManagerImplApi
Checks whether the user is member of the group.- Specified by:
isUserMemberOfGroup
in interfaceGroupsManagerImplApi
- Returns:
- true if the user is member of the group
-
getGroupMembers
Description copied from interface:GroupsManagerImplApi
Get all group members ignoring theirs status.- Specified by:
getGroupMembers
in interfaceGroupsManagerImplApi
- Returns:
- list of members
-
getGroupMembersById
Description copied from interface:GroupsManagerImplApi
Get group members by member ID -> meaning we will get all (DIRECT/INDIRECT) group memberships for specified member (or user, since it will be the same).- Specified by:
getGroupMembersById
in interfaceGroupsManagerImplApi
- Returns:
- list of members
-
getGroupMembersByMembership
public List<Member> getGroupMembersByMembership(PerunSession sess, Group group, MembershipType membershipType) Description copied from interface:GroupsManagerImplApi
Get only group members which has given membership type ignoring their status.- Specified by:
getGroupMembersByMembership
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessiongroup
- groupmembershipType
- type of membership- Returns:
- list of direct members
-
getGroupMembers
public List<Member> getGroupMembers(PerunSession sess, Group group, List<Status> statuses, boolean excludeStatus) Description copied from interface:GroupsManagerImplApi
Return group members.- Specified by:
getGroupMembers
in interfaceGroupsManagerImplApi
statuses
- list of statuses, if status is null then return all membersexcludeStatus
- does the list of statuses means exclude members or include members with these statuses- Returns:
- list of members
-
getGroups
Description copied from interface:GroupsManagerImplApi
Get all groups of users under the VO.- Specified by:
getGroups
in interfaceGroupsManagerImplApi
- Returns:
- list of groups
-
getGroupsIds
Description copied from interface:GroupsManagerImplApi
Get all groups ids for given vo.- Specified by:
getGroupsIds
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessionvo
- vo- Returns:
- list of groups ids
-
getAssignedGroupsToResource
Description copied from interface:GroupsManagerImplApi
Return list of assigned groups on the resource.- Specified by:
getAssignedGroupsToResource
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are assigned on the resource
-
getAssociatedGroupsToResource
Description copied from interface:GroupsManagerImplApi
Return list of assigned groups on the resource. Similar to assigned groups, but does not require ACTIVE group-resource status.- Specified by:
getAssociatedGroupsToResource
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are assigned on the resource
-
getAssignedGroupsToResource
public List<Group> getAssignedGroupsToResource(PerunSession perunSession, Resource resource, Member member) Description copied from interface:GroupsManagerImplApi
Return list of assigned groups on the resource with specified member.- Specified by:
getAssignedGroupsToResource
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are assigned on the resource with specified member
-
getAssociatedGroupsToResource
public List<Group> getAssociatedGroupsToResource(PerunSession perunSession, Resource resource, Member member) Description copied from interface:GroupsManagerImplApi
Return list of groups associated with the resource with specified member. Does not require ACTIVE group-resource status.- Specified by:
getAssociatedGroupsToResource
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are assigned on the resource with specified member
-
getAssignedGroupsToFacility
Description copied from interface:GroupsManagerImplApi
Return list of assigned groups from all facility resources- Specified by:
getAssignedGroupsToFacility
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are assigned on all facility resources
-
getAssociatedGroupsToFacility
Description copied from interface:GroupsManagerImplApi
Return list of all associated groups from all facility resources (does not require ACTIVE group-resource status)- Specified by:
getAssociatedGroupsToFacility
in interfaceGroupsManagerImplApi
- Returns:
- list of groups, which are associated with all facility resources
-
getSubGroups
Description copied from interface:GroupsManagerImplApi
Get all immediate subgroups of the parent group under the VO.- Specified by:
getSubGroups
in interfaceGroupsManagerImplApi
- Returns:
- list of groups
-
getSubGroupsCount
Description copied from interface:GroupsManagerImplApi
Returns number of immediate subgroups of the parent group.- Specified by:
getSubGroupsCount
in interfaceGroupsManagerImplApi
- Returns:
- count of parent group immediate subgroups
-
getAllGroups
Description copied from interface:GroupsManagerImplApi
Get all groups from all vos.- Specified by:
getAllGroups
in interfaceGroupsManagerImplApi
- Parameters:
sess
- session- Returns:
- list of all groups
-
getAllGroups
Description copied from interface:GroupsManagerImplApi
Get all groups of the VO.- Specified by:
getAllGroups
in interfaceGroupsManagerImplApi
- Returns:
- list of groups
-
getGroupsPage
Description copied from interface:GroupsManagerImplApi
Get page of groups from the given vo.- Specified by:
getGroupsPage
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessionvo
- voquery
- query with page information- Returns:
- page of requested groups
-
getSubgroupsPage
Description copied from interface:GroupsManagerImplApi
Get page of subgroups from the given parent group.- Specified by:
getSubgroupsPage
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessiongroup
- parent groupquery
- query with page information- Returns:
- page of requested groups
-
getParentGroup
Description copied from interface:GroupsManagerImplApi
Get parent group.- Specified by:
getParentGroup
in interfaceGroupsManagerImplApi
- Returns:
- parent group
- Throws:
ParentGroupNotExistsException
-
getGroupByName
Description copied from interface:GroupsManagerImplApi
Search for the group with specified name in specified VO IMPORTANT: need to use full name of group (ex. 'toplevel:a:b', not the shortname which is in this example 'b')- Specified by:
getGroupByName
in interfaceGroupsManagerImplApi
- Returns:
- group with specified name or throws GroupNotExistsException in specified VO
- Throws:
GroupNotExistsException
-
getGroupsByIds
Description copied from interface:GroupsManagerImplApi
Gets groups by their ids. Silently skips non-existing groups.- Specified by:
getGroupsByIds
in interfaceGroupsManagerImplApi
- Returns:
- list of groups with specified ids
-
addMember
public Member addMember(PerunSession sess, Group group, Member member, MembershipType type, int sourceGroupId) throws AlreadyMemberException Description copied from interface:GroupsManagerImplApi
Adds member of the VO to the group in the same VO.- Specified by:
addMember
in interfaceGroupsManagerImplApi
- Returns:
- Member with specific MembershipType
- Throws:
AlreadyMemberException
-
getAllMemberGroups
Description copied from interface:GroupsManagerImplApi
Return all members groups. Included 'members' group.- Specified by:
getAllMemberGroups
in interfaceGroupsManagerImplApi
- Returns:
-
getAllGroupsWhereMemberIsActive
Description copied from interface:GroupsManagerImplApi
Returns all member's groups where member is in active state (is valid there) Included members group.- Specified by:
getAllGroupsWhereMemberIsActive
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessionmember
- member to get groups for- Returns:
- list of groups where member is in active state (valid)
-
getGroupsByAttribute
Description copied from interface:GroupsManagerImplApi
Returns all groups which have set the attribute with the value. Searching only def and opt attributes.- Specified by:
getGroupsByAttribute
in interfaceGroupsManagerImplApi
- Returns:
- list of groups
-
getGroupResourcePairsByAttribute
public List<Pair<Group,Resource>> getGroupResourcePairsByAttribute(PerunSession sess, Attribute attribute) Description copied from interface:GroupsManagerImplApi
Returns all group-resource which have set the attribute with the value. Searching only def and opt attributes.- Specified by:
getGroupResourcePairsByAttribute
in interfaceGroupsManagerImplApi
- Returns:
-
isGroupMember
Description copied from interface:GroupsManagerImplApi
Return true if Member is member of the Group- Specified by:
isGroupMember
in interfaceGroupsManagerImplApi
- Returns:
- true if Member is member of the Group
-
isDirectGroupMember
Description copied from interface:GroupsManagerImplApi
Return true if Member is direct member of the Group- Specified by:
isDirectGroupMember
in interfaceGroupsManagerImplApi
- Returns:
- true if Member is direct member of the Group
-
removeMember
public void removeMember(PerunSession sess, Group group, Member member) throws NotGroupMemberException Description copied from interface:GroupsManagerImplApi
Removes member form the group. The member object MUST have sourceGroupId parameter.- Specified by:
removeMember
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroup
- groupmember
- member- Throws:
NotGroupMemberException
-
getAdmins
Description copied from interface:GroupsManagerImplApi
Gets list of all administrators of this group. If some group is administrator of the given group, all VALID members are included in the list.- Specified by:
getAdmins
in interfaceGroupsManagerImplApi
- Returns:
- list of all administrators
-
getDirectAdmins
Description copied from interface:GroupsManagerImplApi
Gets list of direct user administrators of this group. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.- Specified by:
getDirectAdmins
in interfaceGroupsManagerImplApi
- Returns:
- list of direct administrators
-
getGroupAdmins
Description copied from interface:GroupsManagerImplApi
Gets list of all group administrators of this group.- Specified by:
getGroupAdmins
in interfaceGroupsManagerImplApi
- Returns:
- list of all group administrators
-
getGroupsCount
- Specified by:
getGroupsCount
in interfaceGroupsManagerImplApi
- Returns:
- count of VO's groups
-
getVoId
Description copied from interface:GroupsManagerImplApi
Get the id of the VO which is owner of the group.- Specified by:
getVoId
in interfaceGroupsManagerImplApi
- Returns:
- id of the VO
-
checkGroupExists
Description copied from interface:GroupsManagerImplApi
Check if group exists in underlaying data source.- Specified by:
checkGroupExists
in interfaceGroupsManagerImplApi
- Throws:
GroupNotExistsException
-
groupExists
Description copied from interface:GroupsManagerImplApi
Check if group exists in underlaying data source.- Specified by:
groupExists
in interfaceGroupsManagerImplApi
- Returns:
- true if group exists in underlaying data source, false otherwise
-
getGroupsToSynchronize
Gets all groups which have enabled synchronization.- Specified by:
getGroupsToSynchronize
in interfaceGroupsManagerImplApi
- Parameters:
sess
-- Returns:
- list of groups to synchronize
- Throws:
InternalErrorException
-
getGroupsStructuresToSynchronize
Description copied from interface:GroupsManagerImplApi
Gets all groups which have enabled group structure synchronization.- Specified by:
getGroupsStructuresToSynchronize
in interfaceGroupsManagerImplApi
- Returns:
- list of groups structures to synchronize
-
getGroupApplicationIds
Description copied from interface:GroupsManagerImplApi
Return list of IDs of all applications, which belongs to Group.- Specified by:
getGroupApplicationIds
in interfaceGroupsManagerImplApi
- Returns:
- list of all group applications ids
-
getApplicationReservedLogins
Description copied from interface:GroupsManagerImplApi
Return list of all reserved logins for specific application (pair is namespace and login)- Specified by:
getApplicationReservedLogins
in interfaceGroupsManagerImplApi
- Parameters:
appId
- from which application get reserved logins- Returns:
- list of pairs namespace and login
-
deleteGroupReservedLogins
Description copied from interface:GroupsManagerImplApi
Delete all Group login reservations Reserved logins must be removed from external systems (e.g. KDC) BEFORE calling this method via deletePassword() in UsersManager.- Specified by:
deleteGroupReservedLogins
in interfaceGroupsManagerImplApi
group
- Group to delete all login reservations for
-
getGroupsCount
Description copied from interface:GroupsManagerImplApi
Get count of all groups.- Specified by:
getGroupsCount
in interfaceGroupsManagerImplApi
- Returns:
- count of all groups
-
getGroupsWithAssignedExtSourceInVo
Description copied from interface:GroupsManagerImplApi
Get all groups in specific vo with assigned extSource- Specified by:
getGroupsWithAssignedExtSourceInVo
in interfaceGroupsManagerImplApi
- Returns:
- l
-
removeGroupUnion
public void removeGroupUnion(PerunSession sess, Group resultGroup, Group operandGroup) throws GroupRelationDoesNotExist Description copied from interface:GroupsManagerImplApi
Removes a union between two groups.- Specified by:
removeGroupUnion
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessionresultGroup
- result groupoperandGroup
- operand group- Throws:
GroupRelationDoesNotExist
- if the union between the two groups does not exist
-
removeResultGroupRelations
Description copied from interface:GroupsManagerImplApi
Removes all relations of this result group.- Specified by:
removeResultGroupRelations
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessionresultGroup
- result group
-
saveGroupRelation
public void saveGroupRelation(PerunSession sess, Group resultGroup, Group operandGroup, boolean parentFlag) Description copied from interface:GroupsManagerImplApi
Saves union operation between result group and operand group.- Specified by:
saveGroupRelation
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessionresultGroup
- group to which members are addedoperandGroup
- group from which members are takenparentFlag
- if true union cannot be deleted; false otherwise (it flags relations created by hierarchical structure)
-
isRelationRemovable
Description copied from interface:GroupsManagerImplApi
Check if the relation between given groups can be deleted. Determined by parent flag (it flags relations created by hierarchical structure). It matters which group is resultGroup and which is operandGroup!!!- Specified by:
isRelationRemovable
in interfaceGroupsManagerImplApi
- Returns:
- true if it can be deleted; false otherwise
-
isRelationBetweenGroups
Description copied from interface:GroupsManagerImplApi
Checks if relation between groups exists. It checks both ways. Does not matter which one is result group and which one is operand group.- Specified by:
isRelationBetweenGroups
in interfaceGroupsManagerImplApi
- Parameters:
group1
- groupgroup2
- group- Returns:
- true if there is a relation, false otherwise
-
isOneWayRelationBetweenGroups
Description copied from interface:GroupsManagerImplApi
Checks if relation exists between result group and operand group. It matters which one is result group and which one is operand group.- Specified by:
isOneWayRelationBetweenGroups
in interfaceGroupsManagerImplApi
- Parameters:
resultGroup
- result groupoperandGroup
- operand group- Returns:
- true if there is a one-way relation, false otherwise
-
getResultGroups
Description copied from interface:GroupsManagerImplApi
Return all result groups of requested operand group.- Specified by:
getResultGroups
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroupId
- group id- Returns:
- list of Group objects
-
getOperandGroups
Description copied from interface:GroupsManagerImplApi
Return all operand groups of requested result group.- Specified by:
getOperandGroups
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroupId
- group id- Returns:
- list of Group objects
-
getResultGroupsIds
Description copied from interface:GroupsManagerImplApi
Return list of all result groups ids of requested operand group.- Specified by:
getResultGroupsIds
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroupId
- group id- Returns:
- list of group ids
-
setIndirectGroupStatus
public void setIndirectGroupStatus(PerunSession sess, Member member, Group group, MemberGroupStatus status) Description copied from interface:GroupsManagerImplApi
Set status of the member to specified status for indirect relations where the given group is the source group.- Specified by:
setIndirectGroupStatus
in interfaceGroupsManagerImplApi
member
- member whose status will be changedgroup
- group where member's status will be changedstatus
- status that will be set
-
setDirectGroupStatus
public void setDirectGroupStatus(PerunSession sess, Member member, Group group, MemberGroupStatus status) Description copied from interface:GroupsManagerImplApi
Set direct status of the member to specified status in given group.- Specified by:
setDirectGroupStatus
in interfaceGroupsManagerImplApi
member
- member whose status will be changedgroup
- group where member's status will be changedstatus
- status that will be set
-
getDirectMemberGroupStatus
public MemberGroupStatus getDirectMemberGroupStatus(PerunSession session, Member member, Group group) Description copied from interface:GroupsManagerImplApi
Returns direct members status in given group. If there is no relation, null is returned.- Specified by:
getDirectMemberGroupStatus
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessionmember
- membergroup
- group- Returns:
- status of member in given group, if there is no relation, null is returned
-
getTotalMemberGroupStatus
public MemberGroupStatus getTotalMemberGroupStatus(PerunSession session, Member member, Group group) Description copied from interface:GroupsManagerImplApi
Returns total member's status in given group. If there is no relation, null is returned.- Specified by:
getTotalMemberGroupStatus
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessionmember
- membergroup
- group- Returns:
- total status of member in given group, if there is no relation, null is returned
-
getTotalGroupStatusForMembers
public Map<Integer,MemberGroupStatus> getTotalGroupStatusForMembers(PerunSession session, Group group, List<Member> members) Description copied from interface:GroupsManagerImplApi
Returns total member's status of given members in given group.- Specified by:
getTotalGroupStatusForMembers
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- groupmembers
- members- Returns:
- total status of members in given group
-
getFacilitiesWhereGroupIsAdmin
Description copied from interface:GroupsManagerImplApi
Returns all facilities where given group si FACILITYADMIN.- Specified by:
getFacilitiesWhereGroupIsAdmin
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all facilities where given group si FACILITYADMIN
-
getGroupsWhereGroupIsAdmin
Description copied from interface:GroupsManagerImplApi
Returns all groups where given group si GROUPADMIN.- Specified by:
getGroupsWhereGroupIsAdmin
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all groups where given group is GROUPADMIN
-
getResourcesWhereGroupIsAdmin
Description copied from interface:GroupsManagerImplApi
Returns all resources where given group si RESOURCEADMIN.- Specified by:
getResourcesWhereGroupIsAdmin
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all resources where given group is RESOURCEADMIN
-
getResourcesWhereGroupIsResourceSelfService
public List<Resource> getResourcesWhereGroupIsResourceSelfService(PerunSession session, Group group) Description copied from interface:GroupsManagerImplApi
Returns all resources where given group si RESOURCESELFSERVICE.- Specified by:
getResourcesWhereGroupIsResourceSelfService
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all resources where given group is RESOURCESELFSERVICE
-
getSecurityTeamsWhereGroupIsAdmin
Description copied from interface:GroupsManagerImplApi
Returns all security teams where given group si SECURITYADMIN.- Specified by:
getSecurityTeamsWhereGroupIsAdmin
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all security teams where given group is SECURITYADMIN
-
getVosWhereGroupIsAdmin
Description copied from interface:GroupsManagerImplApi
Returns all vos where given group si VOADMIN.- Specified by:
getVosWhereGroupIsAdmin
in interfaceGroupsManagerImplApi
- Parameters:
session
- sessiongroup
- group- Returns:
- list of all vos where given group is VOADMIN
-
getGroupsForAutoRegistration
Description copied from interface:GroupsManagerImplApi
Returns all groups which can be registered into during vo registration.- Specified by:
getGroupsForAutoRegistration
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessionvo
- vo- Returns:
- list of groups
-
deleteGroupFromAutoRegistration
Description copied from interface:GroupsManagerImplApi
Deletes group from list of groups which can be registered into during vo registration.- Specified by:
deleteGroupFromAutoRegistration
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessiongroup
- group to delete
-
addGroupToAutoRegistration
Description copied from interface:GroupsManagerImplApi
Adds group to the list of groups which can be registered into during vo registration.- Specified by:
addGroupToAutoRegistration
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessiongroup
- group to add
-
isGroupForAutoRegistration
Description copied from interface:GroupsManagerImplApi
Check if group has automatic registration enabled.- Specified by:
isGroupForAutoRegistration
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessiongroup
- group to check
-
allowGroupToHierarchicalVo
Description copied from interface:GroupsManagerImplApi
Sets flag required for including group to parent vo in a vo hierarchy.- Specified by:
allowGroupToHierarchicalVo
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroup
- groupvo
- parent vo
-
disallowGroupToHierarchicalVo
Description copied from interface:GroupsManagerImplApi
Unsets flag required for including group to parent vo in a vo hierarchy- Specified by:
disallowGroupToHierarchicalVo
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroup
- groupvo
- parent vo
-
isAllowedGroupToHierarchicalVo
Description copied from interface:GroupsManagerImplApi
Returns flag representing if the group can be included in the (parent) vo's groups- Specified by:
isAllowedGroupToHierarchicalVo
in interfaceGroupsManagerImplApi
- Parameters:
sess
- perun sessiongroup
- groupvo
- parent vo- Returns:
- true if group can be included in vo's groups, false otherwise
-
getAllAllowedGroupsToHierarchicalVo
Description copied from interface:GroupsManagerImplApi
Returns all groups which can be included to VO.- Specified by:
getAllAllowedGroupsToHierarchicalVo
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessionvo
- vo- Returns:
- list of allowed groups to hierarchical VO
-
getAllAllowedGroupsToHierarchicalVo
Description copied from interface:GroupsManagerImplApi
Returns groups which can be included to VO from specific member VO.- Specified by:
getAllAllowedGroupsToHierarchicalVo
in interfaceGroupsManagerImplApi
- Parameters:
sess
- sessionvo
- parent VOmemberVo
- member VO- Returns:
- list of allowed groups to hierarchical VO
-