com.wewebu.ow.server.app
Interface OwDocumentImportItem

All Known Implementing Classes:
OwStandardDocumentImportItem

public interface OwDocumentImportItem

Interface describing one single document imported by a document importer.
A document importer can be used by plugins that gather content like the add document, the save or the checkin plugins to receive the content from the user.

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


Method Summary
 Boolean getCheckinAsMajor()
          Return a Boolean representing the checkin status for this item, possible values are: Boolean.TRUE: create/checkin as major version Boolean.FALSE: create/checkin as minor version null: action should be request from user/or ignore
 String getContentMimeParameter(int i_p)
          Returns the MIME parameter of the i-th content stream.
 String getContentMimeType(int i_p)
          Returns the MIME type of the i-th content stream.
 InputStream getContentStream(int i_p)
          Returns the ith content stream of the imported document as InputStream.
 int getContentStreamCount()
          Returns the number of content elements associated with this imported document.
 String getDisplayName()
          Returns a String that represents this imported Document.
Used for example for the stack of imported documents.
 String getObjectClassName()
          Return the ECM classification name for this OwDocumentItem, which should be used to save the document in the back-end system.
 String getPreviewFilePath(int i_p)
          Returns the full path to a file that can be used for preview of the i-th content stream.
 Map getPropertyValueMap()
          Returns a Map with property class to value mappings.
 String getProposedDocumentName()
          Returns the proposed Document name.
Nearly every ECM back-end knows some name property or represents item property that is used by this ECM system as a name of the document.
 void release()
          Release this imported document by freeing all temporarily acquired resources like deleting temporary files.
Please note:
This method must be able to deal with
  (a) multiple calls of this method, and
  (b) calls to this method AFTER a call to releaseAll of the creating importer.
 

Method Detail

getContentStreamCount

int getContentStreamCount()
Returns the number of content elements associated with this imported document. If the singleConentStreamImports option is set to true, there is a maximum of 1 content element per document.

Returns:
the number of content elements associated with this imported document

getContentStream

InputStream getContentStream(int i_p)
                             throws Exception
Returns the ith content stream of the imported document as InputStream. The document importer has to keep this stream available until the clear() method has been called. Can be null if and only if the document does not have any content.

Parameters:
i_p - zero-based index in the list of imported content streams
Returns:
the ith (0-based) content stream of the imported document as InputStream
Throws:
Exception - if the InputStream of this imported document can not be created

getContentMimeType

String getContentMimeType(int i_p)
Returns the MIME type of the i-th content stream. Can be null.

Parameters:
i_p - zero-based index in the list of imported content streams
Returns:
the MIME type of the i-th content stream

getContentMimeParameter

String getContentMimeParameter(int i_p)
Returns the MIME parameter of the i-th content stream. Can be null.

Parameters:
i_p - zero-based index in the list of imported content streams
Returns:
the MIME parameter of the i-th content stream

getPropertyValueMap

Map getPropertyValueMap()
Returns a Map with property class to value mappings. These values will be set as initial values of the new object before the "edit properties" dialog is shown. The user will always have the possibility to override these values (if they are not marked as read only in the master plugin).

Returns:
a Map with property class to value mappings

getDisplayName

String getDisplayName()
Returns a String that represents this imported Document.
Used for example for the stack of imported documents.

Returns:
a String that represents this imported Document

getProposedDocumentName

String getProposedDocumentName()
Returns the proposed Document name.
Nearly every ECM back-end knows some name property or represents item property that is used by this ECM system as a name of the document. This method makes a proposal for that name based on the imported document. May return null.

Returns:
the proposed Document name. Can be null.

getPreviewFilePath

String getPreviewFilePath(int i_p)
Returns the full path to a file that can be used for preview of the i-th content stream. Can be null.

Parameters:
i_p - zero-based index in the list of imported conent streams
Returns:
the full path to a file that can be used for preview of the i-th content stream. Can be null.

release

void release()
             throws Exception
Release this imported document by freeing all temporarily acquired resources like deleting temporary files.
Please note:
This method must be able to deal with
  (a) multiple calls of this method, and
  (b) calls to this method AFTER a call to releaseAll of the creating importer.

Throws:
Exception - if there are problems freeing the ocupied resources

getObjectClassName

String getObjectClassName()
Return the ECM classification name for this OwDocumentItem, which should be used to save the document in the back-end system.

Can return null, so the default handling or user action should be processed.

Returns:
String name of DocumentClass/ObjectClass, or null

getCheckinAsMajor

Boolean getCheckinAsMajor()
Return a Boolean representing the checkin status for this item, possible values are:

Returns:
java.lang.Boolean or null


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.