public interface OwDocumentImporter
Interface for document importers.
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
Modifier and Type | Field and Description |
---|---|
static int |
IMPORT_CONTEXT_CHECKIN
context used in getView() if the view is used during the checkin of checked-out documents
|
static int |
IMPORT_CONTEXT_NEW
context used in getView() if the view is used during the creation of new documents
|
static int |
IMPORT_CONTEXT_SAVE
context used in getView() if the view is used to save new content to existing documents
|
Modifier and Type | Method and Description |
---|---|
String |
getDisplayName()
Get the display name representing this document importer in the UI.
|
String |
getIconURL()
Get the URL of the icon representing this document importer in the UI.
|
OwView |
getPostProcessView(int importContext_p,
OwObject savedObj_p)
Return the view which should be displayed for post processing.
|
OwView |
getView(int context_p,
OwDocumentImporterCallback callback_p)
Returns the UI view of this document importer.
|
boolean |
hasPostProcessView(int importContext_p)
Should return a boolean value which define if a post process view should be displayed or not
after saving document into the back-end system.
|
void |
init(OwMainAppContext context_p,
OwXMLUtil config_p)
Initialize this document importer from the XML fragment in the OwXMLUtil.
|
void |
releaseAll()
Releases all
s created by this importer during instantiation
or the last invokation of this method. |
void |
setSingleFileImports(boolean singleFileImports_p)
Each imported document becomes a document in the back-end ECM system.
|
static final int IMPORT_CONTEXT_NEW
static final int IMPORT_CONTEXT_SAVE
static final int IMPORT_CONTEXT_CHECKIN
void init(OwMainAppContext context_p, OwXMLUtil config_p) throws OwConfigurationException
context_p
- The current OwMainAppContext for the importerconfig_p
- OwXMLUtil with the XML fragment configuring this document importerOwConfigurationException
- if this document importer can not be initialized.String getIconURL()
String getDisplayName()
void setSingleFileImports(boolean singleFileImports_p)
singleFileImports_p
- true if the importer must accept at most one file per documentOwView getView(int context_p, OwDocumentImporterCallback callback_p)
context_p
- callback_p
- void releaseAll()
OwDocumentImportItem
s created by this importer during instantiation
or the last invokation of this method. Also releases all addition resources like the temporary folder
itself.OwView
returned by getView(int, OwDocumentImporterCallback)
}
might create multiple OwDocumentImportItem
s during its lifetime. Although each
item has it's own release()
method, this might not be sufficient. Many implementations
of this interface create a temporary folder upon instantiation or upon first usage that contains all
temporary files associated with the imported documents. So there is a need to remove the containing
folder itself and not only all files in it.releaseAll()
call.release()
method of all imported items
has been called or has not been called. It must be able to deal with any situation.boolean hasPostProcessView(int importContext_p)
importContext_p
- int representing one of OwDocumentImporter.IMPORT_CONTEXT_... valuetrue
only if importer has a post process view for the given contextOwView getPostProcessView(int importContext_p, OwObject savedObj_p)
Can return null, but should correspond with the hasPostProcessView(int)
method by returning false
for the same importContext_p
importContext_p
- int representing one of OwDocumentImporter.IMPORT_CONTEXT_... valuesavedObj_p
- OwObject which was saved before (non-null reference)Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.