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

## oracle.ifs.beans
Class DocumentDefinition

    java.lang.Object

      |

      +--oracle.ifs.beans.LibraryObjectDefinition

            |

            +--oracle.ifs.beans.PublicObjectDefinition

                  |

                  +--oracle.ifs.beans.DocumentDefinition

public class DocumentDefinition
extends PublicObjectDefinition

The DocumentDefinition class is used construct a Document object. This subclass of PublicObjectDefinition sets the default ClassObject to "DOCUMENT"

Document maintains Content via a reference to a ContentObject. Thus, to create Content a ContentObjectDefinition is used. This Definition has convenience methods to manipulate a ContentObjectDefinition for you; or you may access the ContentObjectDefinition directly. Note that the only way to modify the attributes of a ContentObject (for non-admin users) is to pass a ContentObjectDefinition to a DocumentDefinition and call update on a Document to which you have access. For that reason, all ContentObjectDefinition methods have been implemented as wrappers in the DocumentDefinition class, thus eliminating the need to deal with ContentObjectDefinition directly.

See Also:
  `ContentObjectDefinition`

Constructor Summary
`DocumentDefinition(LibrarySession session)` Constructs a DocumentDefinition explicitly capturing the session.

Method Summary
`java.lang.String` | `getCharacterSet(LibrarySession sess)` Gets the characterset for this DocumentDefinition.
`java.lang.String` | `getContent()` Gets the previously set String of content as set in this definition, or null if no String was specified.
`ContentObjectDefinition` | `getContentObjectDefinition()` Gets the currently allocated ContentObjectDefinition, whether set explicitly by setContentObjectDefinition, or allocated by one of the content convenience methods.
`java.lang.String` | `getContentPath()` Gets the path of the local file content, or null if no local file was specified.
`java.io.Reader` | `getContentReader()` Gets the Reader from which this document will be loaded.
`java.io.InputStream` | `getContentStream()` Gets the InputStream from which this document will be loaded.
`Format` | `getFormat(LibrarySession sess)` Gets the format for this DocumentDefinition.
`java.lang.String` | `getLanguage(LibrarySession sess)` Gets the language for this DocumentDefinition.
`LibraryObject` | `getReferringLibraryObject()` Gets the referring LibraryObject through which access is granted to the shared ContentObject or null if no existing ContentObject was specified.
`ContentObject` | `getSharedContentObject()` Gets the existing ContentObject with which this Document will share content.
`void` | `setCharacterSet(java.lang.String charset)` Sets the characterset of the content.
`void` | `setContent(java.lang.String content)` Sets the content of the document that will be loaded/created.
`void` | `setContentObjectDefinition(ContentObjectDefinition cod)` Sets the ContentObjectDefinition of the document that will be used to create/update the content object associated with this document.
`void` | `setContentPath(java.lang.String contentPath)` Sets the path of the local file from which this document will be loaded/created.
`void` | `setContentReader(java.io.Reader contentReader)` Sets the content Reader from which the document will be loaded/created.
`void` | `setContentStream(java.io.InputStream contentStream)` Sets the content InputStream from which the document will be loaded/created.
`void` | `setEmptyContent()` Creates content of zero length.
`void` | `setFormat(Format format)` Sets the format describing the type of content.
`void` | `setLanguage(java.lang.String language)` Sets the language of the content.
`void` | `setNullContent()` Calling this method specifies that the target document should not have content.
`void` | `setSharedContentObject(ContentObject contentObject, LibraryObject refObj)` Shares the content of an existing object.

Methods inherited from class oracle.ifs.beans.PublicObjectDefinition
`addCategoryDefinition, getAddToFolderOption, getCategoryDefinitions, getExplicitCreateDate, getExplicitLastModifyDate, getFreeIfLastFolderReferenceOption, getKeepLastModifyDateOption, getLockForSessionOption, getSecuringPublicObject, getUnlockForSessionOption, setAddToFolderOption, setExplicitCreateDate, setExplicitLastModifyDate, setFreeIfLastFolderReferenceOption, setKeepLastModifyDateOption, setLockForSessionOption, setSecuringPublicObject, setUnlockForSessionOption`

Methods inherited from class oracle.ifs.beans.LibraryObjectDefinition
`clone, getAttribute, getAttributes, getClassObject, getOption, getOptionKeys, removeAttribute, removeOption, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributes, setClassObject, setOption`

Constructor Detail

### DocumentDefinition

    public DocumentDefinition(LibrarySession session)
                       throws IfsException

  Constructs a DocumentDefinition explicitly capturing the session.
  Parameters:
    `session` - current LibrarySession
  Throws:
    `IfsException` - if the operation fails

Method Detail

### setFormat

    public void setFormat(Format format)
                   throws IfsException

  Sets the format describing the type of content. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `format` - the desired Format object.
  Throws:
    `IfsException` - if operation fails.

### setCharacterSet

    public void setCharacterSet(java.lang.String charset)
                         throws IfsException

  Sets the characterset of the content. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `charset` - the java name of the desired character set
  Throws:
    `IfsException` - if operation fails.

### setLanguage

    public void setLanguage(java.lang.String language)
                     throws IfsException

  Sets the language of the content. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `language` - the Oracle name of the desired language
  Throws:
    `IfsException` - if operation fails.

