lumis.portal.group
Class AbstractGroupMembershipProvider

Package class diagram package AbstractGroupMembershipProvider
java.lang.Object
  extended by lumis.portal.group.AbstractGroupMembershipProvider
All Implemented Interfaces:
IGroupMembershipProvider
Direct Known Subclasses:
DatabaseViewGroupMembershipProvider, StandardGroupMembershipProvider

@StableMinor(version="5.5",
             sinceVersion="4.2")
public abstract class AbstractGroupMembershipProvider
extends Object
implements IGroupMembershipProvider

An abstract implementation for IGroupMembershipProvider, that minimizes the number of methods required to be implemented.

Member modification operations (addMember(String, String) and removeMember(String, String)) are implemented as throwing UnsupportedOperationException.

Configuration interface getter methods are implemented as returning null, and delete membership data methods do nothing.

Since:
4.2.1
See Also:
IGroupMembershipProvider

Constructor Summary
AbstractGroupMembershipProvider()
           
 
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.
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
 

Constructor Detail

AbstractGroupMembershipProvider

public AbstractGroupMembershipProvider()
Method Detail

getGroupType

protected GroupType getGroupType()
Returns the group type this instance is providing group membership to. This value is set during init(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 interface IGroupMembershipProvider
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

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 interface IGroupMembershipProvider
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 interface IGroupMembershipProvider
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 interface IGroupMembershipProvider
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
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: IGroupMembershipProvider.deleteGroupConfiguration Sequence Diagram

Specified by:
deleteGroupMembershipData in interface IGroupMembershipProvider
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 interface IGroupMembershipProvider
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.