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 OwContentElement
Exception
public boolean isInputStreamNative()
isInputStreamNative
in interface OwContentElement
public String getContentFilePath() throws Exception
getContentFilePath
in interface OwContentElement
Exception
public InputStream getContentStream(OutputStream out_p) throws Exception
getContentStream
in interface OwContentElement
out_p
- optional OutputStream, if set the method writes the
OutputStream and returns null, otherwise it returns an
InputStreamException
public Object getContentObject() throws Exception
getContentObject
in interface OwContentElement
Exception
public int getContentRepresentation() throws Exception
getContentRepresentation
in interface OwContentElement
Exception
public int getPageNumber(int lPageIndex_p) throws Exception
getPageNumber
in interface OwContentElement
lPageIndex_p
- zero based page index for the pages in the collectionException
public String getMIMEType() throws Exception
getMIMEType
in interface OwContentElement
Exception
public String getMIMEParameter() throws Exception
getMIMEParameter
in interface OwContentElement
Exception
public void releaseResources()
OwContentElement
releaseResources
in interface OwContentElement
OwContentElement.releaseResources()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.