|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@StableMinor(version="5.5", sinceVersion="4.2") public interface IGroupMembershipProvider
Provides group membership information. A portal solution may configure a group type to use a specific implementation of this interface as a way to customize group membership definition/calculation.
Membership caching is responsibility of IGroupMembershipProvider. It decides its own caching policy, using one appropriated to its membership calculation logic.
All methods of this interface are called within a transactional context and within a user session context.
The following diagram shows the lifecycle for a IGroupMembershipProvider instance and the methods called in each transition:
Method Summary | |
---|---|
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. |
Collection<String> |
getGroups(String principalId)
Returns the groups of a principal. |
String |
getGroupTypeConfigurationInterfaceId()
Returns the interface identifier for editing configurations at a group type scope. |
Collection<String> |
getMembers(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(String groupId,
String memberId)
Remove a member from a group. |
Method Detail |
---|
void init(GroupType groupType)
This method is the first method called after an instance creation.
groupType
- the group type.void destroy()
This method may be used to clean up resources allocated in this instance. This instance is no longer used after this method is called.
String getGroupTypeConfigurationInterfaceId()
The interface will receive the parameter groupTypeId with the identifier of the group type being configured.
Usually deleteGroupTypeMembershipData()
will be used to
delete data stored using this configuration interface.
String getGroupConfigurationInterfaceId()
The interface will receive the parameter groupId with the identifier of the group being configured.
Usually deleteGroupMembershipData(String)
will be used to
delete data stored using this configuration interface.
void addMember(String groupId, String memberId) throws PortalException
groupId
- the group identifier.memberId
- the member identifier.
UnsupportedOperationException
- if this membership provider
is read-only and does not supports adding members through this interface.
PortalException
void removeMember(String groupId, String memberId) throws PortalException
groupId
- the group identifier.memberId
- the member identifier.
UnsupportedOperationException
- if this membership provider
is read-only and does not supports removing members through this
interface. Note that if the member ceases to exists, and, even if this
method throws this exception, getMembers(String, int)
should no longer return that member as it does not exist.
PortalException
Collection<String> getMembers(String groupId, int filterType) throws PortalException
groupId
- the group identifier.filterType
- defines how the result will be filtered.
This may be one of IGroupManager.FILTER_TYPE_USERS_AND_GROUPS
,
IGroupManager.FILTER_TYPE_ONLY_USERS
or
IGroupManager.FILTER_TYPE_ONLY_GROUPS
.
PortalException
Collection<String> getGroups(String principalId) throws PortalException
principalId
- the principal identifier.
PortalException
void deleteGroupTypeMembershipData() throws PortalException
This allows this provider to cleanup membership, configuration or other data that it stores for managing a group type membership.
PortalException
void deleteGroupMembershipData(String groupId) throws PortalException
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:
groupId
- the group identifier.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |