|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.beans.LibraryObjectDefinition | +--oracle.ifs.beans.SystemObjectDefinition | +--oracle.ifs.beans.ContentObjectDefinition
The ContentObjectDefinition class is used to construct a ContentObject object. This subclass of PublicObjectDefinition sets the default ClassObject to "CONTENTOBJECT"
An instance of a ContentObjectDefinition is passed to LibrarySession.createContentObject() to actually construct the new document.
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 your setContent method must convert your 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.
Constructor Summary | |
ContentObjectDefinition(LibrarySession session)
Constructs a ContentObjectDefinition explicitly capturing the session. |
Method Summary | |
java.lang.String |
getContent()
Gets the content String as set in this definition, or null if no String was specified. |
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.io.InputStream |
getContentStream()
Gets the InputStream from which this content will be loaded. |
Format |
getFormat(LibrarySession sess)
Returns the Format object representing the format of the content. |
void |
setContent(java.lang.String content)
Sets the content as a String. |
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 |
setContentStream(java.io.InputStream contentStream)
Sets the content InputStream from which the content will be loaded/created. |
void |
setEmptyContent()
This method indicates to the server that content should be created, but with zero length. |
void |
setFormat(Format format)
Sets the Format object describing the type of content. |
Methods inherited from class oracle.ifs.beans.LibraryObjectDefinition |
clone, getAttribute, getAttributes, getClassObject, getOption, getOptionKeys, removeAttribute, removeOption, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributes, setClassObject, setOption |
Constructor Detail |
public ContentObjectDefinition(LibrarySession session) throws IfsException
session
- the sessionIfsException
- if the operation failsMethod Detail |
public void setFormat(Format format) throws IfsException
format
- the desired Format object.IfsException
- if the operation fails.public void setContentPath(java.lang.String contentPath) throws IfsException
contentPath
- the file from which content will be loaded/created.IfsException
- if the operation fails.public void setContentStream(java.io.InputStream contentStream) throws IfsException
contentStream
- an InputStream from which content will be loaded/created.IfsException
- if the operation fails.public void setContentReader(java.io.Reader contentReader) throws IfsException
contentReader
- an Reader from which content will be loaded/created.IfsException
- if the operation fails.public void setContent(java.lang.String content) throws IfsException
content
- A String which contains the content that will be loaded
into the new content object.IfsException
- if the operation fails.public void setEmptyContent() throws IfsException
IfsException
- if the operation fails.public Format getFormat(LibrarySession sess) throws IfsException
sess
- current LibrarySessionIfsException
- if the operation fails.public java.lang.String getContentPath() throws IfsException
IfsException
- if the operation fails.public java.lang.String getContent() throws IfsException
IfsException
- if the operation fails.public java.io.InputStream getContentStream() throws IfsException
IfsException
- if the operation fails.public java.io.Reader getContentReader() throws IfsException
IfsException
- if the operation fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |