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

## com.fujitsu.iflow.diradapter.intf
Interface DirSession

All Superinterfaces:
  java.rmi.Remote

public interface DirSession
extends java.rmi.Remote

The DirSession Interface provides access to Directory Service information used by Interstage BPM.

One set of functions in this interface helps to query the information on user groups stored in the Directory Service. Groups are named sets of users. They are referred to as Roles in Interstage BPM. Groups are used for many purposes in Interstage BPM. Assigning a role to an activity is just one of these purposes. One part of this interface supports only browsing of the groups. It is assumed that these groups will be created using the mechanisms supported by the directory services.

The other part of this interface deals with storing and retrieving user specific information. The stored information is used to tailor the Server’s behavior with respect to a user’s needs, for example, the kind of notification.

Property lists are sets of name-value pairs with both names and values being strings. These are accessed both by the clients and the Server. These property lists can be stored entirely in the Directory Service, stored entirely in the Interstage BPM database, or split between the two. The Database Adapter that is used by the Interstage BPM Server provides the `createUserProfile()` and `getUserProfile()` functions on its RMI interface which can be used to store and retrieve property lists. Refer to the code of sample adapters that are supplied with the software package to learn more about the usage of these functions. Currently, the Server uses this property list to learn about the kind of notification the user requested. The property names and the possible values for notification purposes are discussed elsewhere.

Method Summary
`void` | `createUserProfile(java.lang.String key, AttributeData[] attrList)` Creates the user attributes for the specified user by the specified Name-Value pairs.
`void` | `deleteUserProfile(java.lang.String key)` Deletes the user attributes for the specified user.
`java.util.Hashtable` | `getAllowedUsersList()` Returns the populated users list.
`java.lang.String[]` | `getGroups()` Returns all defined groups in the directory service.
`java.lang.String[]` | `getUserDirectories(java.lang.String user)` Returns the attachment directories for the specified user.
`java.lang.String[]` | `getUserList(java.lang.String groupName)` Returns the list of users for the specified group.
`java.lang.String[]` | `getUserList(java.lang.String groupName, long procInstId)` Returns the list of users for the specified group and process.
`AttributeData[]` | `getUserProfile(java.lang.String key)` Returns the user profile stored in the Interstage BPM database or in the Directory Server for the specified user.
`void` | `resetGroupsList()` Clears the previous list of groups and populates the new group list from the directory service.
`void` | `resetUsersList()` Clears the previous list of users and populates the new user list from the directory service.
`void` | `updateUserProfile(java.lang.String key, AttributeData[] attrList)` Updates the user attributes with the provided new values for the specified user.

Method Detail

### getUserList

    public java.lang.String[] getUserList(java.lang.String groupName,
                                          long procInstId)
                                   throws java.rmi.RemoteException,
                                          DirOperationFailed

  Returns the list of users for the specified group and process. These groups are used as roles that can be assigned to activities in Interstage BPM.

  This method is called when a group name needs to be resolved within the context of a process instance. E.g.: role resolution before workitem creation, or role resolution before sending email notification

  Parameters:
    `groupName` - - name of the group that must be resolved into its constituent members.
    `procInstId` - - ID of the process for which a group must be resolved into its constituent members.
  Returns:
    the members of the group as an array of strings.
  Throws:
    `java.rmi.RemoteException`
    `DirOperationFailed`
  See Also:
    `getUserList(String groupName)`

### getUserList

    public java.lang.String[] getUserList(java.lang.String groupName)
                                   throws java.rmi.RemoteException,
                                          DirOperationFailed

  Returns the list of users for the specified group. These groups are used as roles that can be assigned to activities in Interstage BPM.

  This method is called when a group name needs to be resolved independently of any process instance. E.g.: during admin login to check of user is part of admin role, or to check if user has permission to edit a process definition, or to check if user is part of template publisher role during process definition creation in security mode

  Parameters:
    `groupName` - The name of the group that must be resolved into its constituent members.
  Returns:
    The members of the specified group as an array of strings.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`
  See Also:
    `getUserList(String groupName, long procInstId)`

### getGroups

    public java.lang.String[] getGroups()
                                 throws java.rmi.RemoteException,
                                        DirOperationFailed

  Returns all defined groups in the directory service.

  Returns:
    An array of strings containing all defined groups in the directory service.
  Throws:
    `DirOperationFiled`
    `java.rmi.RemoteException`
    `DirOperationFailed`

### getUserProfile

    public AttributeData[] getUserProfile(java.lang.String key)
                                   throws java.rmi.RemoteException,
                                          DirOperationFailed

  Returns the user profile stored in the Interstage BPM database or in the Directory Server for the specified user.

  Parameters:
    `key` - The userId or the sms/email address of the user for which the attributes to be returned.
  Returns:
    The Interstage BPM user attributes associated with the user.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### createUserProfile

    public void createUserProfile(java.lang.String key,
                                  AttributeData[] attrList)
                           throws java.rmi.RemoteException,
                                  DirOperationFailed

  Creates the user attributes for the specified user by the specified Name-Value pairs. Any existing attributes of the specified user will be overwritten.

  Parameters:
    `key` - The userId or the sms/email address of the user for which these attributes to be ceated in the database or in the Directory server.
    `attrList` - A list of attributes and their values that should be stored.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### updateUserProfile

    public void updateUserProfile(java.lang.String key,
                                  AttributeData[] attrList)
                           throws java.rmi.RemoteException,
                                  DirOperationFailed

  Updates the user attributes with the provided new values for the specified user. Any existing attributes of the specified user will be overwritten.

  Parameters:
    `key` - The userId or the sms/email address of the user to which the attribute values to be updated based on the specified set of new attribute values.
    `attrList` - A list of attributes and their values that should be updated for the specified user.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### deleteUserProfile

    public void deleteUserProfile(java.lang.String key)
                           throws java.rmi.RemoteException,
                                  DirOperationFailed

  Deletes the user attributes for the specified user.

  Parameters:
    `key` - The userId or the sms/email address of the user for which the user attributes are to be deleted.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### getUserDirectories

    public java.lang.String[] getUserDirectories(java.lang.String user)
                                          throws java.rmi.RemoteException,
                                                 DirOperationFailed

  Returns the attachment directories for the specified user.

  Parameters:
    `user` - The userId or the sms/email address of the user, whose attachment directories to be returned.
  Returns:
    The attachment directories stored in an array of strings.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### getAllowedUsersList

    public java.util.Hashtable getAllowedUsersList()
                                            throws java.rmi.RemoteException,
                                                   DirOperationFailed

  Returns the populated users list. If the method does not support the used directory adapter `null` will be returned. Note: At the time only the jndi adapter as well as the ldap adapter for the EE-version is supported.

  Returns:
    A hashtable containing the populated users list.
  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### resetUsersList

    public void resetUsersList()
                        throws java.rmi.RemoteException,
                               DirOperationFailed

  Clears the previous list of users and populates the new user list from the directory service.

  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

### resetGroupsList

    public void resetGroupsList()
                         throws java.rmi.RemoteException,
                                DirOperationFailed

  Clears the previous list of groups and populates the new group list from the directory service.

  Throws:
    `DirOperationFailed`
    `java.rmi.RemoteException`

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