Class AbstractGroupMembershipProvider
- java.lang.Object
-
- lumis.portal.group.AbstractGroupMembershipProvider
-
- All Implemented Interfaces:
IGroupMembershipProvider
- Direct Known Subclasses:
DatabaseViewGroupMembershipProvider
,StandardGroupMembershipProvider
@StableMinor(version="14.0", sinceVersion="4.2") public abstract class AbstractGroupMembershipProvider extends Object implements IGroupMembershipProvider
An abstract implementation forIGroupMembershipProvider
, that minimizes the number of methods required to be implemented.Member modification operations (
addMember(String, String)
andremoveMember(String, String)
) are implemented as throwingUnsupportedOperationException
.Configuration interface getter methods are implemented as returning null, and delete membership data methods do nothing.
- Since:
- 4.2.1
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
- See Also:
IGroupMembershipProvider
-
-
Constructor Summary
Constructors Constructor Description AbstractGroupMembershipProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMember(String groupId, String memberId)
Add a member into a group.void
deleteGroupMembershipData(String groupId)
Deletes all data stored for managing the membership of a group.void
deleteGroupTypeMembershipData()
Deletes all data stored for managing the membership of a group type.void
destroy()
Indicates that this membership provider will no longer be used.String
getGroupConfigurationInterfaceId()
Returns the interface identifier for editing configurations at a group scope.protected GroupType
getGroupType()
Returns the group type this instance is providing group membership to.String
getGroupTypeConfigurationInterfaceId()
Returns the interface identifier for editing configurations at a group type scope.void
init(GroupType groupType)
Initializes this membership provider to be used for the given group type.void
removeMember(String groupId, String memberId)
Remove a member from a group.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.group.IGroupMembershipProvider
getGroups, getMembers
-
-
-
-
Method Detail
-
getGroupType
protected GroupType getGroupType()
Returns the group type this instance is providing group membership to. This value is set duringinit(GroupType)
.- Returns:
- the group type.
- Since:
- 4.2.1
-
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
- 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
-
getGroupConfigurationInterfaceId
public String getGroupConfigurationInterfaceId()
Description copied from interface:IGroupMembershipProvider
Returns the interface identifier for editing configurations at a group scope.The interface will receive the parameter groupId with the identifier of the group being configured.
Usually
IGroupMembershipProvider.deleteGroupMembershipData(String)
will be used to delete data stored using this configuration interface.- Specified by:
getGroupConfigurationInterfaceId
in interfaceIGroupMembershipProvider
- Returns:
- the interface identifier, or null if no such configuration interface exists.
-
getGroupTypeConfigurationInterfaceId
public String getGroupTypeConfigurationInterfaceId()
Description copied from interface:IGroupMembershipProvider
Returns the interface identifier for editing configurations at a group type scope.The interface will receive the parameter groupTypeId with the identifier of the group type being configured.
Usually
IGroupMembershipProvider.deleteGroupTypeMembershipData()
will be used to delete data stored using this configuration interface.- Specified by:
getGroupTypeConfigurationInterfaceId
in interfaceIGroupMembershipProvider
- Returns:
- the interface identifier, or null if no such configuration interface exists.
-
addMember
public void addMember(String groupId, String memberId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Add a member into a group.- Specified by:
addMember
in interfaceIGroupMembershipProvider
- Parameters:
groupId
- the group identifier.memberId
- the member identifier.- Throws:
PortalException
-
removeMember
public void removeMember(String groupId, String memberId) throws PortalException
Description copied from interface:IGroupMembershipProvider
Remove a member from a group.- Specified by:
removeMember
in interfaceIGroupMembershipProvider
- Parameters:
groupId
- the group identifier.memberId
- the member identifier.- Throws:
PortalException
-
deleteGroupMembershipData
public void deleteGroupMembershipData(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
- Parameters:
groupId
- the group identifier.- Throws:
PortalException
-
deleteGroupTypeMembershipData
public void deleteGroupTypeMembershipData() throws PortalException
Description copied from interface:IGroupMembershipProvider
Deletes all data stored for managing the membership of a group type. This method is called before a group type 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 type membership.
- Specified by:
deleteGroupTypeMembershipData
in interfaceIGroupMembershipProvider
- Throws:
PortalException
-
-