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.adapter
Class NodeDocument

    java.lang.Object
      com.bea.p13n.content.adapter.NodeDocument

All Implemented Interfaces:
  ConfigurableEntity, Content, Document, Serializable

public class NodeDocument
extends Object
implements Document

A Document implementation backed by a content Node.

This is really only designed to be used by the pz_compat_taglib.jar versions of the pz: tags in conjunction with the 7.0 ContentManager adapter to 8.1 content management.

See Also:
  Serialized Form

Field Summary

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

Constructor Summary
`NodeDocument(Node node)` Constructor.

Method Summary
`String` | `getAuthor()` Get the author of the document.
`String` | `getComments()` Get the document comments.
`byte[]` | `getContent()` Return the bytes of the document's content.
`byte[]` | `getContentBlock(long start, long length)` Get a block of the bytes of the document's content.
`ContentValue` | `getContentByValue()` Deprecated. No longer needed - Use Content object instead.
`Timestamp` | `getCreationDate()` Get the date the document was created.
`String` | `getDescription()` Get the description.
`DocumentValue` | `getDocumentByValue()` Deprecated. No longer needed - use Document object instead.
`String` | `getIdentifier()` Get the identifier for the content object.
`String` | `getJndiName()` Retrieve the jndi name for an entity.
`String` | `getLockedBy()` Get the locker of the document.
`String` | `getMimeType()` Get the mime type of the content object.
`String` | `getModifiedBy()` Get last modifier of the document.
`Timestamp` | `getModifiedDate()` Get the date the document was last modified.
`String` | `getName()` Get the document name.
`String` | `getPkString()` Retrieve the pk string for an entity.
`Object` | `getProperty(String propertySet, String propertyName)` Retrieves a property value.
`String` | `getPropertyAsString(String propertySet, String propertyName)` Retrieves a property value as a string.
`Object` | `getPropertyNoDefault(String propertySet, String name)` Retrieves a property value without using a default value.
`long` | `getSize()` Get the size of the document.
`long` | `getUniqueId()` Retrieve the unique identifier generated for this ConfigurableEntity.
`long` | `getVersion()` Get the document version number.
`Object` | `removeProperty(String propertySet, String propertyName)` Remove the property associated with the named key in the specified property set.
`void` | `setAuthor(String author)` This method does nothing
`void` | `setComments(String s)` This method does nothing
`void` | `setContentByValue(ContentValue val)` Deprecated. Not implemented.
`void` | `setCreationDate(Timestamp date)` This method does nothing
`void` | `setDescription(String s)` This method does nothing
`void` | `setDocumentByValue(DocumentValue val)` Deprecated. Not implemented.
`void` | `setLockedBy(String s)` This method does nothing
`void` | `setMimeType(String mimeType)` Set the mime type of the document object.
`void` | `setModifiedBy(String s)` This method does nothing
`void` | `setModifiedDate(Timestamp d)` This method does nothing
`void` | `setName(String s)` This method does nothing
`void` | `setProperty(String propertySet, String propertyName, Object value)` Associate the specified value with the named key in the specified property set.
`void` | `setSize(long size)` This method does nothing
`void` | `setVersion(long ver)` This method does nothing
`static Timestamp` | `toTimestamp(Calendar c)`

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

Constructor Detail

### NodeDocument

    public NodeDocument(Node node)

  Constructor.

Method Detail

### getAuthor

    public String getAuthor()
                     throws RemoteException

  Get the author of the document.

  Specified by:
    `getAuthor` in interface `Document`
  Returns:
    the author, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getComments

    public String getComments()
                       throws RemoteException

  Get the document comments.

  Specified by:
    `getComments` in interface `Document`
  Returns:
    the comments, or null if none.
  Throws:
    `RemoteException` - thrown on an error.

### getContent

    public byte[] getContent()
                      throws RemoteException

  Description copied from interface: `Document`
  Return the bytes of the document's content.

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

  Specified by:
    `getContent` in interface `Document`
  Throws:
    `RemoteException` - thrown on an error.

