lumis.portal.group.standardmembership
Class StandardGroupMembershipProvider

Package class diagram package StandardGroupMembershipProvider
java.lang.Object
  extended by lumis.portal.group.AbstractGroupMembershipProvider
      extended by 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

Constructor Summary
StandardGroupMembershipProvider()
           
 
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 destroy()
          Indicates that this membership provider will no longer be used.
 Collection<String> getGroups(String principalId)
          Returns the groups of a principal.
 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.
 
Methods inherited from class lumis.portal.group.AbstractGroupMembershipProvider
deleteGroupTypeMembershipData, getGroupConfigurationInterfaceId, getGroupType, getGroupTypeConfigurationInterfaceId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardGroupMembershipProvider

public StandardGroupMembershipProvider()
Method Detail

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 interface IGroupMembershipProvider
Overrides:
init in class AbstractGroupMembershipProvider
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 interface IGroupMembershipProvider
Overrides:
destroy in class AbstractGroupMembershipProvider

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 interface IGroupMembershipProvider
Overrides:
addMember in class AbstractGroupMembershipProvider
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 interface IGroupMembershipProvider
Overrides:
removeMember in class AbstractGroupMembershipProvider
Parameters:
groupId - the group identifier.
memberId - the member identifier.
Throws:
PortalException

getGroups

public Collection<String> getGroups(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 Collection<String> getMembers(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 of IGroupManager.FILTER_TYPE_USERS_AND_GROUPS, IGroupManager.FILTER_TYPE_ONLY_USERS or IGroupManager.FILTER_TYPE_ONLY_GROUPS.
Returns:
a collection of group's member principals identifiers, obeying the specified filter type.
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: IGroupMembershipProvider.deleteGroupConfiguration Sequence Diagram

Specified by:
deleteGroupMembershipData in interface IGroupMembershipProvider
Overrides:
deleteGroupMembershipData in class AbstractGroupMembershipProvider
Parameters:
groupId - the group identifier.
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.