lumis.portal.group
Class GroupManager

Package class diagram package GroupManager
java.lang.Object
  extended by lumis.portal.group.GroupManager
All Implemented Interfaces:
IGroupManager, IConfigDeleter

public class GroupManager
extends Object
implements IGroupManager

Class responsible for managing operations on the portal groups.

Since:
4.0.0

Field Summary
 
Fields inherited from interface lumis.portal.group.IGroupManager
FILTER_TYPE_ONLY_GROUPS, FILTER_TYPE_ONLY_USERS, FILTER_TYPE_USERS_AND_GROUPS, GROUP_ID_ALL_REGISTERED_USERS, GROUP_ID_ALL_USERS
 
Constructor Summary
GroupManager()
           
 
Method Summary
 String add(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
          Add a group.
 void addMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction)
          Add a member into the group.
 void addOrUpdate(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
           
 void delete(SessionConfig sessionConfig, String groupId, ITransaction transaction)
          Delete a group.
 void deleteAllMembers(SessionConfig sessionConfig, String groupId, ITransaction transaction)
          Delete all member associations for the specified group.
 void deleteConfig(DeserializationContext deserializationContext, String configId)
           
 void deleteMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction)
          Delete a member of the group.
 String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node groupNode, ITransaction transaction)
           
 void deserializeMembers(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node membersNodes, ITransaction transaction)
           
 GroupConfig get(SessionConfig sessionConfig, String groupId, ITransaction transaction)
          Get the group.
 Collection<GroupConfig> getByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
          Get all local groups from the specified channel
 Collection<GroupConfig> getByOrigin(SessionConfig sessionConfig, String origin, ITransaction transaction)
          Get the local groups configuration for the specified origin.
 Collection<String> getIds(SessionConfig sessionConfig, ITransaction transaction)
          Get all groups.
 Collection<String> getMemberGroups(SessionConfig sessionConfig, String memberId, boolean recursively, ITransaction transaction)
          VERIFICAR O NOME: getIdsByMemberId Returns an array of groups of the given member.
 Collection<String> getMembers(SessionConfig sessionConfig, String groupId, int filterType, boolean recursively, ITransaction transaction)
          Returns the immediate group members.
 boolean isMember(SessionConfig sessionConfig, String groupId, String principalId, ITransaction transaction)
          Verifies if a principal is a member of a group.
 void serialize(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction)
           
 void serializeMembers(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction)
           
 void update(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
          Update the group configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupManager

public GroupManager()
Method Detail

addOrUpdate

public void addOrUpdate(SessionConfig sessionConfig,
                        GroupConfig groupConfig,
                        ITransaction transaction)
                 throws ManagerException,
                        PortalException
Specified by:
addOrUpdate in interface IGroupManager
Throws:
ManagerException
PortalException

add

public String add(SessionConfig sessionConfig,
                  GroupConfig groupConfig,
                  ITransaction transaction)
           throws ManagerException,
                  PortalException
Description copied from interface: IGroupManager
Add a group.

Specified by:
add in interface IGroupManager
Returns:
Returns a String.
Throws:
ManagerException
PortalException

update

public void update(SessionConfig sessionConfig,
                   GroupConfig groupConfig,
                   ITransaction transaction)
            throws ManagerException,
                   PortalException
Description copied from interface: IGroupManager
Update the group configuration.

Specified by:
update in interface IGroupManager
Throws:
ManagerException
PortalException

get

public GroupConfig get(SessionConfig sessionConfig,
                       String groupId,
                       ITransaction transaction)
                throws ManagerException,
                       PortalException
Description copied from interface: IGroupManager
Get the group.

Specified by:
get in interface IGroupManager
Returns:
Returns a GroupConfig.
Throws:
ManagerException
PortalException

delete

public void delete(SessionConfig sessionConfig,
                   String groupId,
                   ITransaction transaction)
            throws ManagerException,
                   PortalException
Description copied from interface: IGroupManager
Delete a group.

Specified by:
delete in interface IGroupManager
Throws:
ManagerException
PortalException

getIds

public Collection<String> getIds(SessionConfig sessionConfig,
                                 ITransaction transaction)
                          throws ManagerException,
                                 PortalException
Description copied from interface: IGroupManager
Get all groups.

Specified by:
getIds in interface IGroupManager
Returns:
Returns an array of Strings.
Throws:
ManagerException
PortalException

addMember

public void addMember(SessionConfig sessionConfig,
                      String groupId,
                      String memberId,
                      ITransaction transaction)
               throws ManagerException,
                      PortalException
Description copied from interface: IGroupManager
Add a member into the group. The members may be users or groups.

Specified by:
addMember in interface IGroupManager
Throws:
ManagerException
PortalException

deleteMember

public void deleteMember(SessionConfig sessionConfig,
                         String groupId,
                         String memberId,
                         ITransaction transaction)
                  throws ManagerException,
                         PortalException
Description copied from interface: IGroupManager
Delete a member of the group.

Specified by:
deleteMember in interface IGroupManager
Throws:
ManagerException
PortalException

getMembers

public Collection<String> getMembers(SessionConfig sessionConfig,
                                     String groupId,
                                     int filterType,
                                     boolean recursively,
                                     ITransaction transaction)
                              throws ManagerException,
                                     PortalException
Description copied from interface: IGroupManager
Returns the immediate group members. The members may be users or groups. You can specify to get direct members or all members recursively as well as the type of members that should be considered.

Specified by:
getMembers in interface IGroupManager
Parameters:
sessionConfig - the user session information.
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, IGroupManager.FILTER_TYPE_ONLY_GROUPS.
recursively - true to search for members recursively, false otherwise.
transaction - the transaction for persistence access.
Returns:
a collection of group member identifiers.
Throws:
ManagerException
PortalException

getMemberGroups

public Collection<String> getMemberGroups(SessionConfig sessionConfig,
                                          String memberId,
                                          boolean recursively,
                                          ITransaction transaction)
                                   throws ManagerException,
                                          PortalException
Description copied from interface: IGroupManager
VERIFICAR O NOME: getIdsByMemberId Returns an array of groups of the given member. The list of members must include the framework groups "all" and "registered users" if the current user is not the guest user. You can specify to get just direct groups as well as all groups recursively

Specified by:
getMemberGroups in interface IGroupManager
Returns:
Returns an array of Strings.
Throws:
ManagerException
PortalException

getByChannelId

public Collection<GroupConfig> getByChannelId(SessionConfig sessionConfig,
                                              String channelId,
                                              ITransaction transaction)
                                       throws ManagerException,
                                              PortalException
Description copied from interface: IGroupManager
Get all local groups from the specified channel

Specified by:
getByChannelId in interface IGroupManager
Returns:
Returns an array of GroupConfig.
Throws:
ManagerException
PortalException

serialize

public void serialize(SessionConfig sessionConfig,
                      GroupConfig groupConfig,
                      OutputStream outputStream,
                      ITransaction transaction)
               throws ManagerException,
                      PortalException
Specified by:
serialize in interface IGroupManager
Throws:
ManagerException
PortalException

serializeMembers

public void serializeMembers(SessionConfig sessionConfig,
                             GroupConfig groupConfig,
                             OutputStream outputStream,
                             ITransaction transaction)
                      throws ManagerException,
                             PortalException
Specified by:
serializeMembers in interface IGroupManager
Throws:
ManagerException
PortalException

deserialize

public String deserialize(SessionConfig sessionConfig,
                          DeserializationConfig deserializationConfig,
                          Node groupNode,
                          ITransaction transaction)
                   throws ManagerException,
                          PortalException
Specified by:
deserialize in interface IGroupManager
Returns:
Returns a String.
Throws:
ManagerException
PortalException

deserializeMembers

public void deserializeMembers(SessionConfig sessionConfig,
                               DeserializationConfig deserializationConfig,
                               Node membersNodes,
                               ITransaction transaction)
                        throws ManagerException,
                               PortalException
Specified by:
deserializeMembers in interface IGroupManager
Throws:
ManagerException
PortalException

deleteConfig

public void deleteConfig(DeserializationContext deserializationContext,
                         String configId)
                  throws PortalException
Specified by:
deleteConfig in interface IConfigDeleter
Throws:
PortalException

getByOrigin

public Collection<GroupConfig> getByOrigin(SessionConfig sessionConfig,
                                           String origin,
                                           ITransaction transaction)
                                    throws ManagerException,
                                           PortalException
Description copied from interface: IGroupManager
Get the local groups configuration for the specified origin.

Specified by:
getByOrigin in interface IGroupManager
origin - the origin identifier
transaction - the transaction for persistence access.
Returns:
Throws:
DaoException
PortalException
ManagerException

deleteAllMembers

public void deleteAllMembers(SessionConfig sessionConfig,
                             String groupId,
                             ITransaction transaction)
                      throws DaoException,
                             PortalException
Description copied from interface: IGroupManager
Delete all member associations for the specified group.

Specified by:
deleteAllMembers in interface IGroupManager
Parameters:
sessionConfig - the user session information.
groupId - the group id.
transaction - the transaction for persistence access.
Throws:
DaoException
PortalException

isMember

public boolean isMember(SessionConfig sessionConfig,
                        String groupId,
                        String principalId,
                        ITransaction transaction)
                 throws DaoException,
                        PortalException
Description copied from interface: IGroupManager
Verifies if a principal is a member of a group.

Specified by:
isMember in interface IGroupManager
Returns:
true if the specified principal is member of the group or any of it subgroups recursively, false otherwise.
Throws:
DaoException
PortalException


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