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

## oracle.ifs.beans
Class ContentObjectDefinition

    java.lang.Object
      oracle.ifs.beans.LibraryObjectDefinition
          oracle.ifs.beans.SystemObjectDefinition
              oracle.ifs.beans.ContentObjectDefinition

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  Rfc822ContentObjectDefinition

    public class ContentObjectDefinition

extends SystemObjectDefinition

The `ContentObjectDefinition` class is used to construct a ContentObject object. This subclass of SystemObjectDefinition sets the default ClassObject to "CONTENTOBJECT".

There are at least five ways to specify content: by local file path, by String, by InputStream, by Reader, or by existing content. Setting any one of these will override any other previously set content on the definition. Note that LocalFile means local relative to the machine on which the beans API is running.

If you extend ContentObjectDefinition in order to provide for a different type of content (e.g., Float), then the `setContent()` method must convert the content into one of the supported types. The supported types are InputStream, Reader, String, Existing ContentObject, or path to a file to which the API has access.

See Also:
  Serialized Form
(Published)

Field Summary

Fields inherited from class oracle.ifs.beans.LibraryObjectDefinition
`m_Attributes, m_ClassObjectName, m_ClassObjectValue, m_ContentSpecifications, m_DefinitionLists, m_Definitions, m_EnclosedDefinition, m_Id, m_Options, m_ReadOnly, m_ReferenceAttributes, m_Session, m_SystemOptions`

Constructor Summary
`ContentObjectDefinition(LibrarySessionInterface session)` Construct a definition explicitly capturing the session.
`ContentObjectDefinition(LibrarySessionInterface session, java.lang.String className)` Construct a definition, explicitly capturing the session and setting the initial classobject.

Method Summary
`java.lang.String` | `getContent()` Gets the content String as set in this definition, or null if the content was not specified as a String.
`java.lang.String` | `getContentBfileReferenceFileName()` Deprecated. 11.1+: use `getContentReference`
`java.lang.String` | `getContentBfileReferenceParentFolderPath()` Deprecated. 11.1+: use `getContentReference`
`java.lang.String` | `getContentNameOption()` Get the name of the document that will end up using this content.
`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 content will be loaded.
`java.lang.String` | `getContentReference()` Gets the content as a string reference that is interpreted by the Media instance.
`java.lang.Long` | `getContentRowReference()` Gets the pointer to the explicit row in the content table to which this contentobject points.
`AttributeValue` | `getContentSizeValue()` Gets the previously set media (of null if none set).
`java.io.InputStream` | `getContentStream()` Gets the InputStream from which this content will be loaded.
`AttributeValue` | `getCopiedContent()` Gets the content as a reference to an existing ContentObject.
`Format` | `getFormat(LibrarySession sess)` Deprecated. CM SDK 10gR2: use getAttribute("FORMAT")
`Media` | `getMedia()` Deprecated. CM SDK 10gR2: use getAttribute
`AttributeValue[]` | `getMediaOptions()` Gets name/value pairs whose semantics are specific to the ContentObject's MEDIA.
`AttributeValue` | `getMediaValue()` Deprecated. CM SDK 10gR2: use getAttribute
`AttributeValue` | `getSharedContent()` Gets the content shared as an existing ContentObject.
`boolean` | `isContentSpecified()` Return true if content has been specified in any form.
`boolean` | `isEmptyContent()` Return true if empty content has been specified via the setEmptyContent() method.
`void` | `removeContent()` Removes any content previously set in this ContentObjectDefinition.
`void` | `setContent(java.lang.String content)` Sets the content as a String.
`void` | `setContentBfileReference(java.lang.String parentFolderPath, java.lang.String fileName, java.lang.Long contentSize)` Deprecated. 11.1+: use `setContentReference`
`void` | `setContentNameOption(java.lang.String name)` Set the name of the document that will end up using this content.
`void` | `setContentPath(java.lang.String contentPath)` Sets the path of the local file from which this content will be loaded/created.
`void` | `setContentReader(java.io.Reader contentReader)` Sets the content Reader from which the content will be loaded/created.
`void` | `setContentReference(java.lang.String contentReference, java.lang.Long contentSize)` Sets the content as a string reference that is interpreted by the Media instance.
`void` | `setContentRowReference(java.lang.Long contentId)` This method indicates to the server that content should be created, pointing to an existing row in the underlying content tables.
`void` | `setContentRowReference(java.lang.Long contentId, Format format, Media media, long contentSize)` This method indicates to the server that content should be created, pointing to an existing row in the underlying content tables This is used internally by the files to ECM upgrade for performance reasons.
`void` | `setContentStream(java.io.InputStream contentStream)` Sets the content InputStream from which the content will be loaded/created.
`protected void` | `setContentStreamSerializer(ContentStreamSerializer css)` Sets the content as a ContentStreamSerializer.
`void` | `setCopiedContent(AttributeValue av)` Sets the content as a reference to an existing ContentObject.
`void` | `setEmptyContent()` This method indicates to the server that content should be created, but with zero length.
`void` | `setFormat(Format format)` Deprecated. CM SDK 10gR2: use setAttribute( "FORMAT", AttributeValue.newAttributeValue(format));
`void` | `setMedia(Media media)` Deprecated. CM SDK 10gR2: use setAttribute
`void` | `setMediaOptions(AttributeValue[] avs)` Sets name/value pairs whose semantics are specific to the ContentObject's MEDIA.
`void` | `setMediaValue(AttributeValue av)` Deprecated. CM SDK 10gR2: use setAttribute
`void` | `setSharedContent(AttributeValue av)` Sets the content by sharing an existing ContentObject.
`static ContentObjectDefinition` | `toContentObjectDefinition(LibraryObjectDefinition lodef)` Casts the specified LibraryObjectDefinition to a ContentObjectDefinition.
`static ContentObjectDefinition` | `toContentObjectDefinition(LibraryObjectDefinition lodef, boolean enforceCompat)` Casts the specified LibraryObjectDefinition to a ContentObjectDefinition.

Methods inherited from class oracle.ifs.beans.SystemObjectDefinition
`addCategoryDefinition, addCategoryDefinitionForUpdate, addCategoryDefinitions, addCategoryForDelete, getCategoriesForDelete, getCategoryDefinitions, getCategoryDefinitionsForUpdate, getCreateCategoriesServerSideOption, removeCategoriesForDelete, removeCategoryDefinitions, removeCategoryDefinitionsForUpdate, setCategoryDefinitions, setCreateCategoriesServerSideOption, toSystemObjectDefinition, toSystemObjectDefinition`

Methods inherited from class oracle.ifs.beans.LibraryObjectDefinition
`addDefinition, addDefinitions, addProperty, addPropertyDefinition, addPropertyDefinitions, captureSession, captureSession, captureSession, clone, constructInstance, constructInstance, copyInto, getAttribute, getAttribute, getAttributes, getAttributes, getAttributesSorted, getClassId, getClassObject, getClassObjectValue, getContentSpecification, getContentSpecificationKeys, getCopiedObjectValue, getDefinition, getDefinitionClassName, getDefinitionKeys, getDefinitionListKeys, getDefinitions, getId, getLibrarySession, getName, getOption, getOptionAsAttributeValue, getOptionKeys, getPolicyMode, getPropertyDefinitions, getReferenceAttribute, getReferenceAttributes, getServerDefinition, getSession, getSLibrarySession, getStringAttribute, getSystemOption, getSystemOptionAsAttributeValue, getSystemOptionAsBoolean, getSystemOptionKeys, getWriteableInstance, isReadOnly, prepareForDefinitionObject, removeAttribute, removeContentSpecification, removeDefinition, removeDefinitions, removeOption, removePropertyDefinitions, removeReferenceAttribute, removeSystemOption, reset, resolve, setAttribute, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributeByUpperCaseName, setAttributePolicyMode, setAttributes, setClassId, setClassname, setClassObject, setClassObjectValue, setContentSpecification, setCopiedObjectValue, setDefinition, setDefinitions, setId, setName, setOption, setReadOnly, setReferenceAttribute, setReferenceAttribute, setSession, setSystemOption, unresolve, verifySession`

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

Constructor Detail

### ContentObjectDefinition

    public ContentObjectDefinition(LibrarySessionInterface session)
                            throws IfsException

  Construct a definition explicitly capturing the session. The initial ClassObject will be ContentObject.

  Parameters:
    `session` - the current session
  Throws:
    `IfsException` - if the operation fails
  (Published)

### ContentObjectDefinition

    public ContentObjectDefinition(LibrarySessionInterface session,
                                   java.lang.String className)
                            throws IfsException

  Construct a definition, explicitly capturing the session and setting the initial classobject.

  Parameters:
    `session` - the current session
    `className` - the initial class name
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Method Detail

### setFormat

    public void setFormat(Format format)
                   throws IfsException

  Deprecated. CM SDK 10gR2: use setAttribute( "FORMAT", AttributeValue.newAttributeValue(format));

  Description copied from class: `ContentObjectDefinition`
  Sets the Format object describing the type of content.

  Parameters:
    `format` - the desired Format object.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getFormat

    public Format getFormat(LibrarySession sess)
                     throws IfsException

  Deprecated. CM SDK 10gR2: use getAttribute("FORMAT")

  Description copied from class: `ContentObjectDefinition`
  Returns the Format object representing the format of the content.

  Parameters:
    `sess` - current LibrarySession
  Returns:
    the Format object
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setMedia

    public void setMedia(Media media)
                  throws IfsException

  Deprecated. CM SDK 10gR2: use setAttribute

  Description copied from class: `ContentObjectDefinition`
  Explicitly sets or updates the media for a ContentObject.

  Parameters:
    `media` - the Media type for the content
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### setMediaValue

    public void setMediaValue(AttributeValue av)
                       throws IfsException

  Deprecated. CM SDK 10gR2: use setAttribute

  Description copied from class: `ContentObjectDefinition`
  Explicitly sets or updates the media for a ContentObject.

  Parameters:
    `av` - the Media type value for the content
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getMedia

    public Media getMedia()
                   throws IfsException

  Deprecated. CM SDK 10gR2: use getAttribute

  Description copied from class: `ContentObjectDefinition`
  Gets the previously set media (of null if none set).

  Returns:
    media the Media of this ContentObject
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getMediaValue

    public AttributeValue getMediaValue()
                                 throws IfsException

  Deprecated. CM SDK 10gR2: use getAttribute

  Description copied from class: `ContentObjectDefinition`
  Gets the previously set media (of null if none set).

  Returns:
    media the Media of this ContentObject
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getContentSizeValue

    public AttributeValue getContentSizeValue()
                                       throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the previously set media (of null if none set).

  Returns:
    media the Media of this ContentObject
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### setContentNameOption

    public void setContentNameOption(java.lang.String name)
                              throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Set the name of the document that will end up using this content.

  used to derive the correct format and media in the event that this content is saved in a DefinitionObject.

  Parameters:
    `name` - the name that will be used for the content
  Throws:
    `IfsException` - if operation fails.
  (Published)

### getContentNameOption

    public java.lang.String getContentNameOption()
                                          throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Get the name of the document that will end up using this content.

  Used to derive the correct format and media in the event that this content is saved in a DefinitionObject.

  Returns:
    the name that will be used for the content
  Throws:
    `IfsException` - if operation fails.
  (Published)

### setMediaOptions

    public void setMediaOptions(AttributeValue[] avs)
                         throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Sets name/value pairs whose semantics are specific to the ContentObject's MEDIA.

  Parameters:
    `avs` - the name/value pairs, or null
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getMediaOptions

    public AttributeValue[] getMediaOptions()
                                     throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets name/value pairs whose semantics are specific to the ContentObject's MEDIA.

  Returns:
    the name/value pairs, or null
  Throws:
    `IfsException` - if the operation fails
  (Published)

### setContentPath

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

  Description copied from class: `ContentObjectDefinition`
  Sets the path of the local file from which this content will be loaded/created. This will always transfer content down as a stream. If you want to transfer it as a Reader, then you need to pass a FileReader to setContentReader().

  Parameters:
    `contentPath` - the file from which content will be loaded/created.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setContentStream

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

  Description copied from class: `ContentObjectDefinition`
  Sets the content InputStream from which the content will be loaded/created.

  Parameters:
    `contentStream` - an InputStream from which content will be loaded/created.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setContentBfileReference

    public void setContentBfileReference(java.lang.String parentFolderPath,
                                         java.lang.String fileName,
                                         java.lang.Long contentSize)
                                  throws IfsException

  Deprecated. 11.1+: use `setContentReference`

  Description copied from class: `ContentObjectDefinition`
  Sets the external file reference on content object definition; This will be used to create the BFILE reference.

  This operation requires administration mode.

  Parameters:
    `parentFolderPath` - absolute path of parent folder of external file
    `fileName` - name of the external file
    `contentSize` - Size of the external file; If null, the size is determined by the server
  Throws:
    `IfsException`
  (Unpublished)

### setContentReference

    public void setContentReference(java.lang.String contentReference,
                                    java.lang.Long contentSize)
                             throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Sets the content as a string reference that is interpreted by the Media instance.

  This operation requires administration mode.

  Parameters:
    `contentReference` - the content reference
    `contentSize` - the content size, in bytes, or null if unknown
  Throws:
    `IfsException` - if the operation fails
  (Published)

### setContentReader

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

  Description copied from class: `ContentObjectDefinition`
  Sets the content Reader from which the content will be loaded/created.

  Parameters:
    `contentReader` - an Reader from which content will be loaded/created.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setContent

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

  Description copied from class: `ContentObjectDefinition`
  Sets the content as a String. This is converted internally to a StringReader so equivalent to setContentReader.

  Parameters:
    `content` - A String which contains the content that will be loaded into the new content object.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setCopiedContent

    public void setCopiedContent(AttributeValue av)
                          throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Sets the content as a reference to an existing ContentObject.

  Parameters:
    `av` - the value of an existing ContentObject
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setSharedContent

    public void setSharedContent(AttributeValue av)
                          throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Sets the content by sharing an existing ContentObject.

  Parameters:
    `av` - the value of an existing ContentObject
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setEmptyContent

    public void setEmptyContent()
                         throws IfsException

  Description copied from class: `ContentObjectDefinition`
  This method indicates to the server that content should be created, but with zero length.

  Throws:
    `IfsException` - if the operation fails.
  (Published)

### setContentRowReference

    public void setContentRowReference(java.lang.Long contentId)
                                throws IfsException

  Description copied from class: `ContentObjectDefinition`
  This method indicates to the server that content should be created, pointing to an existing row in the underlying content tables.

  This operation requires administration mode.

  Throws:
    `IfsException` - if the operation fails.
  (Unpublished)

### setContentRowReference

    public void setContentRowReference(java.lang.Long contentId,
                                       Format format,
                                       Media media,
                                       long contentSize)
                                throws IfsException

  Description copied from class: `ContentObjectDefinition`
  This method indicates to the server that content should be created, pointing to an existing row in the underlying content tables This is used internally by the files to ECM upgrade for performance reasons.

  This operation requires administration mode.

  Parameters:
    `contentId` - id of the content row
    `format` - format of the content
    `media` - media where content exists
    `contentSize` - size of the content
  Throws:
    `IfsException` - if the operation fails.
  (Unpublished)

### setContentStreamSerializer

    protected void setContentStreamSerializer(ContentStreamSerializer css)
                                       throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Sets the content as a ContentStreamSerializer.

  Only used by DefinitionObject

  Parameters:
    `css` - the content
  Throws:
    `IfsException` - if the operation fails.
  (Unpublished)

### removeContent

    public void removeContent()
                       throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Removes any content previously set in this ContentObjectDefinition.

  Throws:
    `IfsException` - if the operation fails
  (Published)

### isContentSpecified

    public boolean isContentSpecified()
                               throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Return true if content has been specified in any form.

  Returns:
    the indication as to whether content is specified
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### isEmptyContent

    public boolean isEmptyContent()
                           throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Return true if empty content has been specified via the setEmptyContent() method.

  Returns:
    the indication as to whether empty content is specified
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getContentPath

    public java.lang.String getContentPath()
                                    throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the path of the local file content, or null if no local file was specified.

  Returns:
    the local content path
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getCopiedContent

    public AttributeValue getCopiedContent()
                                    throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the content as a reference to an existing ContentObject.

  Returns:
    the value of an existing ContentObject
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getSharedContent

    public AttributeValue getSharedContent()
                                    throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the content shared as an existing ContentObject.

  Returns:
    the value of an existing ContentObject
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getContent

    public java.lang.String getContent()
                                throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the content String as set in this definition, or null if the content was not specified as a String.

  Returns:
    the content String
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getContentStream

    public java.io.InputStream getContentStream()
                                         throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the InputStream from which this content will be loaded. or null if no InputStream was specified.

  Returns:
    the content InputStream
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getContentBfileReferenceFileName

    public java.lang.String getContentBfileReferenceFileName()
                                                      throws IfsException

  Deprecated. 11.1+: use `getContentReference`

  Description copied from class: `ContentObjectDefinition`
  Gets the name of external file reference.

  Returns:
    name of the external file reference
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getContentBfileReferenceParentFolderPath

    public java.lang.String getContentBfileReferenceParentFolderPath()
                                                              throws IfsException

  Deprecated. 11.1+: use `getContentReference`

  Description copied from class: `ContentObjectDefinition`
  Gets the folder path of the parent folder of external file reference.

  Returns:
    folder path of the externa file reference
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getContentReference

    public java.lang.String getContentReference()
                                         throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the content as a string reference that is interpreted by the Media instance.

  Returns:
    the content reference
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getContentReader

    public java.io.Reader getContentReader()
                                    throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the Reader from which this content will be loaded. or null if no Reader was specified.

  Returns:
    the content Reader
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### getContentRowReference

    public java.lang.Long getContentRowReference()
                                          throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Gets the pointer to the explicit row in the content table to which this contentobject points.

  Returns:
    the content row
  Throws:
    `IfsException` - if the operation fails.
  (Unpublished)

### toContentObjectDefinition

    public static ContentObjectDefinition toContentObjectDefinition(LibraryObjectDefinition lodef)
                                                             throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Casts the specified LibraryObjectDefinition to a ContentObjectDefinition.

  Returns null if the specified definition is not a ContentObjectDefinition, or if the specified definition is null.

  Parameters:
    `lodef` - the definition
  Returns:
    the ContentObjectDefinition or null
  Throws:
    `IfsException` - is not currently thrown
  (Unpublished)

### toContentObjectDefinition

    public static ContentObjectDefinition toContentObjectDefinition(LibraryObjectDefinition lodef,
                                                                    boolean enforceCompat)
                                                             throws IfsException

  Description copied from class: `ContentObjectDefinition`
  Casts the specified LibraryObjectDefinition to a ContentObjectDefinition.

  Returns the ContentObjectDefinition, or null if the specified definition is null. If the cast fails, returns null if `enforceCompat` is false or throws IfsException if `enforceCompat` is true.

  Parameters:
    `lodef` - the definition to cast
    `enforceCompat` - whether to throw an exception if the cast fails
  Returns:
    the ContentObjectDefinition
  Throws:
    `IfsException` - (IFS-10822) if the operation fails
  (Unpublished)

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