### setContentPath

    public void setContentPath(java.lang.String contentPath)
                        throws IfsException

  Sets the path of the local file from which this document will be loaded/created. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls setContentPath on it.
  Parameters:
    `contentPath` - the file from which content will be loaded/created.
  Throws:
    `IfsException` - if operation fails.

### setContentStream

    public void setContentStream(java.io.InputStream contentStream)
                          throws IfsException

  Sets the content InputStream from which the document will be loaded/created. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `contentStream` - an InputStream from which content will be loaded/created.
  Throws:
    `IfsException` - if operation fails.

### setContentReader

    public void setContentReader(java.io.Reader contentReader)
                          throws IfsException

  Sets the content Reader from which the document will be loaded/created. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `contentReader` - a Reader from which content will be loaded/created.
  Throws:
    `IfsException` - if operation fails.

### setContent

    public void setContent(java.lang.String content)
                    throws IfsException

  Sets the content of the document that will be loaded/created. This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Parameters:
    `content` - A String which contains the content which will be loaded into the new document.
  Throws:
    `IfsException` - if operation fails.

### setEmptyContent

    public void setEmptyContent()
                         throws IfsException

  Creates content of zero length. This is different than not having content a.k.a., setNullContent(). This is a convenience method that allocates a ContentObjectDefinition (if one is not already allocated) and calls the liked named method on it.
  Throws:
    `IfsException` - if operation fails.

### setSharedContentObject

    public void setSharedContentObject(ContentObject contentObject,
                                       LibraryObject refObj)
                                throws IfsException

  Shares the content of an existing object. On the server, the content is truly shared, not copied. Note that calling this method will clear any other content settings already made (via a ContentObjectDefinition or one of the convenience wrappers).
  Parameters:
    `ContentObject` - An existing contentObject to which this new document will refer.
    `refObj` - An existing object through which you are allowed access to the existing ContentObject
  Throws:
    `IfsException` - if operation fails.

### setContentObjectDefinition

    public void setContentObjectDefinition(ContentObjectDefinition cod)
                                    throws IfsException

  Sets the ContentObjectDefinition of the document that will be used to create/update the content object associated with this document. Most content convenience methods on DocumentDefinition will allocate a ContentObjectDefinition. Calling this method will replace any previously allocated definition.
  Parameters:
    `cod` - a ContentObjectDefinition which contains the content to be loaded into the new document.
  Throws:
    `IfsException` - if operation fails.

### getContentObjectDefinition

    public ContentObjectDefinition getContentObjectDefinition()
                                                       throws IfsException

  Gets the currently allocated ContentObjectDefinition, whether set explicitly by setContentObjectDefinition, or allocated by one of the content convenience methods.
  Returns:
    the ContentObjectDefinition object
  Throws:
    `IfsException` - if the operation fails

### setNullContent

    public void setNullContent()
                        throws IfsException

  Calling this method specifies that the target document should not have content. This method is most useful for removing content on an existing document. NOTE that this means that existing content will be deleted (irrevocably) from an existing document.
  Throws:
    `IfsException` - if operation fails.

### getFormat

    public Format getFormat(LibrarySession sess)
                     throws IfsException

  Gets the format for this DocumentDefinition. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the Format object
  Throws:
    `IfsException` - if the operation fails

### getCharacterSet

    public java.lang.String getCharacterSet(LibrarySession sess)
                                     throws IfsException

  Gets the characterset for this DocumentDefinition. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the character set object
  Throws:
    `IfsException` - if the operation fails

### getLanguage

    public java.lang.String getLanguage(LibrarySession sess)
                                 throws IfsException

  Gets the language for this DocumentDefinition. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the language set object
  Throws:
    `IfsException` - if the operation fails

### getContentPath

    public java.lang.String getContentPath()
                                    throws IfsException

  Gets the path of the local file content, or null if no local file was specified. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the local content path
  Throws:
    `IfsException` - if the operation fails

### getContent

    public java.lang.String getContent()
                                throws IfsException

  Gets the previously set String of content as set in this definition, or null if no String was specified. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the content
  Throws:
    `IfsException` - if the operation fails

### getContentStream

    public java.io.InputStream getContentStream()
                                         throws IfsException

  Gets the InputStream from which this document will be loaded. or null if no InputStream was specified. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the specified content stream
  Throws:
    `IfsException` - if the operation fails

### getContentReader

    public java.io.Reader getContentReader()
                                    throws IfsException

  Gets the Reader from which this document will be loaded. or null if no Reader was specified. This is a convenience method that calls the liked named method on the contained ContentObjectDefinition.
  Returns:
    the specified content reader
  Throws:
    `IfsException` - if the operation fails

### getSharedContentObject

    public ContentObject getSharedContentObject()
                                         throws IfsException

  Gets the existing ContentObject with which this Document will share content. or null if no existing ContentObject was specified.
  Returns:
    the ContentObject to be shared
  Throws:
    `IfsException` - if the operation fails

### getReferringLibraryObject

    public LibraryObject getReferringLibraryObject()
                                            throws IfsException

  Gets the referring LibraryObject through which access is granted to the shared ContentObject or null if no existing ContentObject was specified.
  Returns:
    the referring LibraryObject
  Throws:
    `IfsException` - if the operation fails

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