Class StandardGroupMembershipProvider
- java.lang.Object
-
- lumis.portal.group.AbstractGroupMembershipProvider
-
- lumis.portal.group.standardmembership.StandardGroupMembershipProvider
-
- All Implemented Interfaces:
IGroupMembershipProvider
public class StandardGroupMembershipProvider extends AbstractGroupMembershipProvider
Portal standard group membership provider. Stores membership information in the lum_GroupMember table in the portal database.- Since:
- 4.2.1
- Version:
- $Revision: 21880 $ $Date: 2018-09-21 17:07:19 -0300 (Fri, 21 Sep 2018) $
-
-
Constructor Summary
Constructors Constructor Description StandardGroupMembershipProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMember(java.lang.String groupId, java.lang.String memberId)
Add a member into a group.protected java.util.Collection<CacheItem<java.util.Collection<java.lang.String>>>
bulkLoadMemberships(ICacheMultiDataProvider.IRequest request)
Bulk load the memberships.void
deleteGroupMembershipData(java.lang.String groupId)
Deletes all data stored for managing the membership of a group.void
destroy()
Indicates that this membership provider will no longer be used.java.util.Collection<java.lang.String>
getGroups(java.lang.String principalId)
Returns the groups of a principal.java.util.Collection<java.lang.String>
getMembers(java.lang.String groupId, int filterType)
Returns the members of a group.void
init(GroupType groupType)
Initializes this membership provider to be used for the given group type.void
removeMember(java.lang.String groupId, java.lang.String memberId)
Remove a member from a group.-
Methods inherited from class lumis.portal.group.AbstractGroupMembershipProvider
deleteGroupTypeMembershipData, getGroupConfigurationInterfaceId, getGroupType, getGroupTypeConfigurationInterfaceId
-
-
-
-
Method Detail
-
bulkLoadMemberships
protected java.util.Collection<CacheItem<java.util.Collection<java.lang.String>>> bulkLoadMemberships(ICacheMultiDataProvider.IRequest request) throws PortalException
Bulk load the memberships.- Parameters:
request
- the cache request.- Returns:
- the memberships.
- Throws:
PortalException
- Since:
- 11.0.0
-
init
public void init(GroupType groupType)
Description copied from interface:IGroupMembershipProvider
Initializes this membership provider to be used for the given group type.This method is the first method called after an instance creation.
- Specified by:
init
in interfaceIGroupMembershipProvider
- Overrides:
init
in classAbstractGroupMembershipProvider
- Parameters:
groupType
- the group type.
-
destroy
public void destroy()
Description copied from interface:IGroupMembershipProvider
Indicates that this membership provider will no longer be used.This method may be used to clean up resources allocated in this instance. This instance is no longer used after this method is called.
- Specified by:
destroy
in interfaceIGroupMembershipProvider
- Overrides:
destroy
in classAbstractGroupMembershipProvider
-
addMember
public void addMember(java.lang.String groupId, java.lang.String memberId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Add a member into a group.- Specified by:
addMember
in interfaceIGroupMembershipProvider
- Overrides:
addMember
in classAbstractGroupMembershipProvider
- Parameters:
groupId
- the group identifier.memberId
- the member identifier.- Throws:
PortalException
-
removeMember
public void removeMember(java.lang.String groupId, java.lang.String memberId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Remove a member from a group.- Specified by:
removeMember
in interfaceIGroupMembershipProvider
- Overrides:
removeMember
in classAbstractGroupMembershipProvider
- Parameters:
groupId
- the group identifier.memberId
- the member identifier.- Throws:
PortalException
-
getGroups
public java.util.Collection<java.lang.String> getGroups(java.lang.String principalId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Returns the groups of a principal. Only the direct groups, belonging to the group type this provider is serving, are to be returned.- Parameters:
principalId
- the principal identifier.- Returns:
- the groups identifiers.
- Throws:
PortalException
-
getMembers
public java.util.Collection<java.lang.String> getMembers(java.lang.String groupId, int filterType) throws PortalException
Description copied from interface:IGroupMembershipProvider
Returns the members of a group. Only the direct members are returned.- Parameters:
groupId
- the group identifier.filterType
- defines how the result will be filtered. This may be one ofIGroupManager.FILTER_TYPE_USERS_AND_GROUPS
,IGroupManager.FILTER_TYPE_ONLY_USERS
orIGroupManager.FILTER_TYPE_ONLY_GROUPS
.- Returns:
- a collection of group's member principals identifiers, obeying the specified filter type.
- Throws:
PortalException
-
deleteGroupMembershipData
public void deleteGroupMembershipData(java.lang.String groupId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Deletes all data stored for managing the membership of a group. This method is called before a group is deleted, in the same transaction in which the deletion will be performed.This allows this provider to cleanup membership, configuration or other data that it stores for managing a group membership.
This deletion process order is illustrated in the following diagram:
- Specified by:
deleteGroupMembershipData
in interfaceIGroupMembershipProvider
- Overrides:
deleteGroupMembershipData
in classAbstractGroupMembershipProvider
- Parameters:
groupId
- the group identifier.- Throws:
PortalException
-
-