Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.channels.groupsmanager
Class CGroupsManagerServantFactory

    java.lang.Object
      org.jasig.portal.channels.groupsmanager.CGroupsManagerServantFactory

All Implemented Interfaces:
  GroupsManagerConstants

    public class CGroupsManagerServantFactory

extends java.lang.Object
implements GroupsManagerConstants

A Factory that produces a Groups Manager `IServant` for one of several groups-management related tasks. Each specific servant is available from one of the methods documented below. Groups Manager servants can relieve uPortal channels from having to implement complicated custom GUIs for managing group memberships or selecting groups and entities.

Version:
  $Revision: 1.17.2.3 $
Author:
  Alex Vigdor
See Also:
  `as an example of using Groups Manager servants`

Field Summary
`private static CGroupsManager` | `_groupsManager`
`private static CGroupsManagerServantFactory` | `_instance`
`private static int` | `UID`

Fields inherited from interface org.jasig.portal.channels.groupsmanager.GroupsManagerConstants
`ADD_REMOVE_PERMISSION, ASSIGN_PERMISSION, BASE_PACKAGE, BROWSE_MODE, COMMANDS_PACKAGE, CREATE_PERMISSION, DELETE_PERMISSION, EDIT_MODE, ENTITY_CLASSNAME, ENTITY_TAGNAME, GROUP_CLASSNAME, GROUP_TAGNAME, GROUPS_PACKAGE, MEMBERS_ONLY_MODE, OWNER, PROPERTIES_TAGNAME, ROOT_GROUP_DESCRIPTION, ROOT_GROUP_TITLE, SECURITY_PACKAGE, SELECT_MODE, SELECT_PERMISSION, UPDATE_PERMISSION, VIEW_PERMISSION, WRAPPERS_PACKAGE`

Constructor Summary
`protected` | `CGroupsManagerServantFactory()` Creates new CGroupsManagerServantFactory

