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.model.workflow
Interface DMS

public interface DMS

This interface provides operations for managing documents in a Document Management System (DMS). The server uses the DMS to store and retrieve attachments that are relevant to performing work within a process instance.

The integration with the DMS is through a DMS Adapter, which manages the session objects for the DMS. Using such an adapter makes this interface DMS independent.

Here is an example that illustrates the importance of DMS independence. Say that you want version control for your attachments. If you are using a basic file system like the Windows File System for your DMS, you will not have version control because the Windows File System is not set up for version control. On the other hand if you have a full-featured DMS like CVS, you will get complete version control on all attachments that are associated with process instances in Interstage BPM.

In cases where there is minimal DMS functionality, the DMS Adapter does augment the implemented DMS with a check-in and check-out capability. This is to prevent users from overwriting each other's attachments if multiple people are viewing or editing attachments in an activity.

To maintain the integrity of attachments, this interface should be used for checking in or checking out attachments. This ensures that Interstage BPM knows the status of attachments and can manage user interaction with these attachments as necessary.

The standard way of constructing a new `DMS` object is to call the method `WFObjectFactory.getDMS`.

Exceptions. Three kinds of exceptions are commonly thrown within this class: `DMSException` and `ModelInternalException`, all of which are instances of `ModelException`. In the methods that directly throw a `ModelException`, this exception usually wraps one of the former two exceptions. `DMSException` indicates that DMA Adapter failed to operate normally. As its name suggests, `ModelInternalException` denotes other problems that are internal to the Model API.

See Also:
  `WFObjectFactory`

Field Summary
`static java.lang.String` | `_ftpSeparator` Deprecated. FTP and associated methods are not supported for DMS anymore.
`static java.lang.String` | `_pathSeparator` Deprecated. FTP and associated methods are not supported for DMS anymore.
`static int` | `MAX_PATH_LENGTH` Specifies the maximum length of path; currently 2048 characters.

Method Summary
`void` | `checkIn(DMSObject object)` Deprecated. Replaced by `DocRepository.checkIn(com.fujitsu.iflow.model.wfadapter.Document)`
`void` | `checkInNew(DMSObject object, boolean overwrite)` Deprecated. replaced by `DocRepository.checkInNew(java.lang.String, byte[], boolean)`
`DMSEntityValue` | `checkOut(java.lang.String path, boolean lock)` Deprecated. replaced by `DocRepository.checkOut(String, boolean)`
`DMSEntityValue` | `getFolderContents(java.lang.String path)` Returns the folder's contents.
`java.lang.String` | `getFTPpassword()` Deprecated. FTP and associated methods are not supported for Document Management System anymore.
`java.lang.String` | `getFTPuser()` Deprecated. FTP and associated methods are not supported for Document Management System anymore.
`java.lang.String` | `getPassword()` Deprecated. Not allowed to use because of security issues.
`java.lang.String` | `getReadURL()` Deprecated. FTP and associated methods are not supported for Document Management System anymore
`DMSEntityValue` | `getRootFolderContents(boolean lock)` Returns the root folder contents.
`java.lang.String[]` | `getRootFolderNames()` Returns the root folder names.
`java.lang.String` | `getUser()` Returns the user's name (user's ID).
`DMSEntityValue` | `getUserFolderContents(java.lang.String userId)` Returns the contents of the User Folder corresponding to the specified `userId`.
`java.lang.String` | `getWriteURL()` Deprecated. FTP and associated methods are not supported for Document Management System anymore

Field Detail

### MAX_PATH_LENGTH

    public static final int MAX_PATH_LENGTH

  Specifies the maximum length of path; currently 2048 characters.

  See Also:
    Constant Field Values

### _pathSeparator

    public static final java.lang.String _pathSeparator

  Deprecated. FTP and associated methods are not supported for DMS anymore.

  Path separation character for the Document Management System (DMS). This identifies the separation character used in the DMS between directories. This character is not based on the DMS or operating system that is integrated to, but is always a back slash ( \ ).

  See Also:
    Constant Field Values

### _ftpSeparator

    public static final java.lang.String _ftpSeparator

  Deprecated. FTP and associated methods are not supported for DMS anymore.

  Path separation character for the FTP system. This identifies the separation character used in the FTP system between directories. This character is not based on the Document Management System (DMS) or operating system that is integrated to, but is always a forward slash ( / ).

  See Also:
    Constant Field Values

Method Detail

### getUser

    public java.lang.String getUser()

  Returns the user's name (user's ID).

  The name of user is always set when the `DMS` object is created.

  Returns:
    The user's name.

### getFTPuser

    public java.lang.String getFTPuser()

  Deprecated. FTP and associated methods are not supported for Document Management System anymore.

### getPassword

    public java.lang.String getPassword()

  Deprecated. Not allowed to use because of security issues.

  Returns the password used to log into the current `WFSession` for the purpose of accessing the user's FTP subdirectory in the Document Management System (DMS). Interstage BPM uses the password and user ID to access a specific FTP subdirectory in the DMS corresponding to that specific user. When a user checks out a file, it is moved to a subdirectory of `ftproot` which is named after the user's log-in name. Within this subdirectory, it is stored in a lower level subdirectory labeled `ReadAttachment` or `WriteAttachment`, depending on whether the document was checked out for viewing only or for editing.

  Returns:
    The password that the user used to log into the current `WFSession`.

### getFTPpassword

    public java.lang.String getFTPpassword()

  Deprecated. FTP and associated methods are not supported for Document Management System anymore.

### getReadURL

    public java.lang.String getReadURL()

  Deprecated. FTP and associated methods are not supported for Document Management System anymore

  Returns the directory that contains documents checked out for reading. Returns the URL for the FTP (server-side) directory that contains documents to be checked out for read-only. This is a subdirectory of the user's FTP directory, and is labeled `ReadAttachment`.

  Returns:
    The URL address of the user's read-only FTP directory.

### getWriteURL

    public java.lang.String getWriteURL()

  Deprecated. FTP and associated methods are not supported for Document Management System anymore

  Returns the directory that contains documents checked out by the user. Returns the URL for the FTP (server-side) directory that contains documents to be checked out for editing. This is a subdirectory of the user's FTP directory, and is labeled `WriteAttachment`.

  Returns:
    The URL address of the user's FTP directory for editing.

### checkIn

    public void checkIn(DMSObject object)
                 throws ModelInternalException,
                        DMSException

  Deprecated. Replaced by `DocRepository.checkIn(com.fujitsu.iflow.model.wfadapter.Document)`

  Checks the specified document back into the Document Management System (DMS) if it had been checked out previously.

  Throws:
    `ModelInternalException`
    `DMSException`

### checkInNew

    public void checkInNew(DMSObject object,
                           boolean overwrite)
                    throws ModelInternalException,
                           DMSException

  Deprecated. replaced by `DocRepository.checkInNew(java.lang.String, byte[], boolean)`

  Checks the document in to the Document Management System (DMS) that is specified in the `object` parameter.

  Throws:
    `ModelInternalException`
    `DMSException`

### checkOut

    public DMSEntityValue checkOut(java.lang.String path,
                                   boolean lock)
                            throws ModelInternalException,
                                   DMSException

  Deprecated. replaced by `DocRepository.checkOut(String, boolean)`

  Returns the `DMSEntityValue` that references the document stored at the specified path in the Document Management System (DMS) with the specified lock status. A lock prevents another user from checking out the same object for modification purposes. Since the returned `DMSEntityValue` object references a single document, rather than the contents of a folder, method `getTypes` returns the document's ID, as assigned by the `DMSAdapter`.

  Throws:
    `ModelInternalException`
    `DMSException`

### getFolderContents

    public DMSEntityValue getFolderContents(java.lang.String path)
                                     throws DMSException,
                                            ModelInternalException

  Returns the folder's contents.

  `DMSEntityValue` is an enumeration of the entities (files and folders) within a particular folder in the form of an array of names and an array of types.

  The position of the name of a folder element in the String array is the same as the position of the folder element's type value in the integer array. The integers are `FILE(= 0)` and `DIR(= 1)`.

  Since the `DMSEntityValue` object references the contents of a folder, rather than a single document, `DMSEntityValue.getTypes` returns an array of integers that indicate whether each object is a file or a folder.

  Parameters:
    `path` - The folder's path.
  Returns:
    A `DMSEntityValue` object that contains two arrays and represents the folder contents. If the folder does not exist, the two arrays of the returned `DMSEntityValue` are empty.
  Throws:
    `DMSException` - When getting the folder contents from the server fails.
    `ModelInternalException` - When the folder path is an empty `String`.

### getRootFolderContents

    public DMSEntityValue getRootFolderContents(boolean lock)
                                         throws DMSException,
                                                ModelInternalException

  Returns the root folder contents. The root folder referenced by this method is the same as the native root folder on the host machine.

  Since the returned `DMSEntityValue` object references the contents of a folder, rather than a single document, `DMSEntityValue.getTypes` returns an array of integers that indicate whether each object is a file or a folder.

  The root folder contents always exist because the root folder is always set during installation.

  Parameters:
    `lock` - Indicates whether to place a lock on the directory.
  Returns:
    A `DMSEntityValue` object that contains two arrays.
  Throws:
    `DMSException` - When getting the root folder contents fails.
    `ModelInternalException`

### getRootFolderNames

    public java.lang.String[] getRootFolderNames()
                                          throws ModelInternalException

  Returns the root folder names. The root folder referenced by this method is the same as the native root folder on the host machine.

  A list of root folder names always exist because the root folder is always set during installation.

  Returns:
    A `String` array that contains the folder names defined in the Interstage BPM properties file as the Document Management System root.
  Throws:
    `ModelInternalException`

### getUserFolderContents

    public DMSEntityValue getUserFolderContents(java.lang.String userId)
                                         throws DMSException,
                                                ModelInternalException

  Returns the contents of the User Folder corresponding to the specified `userId`.

  Once users set their own User Folders, those folders can be used to add/browse for attachments.

  Since the returned `DMSEntityValue` object references the contents of a folder, rather than a single document, `DMSEntityValue.getTypes` returns an array of integers that indicate whether each object is a file or a folder.

  Parameters:
    `userId` - The user's ID (name) user for login.
  Returns:
    A `DMSEntityValue` object that contains two arrays and represents the User's Folder contents or `null` if there is none.
  Throws:
    `DMSException` - if getting the User Folder contents fails.
    `ModelInternalException.`
    `ModelInternalException`

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