### getContentBlock

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

  Description copied from interface: `Document`
  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.

  Specified by:
    `getContentBlock` in interface `Document`
  Parameters:
    `start` - the starting index in the byte array.
    `length` - the number of bytes to retrieve.
  Throws:
    `RemoteException` - thrown on an error.

### getContentByValue

    public ContentValue getContentByValue()
                                   throws RemoteException

  Deprecated. No longer needed - Use Content object instead.

  Return the content value object.

  Specified by:
    `getContentByValue` in interface `Content`
  Returns:
    ContentValue the Content value object.
  Throws:
    `RemoteException` - thrown on a communication error.

### getCreationDate

    public Timestamp getCreationDate()
                              throws RemoteException

  Get the date the document was created.

  Specified by:
    `getCreationDate` in interface `Document`
  Returns:
    the creation date, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getDescription

    public String getDescription()
                          throws RemoteException

  Get the description.

  Specified by:
    `getDescription` in interface `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 the document value for this.

  Specified by:
    `getDocumentByValue` in interface `Document`
  Returns:
    DocumentValue the Document value object
  Throws:
    `RemoteException` - thrown on an error.

### getIdentifier

    public String getIdentifier()
                         throws RemoteException

  Get the identifier for the content object.

  Specified by:
    `getIdentifier` in interface `Content`
  Throws:
    `RemoteException` - thrown on a communication error.

### getJndiName

    public String getJndiName()

  Retrieve the jndi name for an entity. A combination of pk string and jndi name is always unique between entities.

  Specified by:
    `getJndiName` in interface `ConfigurableEntity`
  Returns:
    the jndi name for this entity

### getLockedBy

    public String getLockedBy()
                       throws RemoteException

  Get the locker of the document.

  Specified by:
    `getLockedBy` in interface `Document`
  Returns:
    the locker's identifier, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getMimeType

    public String getMimeType()
                       throws RemoteException

  Get the mime type of the content object.

  Specified by:
    `getMimeType` in interface `Content`
  Returns:
    mimeType.
  Throws:
    `RemoteException` - thrown on a communication error.

### getModifiedBy

    public String getModifiedBy()
                         throws RemoteException

  Get last modifier of the document.

  Specified by:
    `getModifiedBy` in interface `Document`
  Returns:
    the identifier of the modifier, null if none.
  Throws:
    `RemoteException` - thrown on an error.

### getModifiedDate

    public Timestamp getModifiedDate()
                              throws RemoteException

  Get the date the document was last modified.

  Specified by:
    `getModifiedDate` in interface `Document`
  Returns:
    the modified date, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getName

    public String getName()
                   throws RemoteException

  Get the document name.

  Specified by:
    `getName` in interface `Document`
  Returns:
    the name, or null if unknown.
  Throws:
    `RemoteException` - thrown on an error.

### getPkString

    public String getPkString()
                       throws RemoteException

  Retrieve the pk string for an entity. A combination of pk string and jndi name is always unique between entities.

  Specified by:
    `getPkString` in interface `ConfigurableEntity`
  Returns:
    the primary key string identifier for this entity
  Throws:
    `RemoteException`

### getProperty

    public Object getProperty(String propertySet,
                              String propertyName)
                       throws RemoteException

  Retrieves a property value.

  This is the driving get method. All other getters should call this one.

  Specified by:
    `getProperty` in interface `ConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set to look in
    `propertyName` - The name of the property to retrieve.
  Returns:
    the property value, or null if not set
  Throws:
    `RemoteException`

