public class OwStandardContentCollection extends Object implements OwContentCollection, OwContentElement
Standard Implementation of the OwContentCollection interface for just one content type and page.
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
CONTENT_REPRESENTATION_TYPE_NONE, CONTENT_REPRESENTATION_TYPE_OBJECT, CONTENT_REPRESENTATION_TYPE_STREAM, CONTENT_REPRESENTATION_TYPE_URL, CONTENT_REPRESENTATION_TYPE_USER_START, CONTENT_TYPE_ANNOTATION, CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_SECURITY, CONTENT_TYPE_USER_START| Constructor and Description |
|---|
OwStandardContentCollection(InputStream input_p,
int iContentType_p,
int iPageNumber_p)
construct a content collection with just one page and one content type
|
OwStandardContentCollection(InputStream input_p,
int iContentType_p,
int iPageNumber_p,
String sMimeType_p)
construct a content collection with just one page and one content type
|
| Modifier and Type | Method and Description |
|---|---|
OwContentElement |
getContentElement(int iContentType_p,
int iPage_p)
get a content element for the given type and page
|
String |
getContentFilePath()
get 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
If a FilePath exists, a stream will also exist.
|
Object |
getContentObject()
get 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)
get the content from the object.
|
Collection |
getContentTypes()
get a list of content types used in this object
|
String |
getContentURL()
get the content URL from the object.
|
String |
getMIMEParameter()
retrieve the MIME parameter for the specified page number
|
String |
getMIMEType()
retrieve the MIME type for the specified page number
|
int |
getPageCount()
retrieve the page count
|
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.
|
public OwStandardContentCollection(InputStream input_p, int iContentType_p, int iPageNumber_p)
input_p - InputStream to the contentiContentType_p - int the one and only content typeiPageNumber_p - int the page number of the one and only pagepublic OwStandardContentCollection(InputStream input_p, int iContentType_p, int iPageNumber_p, String sMimeType_p)
input_p - InputStream to the contentiContentType_p - int the one and only content typeiPageNumber_p - int the page number of the one and only pagesMimeType_p - MIME Typepublic String getContentURL() throws Exception
getContentURL in interface OwContentElementExceptionpublic Object getContentObject() throws Exception
getContentObject in interface OwContentElementExceptionpublic int getContentRepresentation()
throws Exception
getContentRepresentation in interface OwContentElementExceptionpublic boolean isInputStreamNative()
isInputStreamNative in interface OwContentElementpublic OwContentElement getContentElement(int iContentType_p, int iPage_p) throws Exception
getContentElement in interface OwContentCollectioniContentType_p - intiPage_p - intExceptionpublic 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 Collection getContentTypes() throws Exception
getContentTypes in interface OwContentCollectionExceptionpublic 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 int getPageCount()
throws Exception
getPageCount in interface OwContentCollectionExceptionpublic String getContentFilePath() throws Exception
getContentFilePath in interface OwContentElementExceptionpublic void releaseResources()
OwContentElementreleaseResources in interface OwContentElementOwContentElement.releaseResources()Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.