Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.document
Interface Document

All Superinterfaces:
  ConfigurableEntity, Content, Serializable

All Known Implementing Classes:
  NodeDocument

public interface Document
extends Content

The public interface for a Document.

This is the base interface for Document objects.

Documents are a specialized type of Content which are generally controlled by a Document Management System (DMS). The Document interface contains explicit attributes common to most types of documents and DMS's. Additionally, the Document interface has a method to retrieve the raw bytes of the actualy document itself (e.g. the images data of a GIF, the text of an HTML document). Documents inherit the identifier and mimeType attribute from the Content interface. Also, all other implicit attributes (i.e. metadata) about the document will be available.

The reference implementation document management system included in the PersonalizationServer does not support creation or modification of Documents via the EJB interfaces. However, other implementations might.

Attribute: `description`

- Containment: By Value
- Multiplicity: 1:1
- This is the text description of the doucment from the DMS.

Attribute: `size`

- Containment: By Value
- Multiplicity: 1:1
- This is the size of the document's files in bytes. If this is 0 or less, than the document doesn't have bytes and is represented entirely within the metadata.

Attribute: `modifiedBy`

- Containment: By Value
- Multiplicity: 1:1
- This is the identifier of who last modified the document.

Attribute: `modifiedDate`

- Containment: By Value
- Multiplicity: 1:1
- This is the time/date of when the document was last modified.

Attribute: `creationDate`

- Containment: By Value
- Multiplicity: 1:1
- The date upon which the document was created.

Attribute: `version`

- Containment: By Value
- Multiplicity: 1:1
- The version number of the document.

Attribute: `author`

- Containment: By Value
- Multiplicity: 1:1
- The identifier the author of the Document.

Attribute: `lockedBy`

- Containment: By Value
- Multiplicity: 1:1
- The identifier of who has the document locked in the DMS.

Attribute: `comments`

- Containment: By Value
- Multiplicity: 1:1
- Any comments associated with the document.

Attribute: `name`

- Containment: By Value
- Multiplicity: 1:1
- The name of the document, which generally corresponds to the original file name.

When constructing queries for Documents, the above property/attribute names will compare against the explicit attributes on the Document interface. For example, to find document whose size is less than 1024 bytes, you could use a query string like "size < 1024".

See Also:
  `DocumentManager`, `ExpressionHelper`

Field Summary

Fields inherited from interface com.bea.p13n.property.ConfigurableEntity
`RESERVED_PROPERTY_SET`

Method Summary
`String` | `getAuthor()` Deprecated. Get the identifier of the invididual who created the document.
`String` | `getComments()` Deprecated. Get any text comments about the document.
`byte[]` | `getContent()` Deprecated. Return the bytes of the document's content.
`byte[]` | `getContentBlock(long start, long size)` Deprecated. Get a block of the bytes of the document's content.
`Timestamp` | `getCreationDate()` Deprecated. Get the time/date of when the document was created.
`String` | `getDescription()` Deprecated. Get the text description of the document.
`DocumentValue` | `getDocumentByValue()` Deprecated. No longer needed - use Document object instead.
`String` | `getLockedBy()` Deprecated. Get the identifier of the individual who has a lock on the document.
`String` | `getModifiedBy()` Deprecated. Get the identifier of the individual who last modified the document.
`Timestamp` | `getModifiedDate()` Deprecated. Get time and date of when the document was last modified.
`String` | `getName()` Deprecated. Get the name of the document.
`long` | `getSize()` Deprecated. Get the size of the document in bytes.
`long` | `getVersion()` Deprecated. Get the version number of the document.
`void` | `setAuthor(String author)` Deprecated. Set the author of the document.
`void` | `setComments(String comments)` Deprecated. Set the comments about the document.
`void` | `setCreationDate(Timestamp creationDate)` Deprecated. Set the time/date of when the document was created.
`void` | `setDescription(String description)` Deprecated. Set the document description.
`void` | `setDocumentByValue(DocumentValue value)` Deprecated. Not implemented.
`void` | `setLockedBy(String lockedBy)` Deprecated. Set the who has a lock on the document.
`void` | `setModifiedBy(String modifiedBy)` Deprecated. Set the identifier of the individual who last modified the document.
`void` | `setModifiedDate(Timestamp modifiedDate)` Deprecated. Set the time/date of when the document was last modified.
`void` | `setName(String name)` Deprecated. Set the name of the document.
`void` | `setSize(long size)` Deprecated. Set the size of the document.
`void` | `setVersion(long version)` Deprecated. Set the version number.

Methods inherited from interface com.bea.p13n.content.Content
`getContentByValue, getIdentifier, getMimeType, setContentByValue, setMimeType`

Methods inherited from interface com.bea.p13n.property.ConfigurableEntity
`getJndiName, getPkString, getProperty, getPropertyAsString, getPropertyNoDefault, getUniqueId, removeProperty, setProperty`

Method Detail

### getAuthor

    public String getAuthor()
                     throws RemoteException

  Deprecated.
  Get the identifier of the invididual who created the document.

  Returns:
    the author, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getComments

    public String getComments()
                       throws RemoteException

  Deprecated.
  Get any text comments about the document.

  Returns:
    the comments, or null if none.
  Throws:
    `RemoteException` - thrown on an error.

