com.wewebu.ow.server.docimport
Class OwLocalFileDocumentImporter

java.lang.Object
  extended by com.wewebu.ow.server.docimport.OwLocalFileDocumentImporter
All Implemented Interfaces:
com.wewebu.ow.server.app.OwDocumentImporter

public class OwLocalFileDocumentImporter
extends Object
implements com.wewebu.ow.server.app.OwDocumentImporter

Special class representing the document importer which handle local file uploads.
The files were uploaded to a temporary location defined by the application.

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


Field Summary
protected  com.wewebu.ow.server.util.OwXMLUtil m_config
          the configuration of this importer
protected  com.wewebu.ow.server.app.OwMainAppContext m_context
          the current MainAppContext
protected  boolean m_singleFileImports
          the current state of single file import
 
Fields inherited from interface com.wewebu.ow.server.app.OwDocumentImporter
IMPORT_CONTEXT_CHECKIN, IMPORT_CONTEXT_NEW, IMPORT_CONTEXT_SAVE
 
Constructor Summary
OwLocalFileDocumentImporter()
           
 
Method Summary
protected  void finalize()
           
protected  com.wewebu.ow.server.app.OwMainAppContext getContext()
           
 String getDisplayName()
           
 String getIconURL()
           
 com.wewebu.ow.server.ui.OwView getPostProcessView(int importContext_p, com.wewebu.ow.server.ecm.OwObject savedObj_p)
           
protected  String getTempDir()
          Returns the path to the common temporary folder for this importer.
protected  int getTempFileID()
          Returns a unique ID for a file in the temp folder.
 com.wewebu.ow.server.ui.OwView getView(int context_p, com.wewebu.ow.server.app.OwDocumentImporterCallback callback_p)
           
 boolean hasPostProcessView(int importContext_p)
           
 void init(com.wewebu.ow.server.app.OwMainAppContext context_p, com.wewebu.ow.server.util.OwXMLUtil config_p)
           
 void releaseAll()
           
 void setSingleFileImports(boolean singleFileImports_p)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_context

protected com.wewebu.ow.server.app.OwMainAppContext m_context
the current MainAppContext


m_config

protected com.wewebu.ow.server.util.OwXMLUtil m_config
the configuration of this importer


m_singleFileImports

protected boolean m_singleFileImports
the current state of single file import

Constructor Detail

OwLocalFileDocumentImporter

public OwLocalFileDocumentImporter()
Method Detail

init

public void init(com.wewebu.ow.server.app.OwMainAppContext context_p,
                 com.wewebu.ow.server.util.OwXMLUtil config_p)
          throws com.wewebu.ow.server.exceptions.OwConfigurationException
Specified by:
init in interface com.wewebu.ow.server.app.OwDocumentImporter
Throws:
com.wewebu.ow.server.exceptions.OwConfigurationException

getTempDir

protected String getTempDir()
                     throws com.wewebu.ow.server.exceptions.OwConfigurationException
Returns the path to the common temporary folder for this importer. Will create the temporary folder upon first usage.

Returns:
the path to the common temporary folder for this importer
Throws:
com.wewebu.ow.server.exceptions.OwConfigurationException - if the temporary folder can not be created

getTempFileID

protected int getTempFileID()
Returns a unique ID for a file in the temp folder. This importer uses one common temp folder for multiple views. So this one common folder is handled by this importer itself and not by each view separately. So we need one single counter to be able to assign unique IDs.

Returns:
a unique ID for a file in the temp folder

getContext

protected com.wewebu.ow.server.app.OwMainAppContext getContext()

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface com.wewebu.ow.server.app.OwDocumentImporter

getIconURL

public String getIconURL()
Specified by:
getIconURL in interface com.wewebu.ow.server.app.OwDocumentImporter

setSingleFileImports

public void setSingleFileImports(boolean singleFileImports_p)
Specified by:
setSingleFileImports in interface com.wewebu.ow.server.app.OwDocumentImporter

getView

public com.wewebu.ow.server.ui.OwView getView(int context_p,
                                              com.wewebu.ow.server.app.OwDocumentImporterCallback callback_p)
Specified by:
getView in interface com.wewebu.ow.server.app.OwDocumentImporter

releaseAll

public void releaseAll()
Specified by:
releaseAll in interface com.wewebu.ow.server.app.OwDocumentImporter

getPostProcessView

public com.wewebu.ow.server.ui.OwView getPostProcessView(int importContext_p,
                                                         com.wewebu.ow.server.ecm.OwObject savedObj_p)
Specified by:
getPostProcessView in interface com.wewebu.ow.server.app.OwDocumentImporter

hasPostProcessView

public boolean hasPostProcessView(int importContext_p)
Specified by:
hasPostProcessView in interface com.wewebu.ow.server.app.OwDocumentImporter

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.