public class OwDocumentImportItemContentElement extends Object implements OwContentElement
OwContentElement implementation that is wrapped around
an OwDocumentImportItem.OwDocumentImportItemContentCollection to represent
the single pages (aka content streams) of the content collection.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_contentType
the content type of this element
|
protected OwDocumentImportItem |
m_importedDocument
the imported document the content collection is based on
|
protected int |
m_page
the page number of this element
|
| Constructor and Description |
|---|
OwDocumentImportItemContentElement(int contentType_p,
int page_p,
OwDocumentImportItem importedDocument_p)
Create a new
OwDocumentImportItemContentElement that represents
a page (aka. |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentFilePath()
Returns the file path to the content (optional, only available if content is stored locally).
NOTE: This function is only used for ECM Systems which can only download through files. |
Object |
getContentObject()
Returns the content object The content representation is of type Object
|
int |
getContentRepresentation()
get the content representation, which can be either url, stream or object
|
InputStream |
getContentStream(OutputStream out_p)
Returns the content from the object.
|
String |
getContentURL()
Returns the URL to the resource where the content can be retrieved.
|
String |
getMIMEParameter()
retrieve the MIME parameter for the specified page number
|
String |
getMIMEType()
retrieve the MIME type for the specified page number
|
int |
getPageNumber(int lPageIndex_p)
retrieve the page number for the given zero based index
NOTE: the Page numbers might be arbitrary in the collection in order to submit specific page content
|
boolean |
isInputStreamNative()
Check if getContentStream is based on an native InputStream or OutputStream.
NOTE: getContentStream must implement for Input- and OutputStream. |
void |
releaseResources()
method is called e.g.
|
protected int m_contentType
protected int m_page
protected OwDocumentImportItem m_importedDocument
public OwDocumentImportItemContentElement(int contentType_p,
int page_p,
OwDocumentImportItem importedDocument_p)
OwDocumentImportItemContentElement that represents
a page (aka. content stream) of an imported document.contentType_p - designating the type of content (CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_ANNOTATION,...)page_p - int Page number to setpublic String getContentURL() throws Exception
getContentURL in interface OwContentElementExceptionpublic boolean isInputStreamNative()
isInputStreamNative in interface OwContentElementpublic String getContentFilePath() throws Exception
getContentFilePath in interface OwContentElementExceptionpublic InputStream getContentStream(OutputStream out_p) throws Exception
getContentStream in interface OwContentElementout_p - optional OutputStream, if set the method writes the
OutputStream and returns null, otherwise it returns an
InputStreamExceptionpublic Object getContentObject() throws Exception
getContentObject in interface OwContentElementExceptionpublic int getContentRepresentation()
throws Exception
getContentRepresentation in interface OwContentElementExceptionpublic int getPageNumber(int lPageIndex_p)
throws Exception
getPageNumber in interface OwContentElementlPageIndex_p - zero based page index for the pages in the collectionExceptionpublic String getMIMEType() throws Exception
getMIMEType in interface OwContentElementExceptionpublic String getMIMEParameter() throws Exception
getMIMEParameter in interface OwContentElementExceptionpublic void releaseResources()
OwContentElementreleaseResources in interface OwContentElementOwContentElement.releaseResources()Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.