### getContent

    public byte[] getContent()
                      throws RemoteException

  Deprecated.
  Return the bytes of the document's content.

  This currently doesn't support files larger than 2^31 bytes.

  Throws:
    `RemoteException` - thrown on an error.

### getContentBlock

    public byte[] getContentBlock(long start,
                                  long size)
                           throws RemoteException

  Deprecated.
  Get a block of the bytes of the document's content.

  This currently just calls getContent() and returns a subarray. However, this will support retrieving large files when large files are supported.

  Parameters:
    `start` - the starting index in the byte array.
    `size` - the number of bytes to retrieve.
  Throws:
    `RemoteException` - thrown on an error.

### getCreationDate

    public Timestamp getCreationDate()
                              throws RemoteException

  Deprecated.
  Get the time/date of when the document was created.

  Returns:
    the creation date, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getDescription

    public String getDescription()
                          throws RemoteException

  Deprecated.
  Get the text description of the document.

  Returns:
    the description or null if none.
  Throws:
    `RemoteException` - thrown on an error.

### getDocumentByValue

    public DocumentValue getDocumentByValue()
                                     throws RemoteException

  Deprecated. No longer needed - use Document object instead.

  Get all of Document's attributes.

  Returns:
    DocumentValue the Document value object
  Throws:
    `RemoteException` - thrown on an error.

### getLockedBy

    public String getLockedBy()
                       throws RemoteException

  Deprecated.
  Get the identifier of the individual who has a lock on the document.

  Returns:
    the locker's identifier, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getModifiedBy

    public String getModifiedBy()
                         throws RemoteException

  Deprecated.
  Get the identifier of the individual who last modified the document.

  Returns:
    the identifier of the modifier, null if none.
  Throws:
    `RemoteException` - thrown on an error.

### getModifiedDate

    public Timestamp getModifiedDate()
                              throws RemoteException

  Deprecated.
  Get time and date of when the document was last modified.

  Returns:
    the modified date, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getName

    public String getName()
                   throws RemoteException

  Deprecated.
  Get the name of the document.

  In general, this should correspond to the original filename of the document, but is not guarenteed to. Additionally, the document's mimeType is not guarenteed to correspond to any extension on the filename.

  This value should be used when prompting a user to save the file.

  Returns:
    the name, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getSize

    public long getSize()
                 throws RemoteException

  Deprecated.
  Get the size of the document in bytes.

  For now, since the document content itself is represented a byte array, the size returned should not be larger than Integer.MAX_VALUE. However, in the future, larger documents will be supported.

  Returns:
    the size, 0 or less if no bytes associated with the document.
  Throws:
    `RemoteException` - thrown on an error.

### getVersion

    public long getVersion()
                    throws RemoteException

  Deprecated.
  Get the version number of the document.

  Throws:
    `RemoteException` - thrown on an error.

### setAuthor

    public void setAuthor(String author)
                   throws RemoteException

  Deprecated.
  Set the author of the document.

  Throws:
    `RemoteException` - thrown on an error.

### setComments

    public void setComments(String comments)
                     throws RemoteException

  Deprecated.
  Set the comments about the document.

  Throws:
    `RemoteException` - thrown on an error.

### setCreationDate

    public void setCreationDate(Timestamp creationDate)
                         throws RemoteException

  Deprecated.
  Set the time/date of when the document was created.

  Throws:
    `RemoteException` - thrown on an error.

### setDescription

    public void setDescription(String description)
                        throws RemoteException

  Deprecated.
  Set the document description.

  Parameters:
    `description` - description to be added
  Throws:
    `RemoteException` - thrown on an error.

### setDocumentByValue

    public void setDocumentByValue(DocumentValue value)
                            throws RemoteException

  Deprecated. Not implemented.

  Set all of Document's attributes to the passed in value. Note: Primary key attributes are not set.

  Throws:
    `RemoteException` - thrown on an error.

### setLockedBy

    public void setLockedBy(String lockedBy)
                     throws RemoteException

  Deprecated.
  Set the who has a lock on the document.

  Throws:
    `RemoteException` - thrown on an error.

### setModifiedBy

    public void setModifiedBy(String modifiedBy)
                       throws RemoteException

  Deprecated.
  Set the identifier of the individual who last modified the document.

  Throws:
    `RemoteException` - thrown on an error.

### setModifiedDate

    public void setModifiedDate(Timestamp modifiedDate)
                         throws RemoteException

  Deprecated.
  Set the time/date of when the document was last modified.

  Throws:
    `RemoteException` - thrown on an error.

### setName

    public void setName(String name)
                 throws RemoteException

  Deprecated.
  Set the name of the document.

  Throws:
    `RemoteException` - thrown on an error.

### setSize

    public void setSize(long size)
                 throws RemoteException

  Deprecated.
  Set the size of the document.

  Throws:
    `RemoteException` - thrown on an error.

### setVersion

    public void setVersion(long version)
                    throws RemoteException

  Deprecated.
  Set the version number.

  Throws:
    `RemoteException` - thrown on an error.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved