public final class LocalContentStream extends Object implements ContentStreamSerializer
CONTENTTYPE_CONTENTROWREF, CONTENTTYPE_COPIEDCONTENT, CONTENTTYPE_EMPTY, CONTENTTYPE_PATH, CONTENTTYPE_READER, CONTENTTYPE_REFERENCE, CONTENTTYPE_SHAREDCONTENT, CONTENTTYPE_STREAM, CONTENTTYPE_STRING, CONTENTTYPE_UNKNOWN| Constructor and Description |
|---|
LocalContentStream()
Constructs a LocalContentStream.
|
| Modifier and Type | Method and Description |
|---|---|
Reader |
getContentReader()
Get the content as a reader.
|
String |
getContentReference()
Gets the content as a string reference that is interpreted by the Media
instance.
|
Long |
getContentRowReference()
Get the content as a content row ID reference.
|
InputStream |
getContentStream()
Get the content as a stream.
|
String |
getContentString()
Get the content as an explicit String.
|
int |
getContentType()
Get the content type.
|
AttributeValue |
getCopiedContent()
Get the content as an AttributeValue reference to another
ContentObject.
|
String |
getLocalContentPath()
Get the content as a path to a file in the local file system.
|
AttributeValue |
getSharedContent()
Get the content as an AttributeValue reference to another
ContentObject.
|
void |
setContentReader(Reader content)
Set the content as a Reader.
|
void |
setContentReference(LibrarySessionInterface session,
String contentReference)
Sets the content as a string reference that is interpreted by the Media
instance.
|
void |
setContentRowReference(LibrarySessionInterface session,
Long content)
Set the content as a content row ID reference.
|
void |
setContentStream(InputStream content)
Set the content as a stream.
|
void |
setContentString(String content)
Set the content as an explicit String.
|
void |
setCopiedContent(AttributeValue content)
Set the content as an AttributeValue reference to another
ContentObject.
|
void |
setEmptyContent()
Set the content explicitly as "empty content".
|
void |
setLocalContentPath(String path)
Set the content as a path to a file in the local file system.
|
void |
setSharedContent(AttributeValue content)
Set the content as an AttributeValue reference to another
ContentObject.
|
public LocalContentStream()
The initial content type is CONTENTTYPE_UNKNOWN
public int getContentType()
Must be one of the valid Content type constants defined in this interface.
getContentType in interface ContentStreamSerializerpublic void setEmptyContent()
setEmptyContent in interface ContentStreamSerializerpublic InputStream getContentStream() throws IfsException
getContentStream in interface ContentStreamSerializerIfsExceptionpublic void setContentStream(InputStream content)
setContentStream in interface ContentStreamSerializercontent - the content as a streampublic Reader getContentReader()
getContentReader in interface ContentStreamSerializerpublic void setContentReader(Reader content)
setContentReader in interface ContentStreamSerializercontent - the content as a Readerpublic String getContentString()
getContentString in interface ContentStreamSerializerpublic void setContentString(String content) throws IfsException
setContentString in interface ContentStreamSerializercontent - the content as a StringIfsExceptionpublic String getLocalContentPath()
getLocalContentPath in interface ContentStreamSerializerpublic void setLocalContentPath(String path) throws IfsException
setLocalContentPath in interface ContentStreamSerializerpath - the content as a local file pathIfsExceptionpublic AttributeValue getCopiedContent()
getCopiedContent in interface ContentStreamSerializerpublic void setCopiedContent(AttributeValue content)
setCopiedContent in interface ContentStreamSerializercontent - the content as ContentObject valuepublic AttributeValue getSharedContent()
getSharedContent in interface ContentStreamSerializerpublic void setSharedContent(AttributeValue content)
setSharedContent in interface ContentStreamSerializercontent - the content as ContentObject valuepublic Long getContentRowReference()
getContentRowReference in interface ContentStreamSerializerpublic void setContentRowReference(LibrarySessionInterface session, Long content) throws IfsException
This operation requires administration mode.
setContentRowReference in interface ContentStreamSerializersession - a session; must be in admin modecontent - the content as a content row ID reference.IfsExceptionpublic String getContentReference() throws IfsException
getContentReference in interface ContentStreamSerializerIfsException - if the operation failspublic void setContentReference(LibrarySessionInterface session, String contentReference) throws IfsException
This operation requires administration mode.
setContentReference in interface ContentStreamSerializersession - a session; must be in admin modecontentReference - the content referenceIfsException - if the operation failsCopyright © 2025. All rights reserved.