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.wfadapter
Interface Document

All Superinterfaces:
  DMSObject, java.io.Serializable

public interface Document
extends DMSObject

Provides methods to handle files. It is a specialisation of the `DMSObject` interface.

The `Document` interface is used to handle `DMS` objects representing a file in the Document Management System (DMS). It inherits from `DMSObject`.

As more specific interface, the `Document` interface provides better compile-time checking to ensure that only appropriate methods and constants are used. It is therefore useful to typecast a `DMSObject` object to a `Document` (or `Folder`) object as early as appropriate.

Exceptions. Commonly the `ModelInternalException` is thrown within this class. This exception is a subclass of `ModelException`. In the methods that directly throw a `ModelException`, this exception usually wraps the former one. As its name suggests, `ModelInternalException` denotes other problems that are internal to the Model API. For future compatibility, only `ModelException` should be caught explicitly.

See Also:
  `DMSEntityValue`, `DMSObject`, `Folder`

Field Summary

Fields inherited from interface com.fujitsu.iflow.model.wfadapter.DMSObject
`TYPE_DOCUMENT, TYPE_FOLDER`

Method Summary
`void` | `getContents(java.io.OutputStream os)` Retrieve the contents of the document as `OutputStream`.
`java.lang.String` | `getFTPName()` Deprecated. FTP and associated methods are not supported anymore
`int` | `getId()` Deprecated. The document has no ID
`java.lang.String` | `getMimeType()` Returns the file extension of the document (NOT the actual mime like 'text/plain').
`java.net.URL` | `getUrl()` Deprecated. This method was used in the context of FTP which is no longer supported.
`void` | `setContents(java.io.InputStream is)` Sets the contents of the document from `InputStream`.

Methods inherited from interface com.fujitsu.iflow.model.wfadapter.DMSObject
`getName, getPath, getType`

Method Detail

### getId

    public int getId()

  Deprecated. The document has no ID

  Returns this document's ID.

  Returns:
    ID of this document.

### getFTPName

    public java.lang.String getFTPName()

  Deprecated. FTP and associated methods are not supported anymore

  Returns the file name of the document.

  Returns:
    file name of this document.

### getMimeType

    public java.lang.String getMimeType()

  Returns the file extension of the document (NOT the actual mime like 'text/plain').

  Returns:
    The file extension of the current document.

### setContents

    public void setContents(java.io.InputStream is)
                     throws ModelInternalException

  Sets the contents of the document from `InputStream`.

  Parameters:
    `is` - Input stream that is set as contents.
  Throws:
    `ModelInternalException`

### getContents

    public void getContents(java.io.OutputStream os)
                     throws ModelInternalException

  Retrieve the contents of the document as `OutputStream`.

  Parameters:
    `os` - Output stream that retrieves the contents.
  Throws:
    `ModelInternalException`

### getUrl

    public java.net.URL getUrl()

  Deprecated. This method was used in the context of FTP which is no longer supported.

  Returns The URL of the document.

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