### getPropertyAsString

    public String getPropertyAsString(String propertySet,
                                      String propertyName)
                               throws RemoteException

  Retrieves a property value as a string.

  Specified by:
    `getPropertyAsString` in interface `ConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set to look in
    `propertyName` - The name of the property to retrieve.
  Returns:
    the property value as a string, or null if not set
  Throws:
    `RemoteException`

### getPropertyNoDefault

    public Object getPropertyNoDefault(String propertySet,
                                       String name)
                                throws RemoteException

  Retrieves a property value without using a default value.

  This is the driving get method. All other getters should call this one.

  Specified by:
    `getPropertyNoDefault` in interface `ConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set
    `name` - The name of the property to retrieve.
  Returns:
    the property value, or null if not set
  Throws:
    `RemoteException`

### getSize

    public long getSize()
                 throws RemoteException

  Get the size of the document.

  Specified by:
    `getSize` in interface `Document`
  Returns:
    the size, 0 or less if no bytes associated with the document.
  Throws:
    `RemoteException` - thrown on an error.

### getUniqueId

    public long getUniqueId()

  Retrieve the unique identifier generated for this ConfigurableEntity. The unique identifier is used by the EntityPropertyManager to optimize the foreign keys in the persistent storage. This method may not be implemented in a lightweight implementation of ConfigurableEntity.

  Specified by:
    `getUniqueId` in interface `ConfigurableEntity`
  Returns:
    this entity's unique id

### getVersion

    public long getVersion()
                    throws RemoteException

  Get the document version number.

  Specified by:
    `getVersion` in interface `Document`
  Throws:
    `RemoteException` - thrown on an error.

### removeProperty

    public Object removeProperty(String propertySet,
                                 String propertyName)

  Remove the property associated with the named key in the specified property set.

  This method does nothing.

  Specified by:
    `removeProperty` in interface `ConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set.
    `propertyName` - The name of the property to remove.
  Returns:
    the old value of the property, or null if there was none.

### setAuthor

    public void setAuthor(String author)

  This method does nothing

  Specified by:
    `setAuthor` in interface `Document`

### setComments

    public void setComments(String s)

  This method does nothing

  Specified by:
    `setComments` in interface `Document`

### setContentByValue

    public void setContentByValue(ContentValue val)

  Deprecated. Not implemented.

  This method does nothing.

  Specified by:
    `setContentByValue` in interface `Content`

### setCreationDate

    public void setCreationDate(Timestamp date)

  This method does nothing

  Specified by:
    `setCreationDate` in interface `Document`

### setDescription

    public void setDescription(String s)

  This method does nothing

  Specified by:
    `setDescription` in interface `Document`
  Parameters:
    `s` - description to be added

### setDocumentByValue

    public void setDocumentByValue(DocumentValue val)

  Deprecated. Not implemented.

  This method does nothing

  Specified by:
    `setDocumentByValue` in interface `Document`

### setLockedBy

    public void setLockedBy(String s)

  This method does nothing

  Specified by:
    `setLockedBy` in interface `Document`

### setMimeType

    public void setMimeType(String mimeType)

  Set the mime type of the document object.

  Specified by:
    `setMimeType` in interface `Content`
  Parameters:
    `mimeType` - mimeType to be added

### setModifiedBy

    public void setModifiedBy(String s)

  This method does nothing

  Specified by:
    `setModifiedBy` in interface `Document`

### setModifiedDate

    public void setModifiedDate(Timestamp d)

  This method does nothing

  Specified by:
    `setModifiedDate` in interface `Document`

### setName

    public void setName(String s)

  This method does nothing

  Specified by:
    `setName` in interface `Document`

### setProperty

    public void setProperty(String propertySet,
                            String propertyName,
                            Object value)

  Associate the specified value with the named key in the specified property set.

  This method does nothing.

  Specified by:
    `setProperty` in interface `ConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set.
    `propertyName` - The name of the property to assign
    `value` - The value to associate with the property name

### setSize

    public void setSize(long size)

  This method does nothing

  Specified by:
    `setSize` in interface `Document`

### setVersion

    public void setVersion(long ver)

  This method does nothing

  Specified by:
    `setVersion` in interface `Document`

### toTimestamp

    public static Timestamp toTimestamp(Calendar c)

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