Method Summary
`protected static ChannelStaticData` | `cloneStaticData(ChannelStaticData sd)`
`protected static CGroupsManagerServant` | `getGroupsServant()`
`static IServant` | `getGroupsServantforAddRemove(ChannelStaticData staticData, java.lang.String groupKey)` Returns a servant with the group corresponding to the provided key selected and locked for editing.
`static IServant` | `getGroupsServantforGroupMemberships(ChannelStaticData staticData, java.lang.String message, IGroupMember member, boolean allowFinish)` Returns a servant that is used to select IEntityGroups that the supplied GroupMember belongs to.
`static IServant` | `getGroupsServantforSelection(ChannelStaticData staticData, java.lang.String message)` Returns a servant that is used to select IGroupMembers.
`static IServant` | `getGroupsServantforSelection(ChannelStaticData staticData, java.lang.String message, java.lang.String type)` Returns a servant that is used to select IGroupMembers.
`static IServant` | `getGroupsServantforSelection(ChannelStaticData staticData, java.lang.String message, java.lang.String type, boolean allowFinish, boolean allowEntitySelect)` Returns a servant that is used to select IGroupMembers.
`static IServant` | `getGroupsServantforSelection(ChannelStaticData staticData, java.lang.String message, java.lang.String type, boolean allowFinish, boolean allowEntitySelect, IGroupMember[] members)` Returns a servant that is used to select IGroupMembers.
`static IServant` | `getGroupsServantforSelection(ChannelStaticData staticData, java.lang.String message, java.lang.String type, boolean allowFinish, boolean allowEntitySelect, IGroupMember[] members, IGroupsManagerPermissions permissions)` Returns a servant that is used to select IGroupMembers.
`static java.lang.String` | `getNextUid()` Returns the next sequential identifier which is used to uniquely identify an element.
`static IGroupsManagerPermissions` | `getPermissionsPolicy(ChannelStaticData staticData)` Returns a permissions policy based upon the users role.
`protected static CGroupsManagerServantFactory` | `instance()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _instance

    private static CGroupsManagerServantFactory _instance

### UID

    private static int UID

### _groupsManager

    private static CGroupsManager _groupsManager

Constructor Detail

### CGroupsManagerServantFactory

    protected CGroupsManagerServantFactory()

  Creates new CGroupsManagerServantFactory

Method Detail

### getGroupsServant

    protected static CGroupsManagerServant getGroupsServant()

### getGroupsServantforSelection

    public static IServant getGroupsServantforSelection(ChannelStaticData staticData,
                                                        java.lang.String message)
                                                 throws PortalException

  Returns a servant that is used to select IGroupMembers. The list of selected IGroupMembers is available via the getResults() method

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
  Returns:
    IServant
  Throws:
    `PortalException`

### getGroupsServantforSelection

    public static IServant getGroupsServantforSelection(ChannelStaticData staticData,
                                                        java.lang.String message,
                                                        java.lang.String type,
                                                        boolean allowFinish,
                                                        boolean allowEntitySelect,
                                                        IGroupMember[] members)
                                                 throws PortalException

  Returns a servant that is used to select IGroupMembers. The list of selected IGroupMembers is available via the getResults() method

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
    `type` - the distinguished group name representing the desired root group for selection, e.g. GroupService.EVERYONE or GroupService.ALL_CATEGORIES
    `allowFinish` - whether or not the user can "finish" selecting. if false, the servant method "isFinished()" will always return false; the master must have some other mechanism for allowing the user to change screens.
    `allowEntitySelect` - if false, only groups can be selected
    `members` - an IGroupMember[] of pre-selected members.
  Returns:
    IServant
  Throws:
    `PortalException`

### getGroupsServantforGroupMemberships

    public static IServant getGroupsServantforGroupMemberships(ChannelStaticData staticData,
                                                               java.lang.String message,
                                                               IGroupMember member,
                                                               boolean allowFinish)
                                                        throws PortalException

  Returns a servant that is used to select IEntityGroups that the supplied GroupMember belongs to. Existing memberships are reflected as pre- selected groups.

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
    `member` - The IGroupMember whose parent groups are to be selected
    `allowFinish` - whether or not the user can "finish" selecting. if false, the servant method "isFinished()" will always return false; the master must have some other mechanism for allowing the user to change screens.
  Returns:
    IServant
  Throws:
    `PortalException`

### getGroupsServantforSelection

    public static IServant getGroupsServantforSelection(ChannelStaticData staticData,
                                                        java.lang.String message,
                                                        java.lang.String type)
                                                 throws PortalException

  Returns a servant that is used to select IGroupMembers. The list of selected IGroupMembers is available via the getResults() method

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
    `type` - the distinguished group name representing the desired root group for selection, e.g. GroupService.EVERYONE or GroupService.ALL_CATEGORIES
  Returns:
    IServant
  Throws:
    `PortalException`

### getGroupsServantforSelection

    public static IServant getGroupsServantforSelection(ChannelStaticData staticData,
                                                        java.lang.String message,
                                                        java.lang.String type,
                                                        boolean allowFinish,
                                                        boolean allowEntitySelect)
                                                 throws PortalException

  Returns a servant that is used to select IGroupMembers. The list of selected IGroupMembers is available via the getResults() method

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
    `type` - the distinguished group name representing the desired root group for selection, e.g. GroupService.EVERYONE or GroupService.ALL_CATEGORIES
    `allowFinish` - whether or not the user can "finish" selecting. if false, the servant method "isFinished()" will always return false; the master must have some other mechanism for allowing the user to change screens.
    `allowEntitySelect` - if false, only groups can be selected
  Returns:
    IServant
  Throws:
    `PortalException`

### getGroupsServantforAddRemove

    public static IServant getGroupsServantforAddRemove(ChannelStaticData staticData,
                                                        java.lang.String groupKey)
                                                 throws PortalException

  Returns a servant with the group corresponding to the provided key selected and locked for editing. Only add/remove member functions are enabled - group name, description and permissions are not editable.

  Parameters:
    `staticData` -
    `groupKey` - the group to be managed
  Returns:
    IServant
  Throws:
    `PortalException`

### cloneStaticData

    protected static ChannelStaticData cloneStaticData(ChannelStaticData sd)

### instance

    protected static CGroupsManagerServantFactory instance()

### getNextUid

    public static java.lang.String getNextUid()

  Returns the next sequential identifier which is used to uniquely identify an element. This identifier is held in the Element "id" attribute. "0" is reserved for the Group containing the Initial Contexts for the user.

  Returns:
    String

### getGroupsServantforSelection

    public static IServant getGroupsServantforSelection(ChannelStaticData staticData,
                                                        java.lang.String message,
                                                        java.lang.String type,
                                                        boolean allowFinish,
                                                        boolean allowEntitySelect,
                                                        IGroupMember[] members,
                                                        IGroupsManagerPermissions permissions)
                                                 throws PortalException

  Returns a servant that is used to select IGroupMembers. The list of selected IGroupMembers is available via the getResults() method

  Parameters:
    `staticData` - the master channel's staticData
    `message` - a custom message to present the user to explain what they should select
    `type` - the distinguished group name representing the desired root group for selection, e.g. GroupService.EVERYONE or GroupService.ALL_CATEGORIES
    `allowFinish` - whether or not the user can "finish" selecting. if false, the servant method "isFinished()" will always return false; the master must have some other mechanism for allowing the user to change screens.
    `allowEntitySelect` - if false, only groups can be selected
    `members` - an IGroupMember[] of pre-selected members.
    `permissions` - an instance of IGroupsManagerPermissions
  Returns:
    IServant
  Throws:
    `PortalException`

### getPermissionsPolicy

    public static IGroupsManagerPermissions getPermissionsPolicy(ChannelStaticData staticData)
                                                          throws PortalException

  Returns a permissions policy based upon the users role.

  Parameters:
    `staticData` - the master channel's staticData
  Returns:
    IGroupsManagerPermissions
  Throws:
    `PortalException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD