com.wewebu.ow.server.plug.owaddmultidocuments
Class OwCreateMultipleDocumentsDialog

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwView
          extended by com.wewebu.ow.server.ui.OwLayout
              extended by com.wewebu.ow.server.ui.OwDialog
                  extended by com.wewebu.ow.server.app.OwStandardDialog
                      extended by com.wewebu.ow.server.plug.owaddmultidocuments.OwCreateMultipleDocumentsDialog
All Implemented Interfaces:
OwDocumentImportViewListener, OwMultiDocumentObjectPropertyViewListner, com.wewebu.ow.server.ui.OwBaseView, com.wewebu.ow.server.ui.OwDialog.OwDialogListener, com.wewebu.ow.server.ui.OwJspConfigurable, com.wewebu.ow.server.ui.OwUpdateTarget, EventListener

public class OwCreateMultipleDocumentsDialog
extends com.wewebu.ow.server.app.OwStandardDialog
implements OwMultiDocumentObjectPropertyViewListner, OwDocumentImportViewListener, com.wewebu.ow.server.ui.OwDialog.OwDialogListener, com.wewebu.ow.server.ui.OwJspConfigurable

Implementation of the Add Document Dialog.

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


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwDialog
com.wewebu.ow.server.ui.OwDialog.OwDialogListener
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
com.wewebu.ow.server.ui.OwLayout.OwDispatchRegion
 
Field Summary
protected  com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg
           
protected static int DIALOG_STATUS_FAILED
          status of this dialog: checkin failed
protected static int DIALOG_STATUS_NONE
          status of this dialog: nothing done yet
protected static int DIALOG_STATUS_OK
          status of this dialog: checkin successful
protected  OwMultiDocumentObjectAccessRightsView m_AccessRightsView
          the access rights view
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView m_classView
          reference to the used class view
protected  boolean m_deleteUploadDir
          should upload dir itself be deleted? just if it is the deploy dir of the app-server
protected  int m_dialogStatus
          status of this dialog needed for historization
protected  OwAddMultiDocumentsDocument m_document
          the document which is used by this dialog
protected  OwDocumentImportView m_documentImportView
          reference to the document importer view
protected  boolean m_fClassView
           
protected  int m_idxAccesRightsView
          index of tab AccessRightsView in m_SubNavigation
protected  int m_idxClassView
          index of tab ClassView in m_SubNavigation
protected  int m_idxPropertyView
          index of tab PropertyView in m_SubNavigation
protected  int m_iViewMask
          filters the views and behaviors to be displayed
protected  com.wewebu.ow.server.app.OwSubLayout m_Layout
          layout to be used for the dialog
protected  int m_MultipleDocumentsCurrentPos
           
protected  Map m_objectClassMap
          a Map of object class - subfolder mappings
protected  com.wewebu.ow.server.ecm.OwObject m_parentFolder
           
protected  boolean m_PerformDragDrop
           
protected  com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge m_propertyBridge
          the property view bridge
protected  com.wewebu.ow.server.app.OwClientRefreshContext m_RefreshCtx
          refresh context for callback
protected  String m_strParentObjectClass
          Deprecated. will be replaced with classSelectionCfg
protected  com.wewebu.ow.server.app.OwSubNavigationView m_SubNavigation
          navigation view to navigate through the subviews
protected  Map m_ValuesMap
          a set of properties that should be set as default for the new object
static int VIEW_MASK_ACCESS_RIGHTS
          mask value for the access rights view
static int VIEW_MASK_AUTOOPEN
          mask value for auto open
static int VIEW_MASK_CHECKIN_MODE_OPTION
          view flag
static int VIEW_MASK_ENABLE_PASTE_METADATA
          mask value to enable paste metadata in property view
static int VIEW_MASK_ENABLE_SAVE_ALL
          view flag to enable save all button option when more than one documents are selected
static int VIEW_MASK_MULTIPLEFILE_UPLOAD
          view flag
static int VIEW_MASK_RELEASE_VERSION_DEFAULT
          view flag
static int VIEW_MASK_RELEASE_VERSION_OPTION
          view flag
 
Fields inherited from class com.wewebu.ow.server.app.OwStandardDialog
CLOSE_BTN_REGION, FOOTER_REGION, HELP_BTN_REGION, INFO_ICON_REGION, LEFT_REGION, m_strHelpPath, m_strInfoIconURL, m_strTitle, MAIN_REGION, MENU_REGION, RIGHT_REGION, STANDARD_DIALOG_REGION_MAX, TITLE_REGION
 
Fields inherited from class com.wewebu.ow.server.ui.OwDialog
m_iDEBUG_DocumentViewSize, m_iDEBUG_InitDocument, m_iDEBUG_TargetCount, m_Listener
 
Fields inherited from class com.wewebu.ow.server.ui.OwLayout
m_Regions
 
Fields inherited from class com.wewebu.ow.server.ui.OwView
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwCreateMultipleDocumentsDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p, com.wewebu.ow.server.ecm.OwResource resource_p, com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg, Collection batchIndexProperties_p, List documentImporters_p)
          create new OwCreateMultipleDocumentsDialog
OwCreateMultipleDocumentsDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p, com.wewebu.ow.server.ecm.OwResource resource_p, String strClassName_p, String strParentObjectClass_p, Collection batchIndexProperties_p, List documentImporters_p)
          Deprecated. will be replaced with OwCreateMultipleDocumentsDialog(OwObject, OwResource, OwObjectClassSelectionCfg, Collection, List)
 
Method Summary
protected  void changeObjectClass(String objectClass_p)
          Helper method for changing the ObjectClass(=DocumentClass) of skeleton.
protected  void cleanup()
          Cleanup all resources acquired by this dialog.
protected  void close()
          Execute the close of current dialog only if given state allows a closeDialog call.
 void closeDialog()
          close the dialog overwritten method to close the preview
protected  OwAddMultiDocumentsDocument createDocument(com.wewebu.ow.server.ecm.OwResource resource_p, com.wewebu.ow.server.ecm.OwObject folderObj_p)
          (overridable) Create the Document to be used for current Dialog
protected  OwDocumentImportView createDocumentImporterView()
          overridable factory method
protected  com.wewebu.ow.server.app.OwDocumentImportItemContentCollection createDocumentImportItemContentCollection(com.wewebu.ow.server.app.OwDocumentImportItem importedDocument_p)
          overridable factory method
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectPropertyFormularView createFormBasedView()
          Create a form view, with the given JSP file.
protected  com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createFormPropertyViewBridge()
          Create an OwPropertyViewBridge object based on a JSP file.
protected  OwMultiDocumentObjectAccessRightsView createMultiDocumentObjectAccessRightsView()
          overridable factory method
protected  OwMultiDocumentObjectPropertyView createMultiDocumentObjectPropertyView()
          overridable factory method
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView createObjectClassView(com.wewebu.ow.server.ecm.OwResource resource_p, int iObjectType_p, com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg)
          overridable factory method
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView createObjectClassView(com.wewebu.ow.server.ecm.OwResource resource_p, int iObjectType_p, String strParentObjectClass_p)
          Deprecated. replaced by createObjectClassView(OwResource, int, OwObjectClassSelectionCfg)
protected  com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createPropertyViewBridge()
          Creates the OwPropertyViewBridge
protected  com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createStandardPropertyViewBridge()
          Creates an OwPropertyViewBridge that use standard way for properties rendering.
protected  com.wewebu.ow.server.app.OwSubLayout createSubLayout()
          overridable factory method
protected  com.wewebu.ow.server.app.OwSubNavigationView createSubNavigationView()
          overridable factory method
 void detach()
          remove view and all subviews from context
protected  Collection getBatchIndexProperties()
          get a collection of property names that act in batch processing
 com.wewebu.ow.server.app.OwJspFormConfigurator getJspConfigurator()
           
protected  String getNamePropertyValue(com.wewebu.ow.server.app.OwDocumentImportItem importer_p)
          Get a String which is used as name property value.
protected  com.wewebu.ow.server.app.OwStandardDialog getPostProcessingDialog()
          (overridable) Return the dialog which should be used for the post process view.
protected  boolean getPreviewOpenend()
          check if preview window was opened
protected  List getPropertyInfos()
          Return the property info list which was defined through the setPropertyInfos(List) call.
 int getStatus()
          get the current status of this dialog
 String getTitle()
          overridable to display the title of the dialog
protected  Collection getUsedPropertyInfoList()
          Return the list which should be used for the properties view, of the dialog.
protected  boolean hasClassToFolderMapping()
          If there is a mapping between Classes and Folders, documents of a given class should be saved in the same folder as specified by the mapping in m_objectClassMap.
protected  boolean hasViewMask(int iViewMask_p)
          check if view should be displayed or is masked out
protected  void init()
          init the target after the context is set.
 boolean isImporterBeforeBatchHandling()
          Get the order to process properties propagation.
 boolean isPostProcessDialogOpen()
          Flag notifying if a post process dialog was/is open.
 boolean isRegion(int iRegion_p)
          determine if region contains a view
 boolean isSaveAllEnabled()
          check if the Save all button should be enabled.
protected  void onBatchImportError(Exception e_p, com.wewebu.ow.server.app.OwDocumentImportItem importedDocument_p, List skippedDocuments_p, List addedDocuments_p, List addedDocumentsNames_p)
          Called when one of the documents in a batch import fails to import.
 void onCancel()
          overridable called when user clicks cancel button, and returns to last opened view.
 void onClose(javax.servlet.http.HttpServletRequest request_p)
          Invoked by the framework whenever this dialog is closed
 void onDialogClose(com.wewebu.ow.server.ui.OwDialog dialog_p)
          Handles the close event of post processing dialog.
 void onDocumentImported()
          Document imported listener.
 void onPostProcessingDialogClose(com.wewebu.ow.server.ui.OwDialog dialog_p)
          (overridable) Handles the close event of post process dialog.
 void onSaveAllDocument()
          overridable called when user clicks save and all properties are correct
 void onSaveDocument()
          overridable called when user clicks save and all properties are correct
 void onUpdate(com.wewebu.ow.server.ui.OwEventTarget caller_p, int iCode_p, Object param_p)
           
protected  void openPostProcessDialog(com.wewebu.ow.server.app.OwDocumentImporter importer_p, com.wewebu.ow.server.ecm.OwObject obj_p)
          Method which is called after processing of documents, if the dependent document importer has a post process view for OwDocumentImporter.IMPORT_CONTEXT_NEW.
protected  void postOnSaveMessage(List addedItems_p, List addedDocumentNames_p, List skippedItems_p, boolean isSaveAll_p)
          (overridable) creates and posts a message to be displayed after the onSaveAllDocument() or onSaveDocument() was performed
protected  com.wewebu.ow.server.ecm.OwObject prepareParentFolder(com.wewebu.ow.server.app.OwMainAppContext context_p, String documentClassName_p)
          This method prepares the parent folder for the currently processed document (m_MultipleDocumentsCurrentPos).
protected  void previewDocument(int iIndex_p)
          open the preview dialog for a document
protected  boolean processDocument(com.wewebu.ow.server.app.OwDocumentImportItem document_p)
          (overridable)
protected  void propagateDocumentImporterData(com.wewebu.ow.server.app.OwDocumentImportItem importItem_p, com.wewebu.ow.server.ecm.OwObject objSkeleton_p)
          Propagation of data from the importer to current skeleton object.
protected  void provideValuesMap(com.wewebu.ow.server.ecm.OwObject objSkeleton_p)
          Provide the map of values to the given skeleton object.
 void renderRegion(Writer w_p, int iRegion_p)
          render the views of the region
protected  void setBatchProperties(com.wewebu.ow.server.ecm.OwPropertyCollection batchPropertiesSource_p, com.wewebu.ow.server.ecm.OwObject object_p)
          Sets the batch properties with values from the source attribute to the specified object
protected  void setCheckinHandling(com.wewebu.ow.server.dmsdialogs.views.OwCheckInHandler handler_p)
          Set the CheckInHandler regarding on current skeleton object and depending OwDocumentImportItem
 void setFolderMapping(Map objectClassMap_p)
          Define a Map of object class - subfolder mappings
 void setImporterBeforeBatchHandling(boolean flag_p)
          Set the properties propagation flag.
 void setJspConfigurator(com.wewebu.ow.server.app.OwJspFormConfigurator jspFormConfigurator_p)
           
 void setObjectClassProcessor(com.wewebu.ow.server.dmsdialogs.views.OwObjectClassProcessor objClassProcessor)
          Set an objClassProcessor instance, which should be used before skeleton creation.
protected  void setPostProcessDailogOpen(boolean flagDlgOpen_p)
          Set the flag to notify that currently a post process dialog was/is open.
 void setPropertyInfos(List propertyInfos_p)
          set a property info list defining the visibility and writability of property values that is passed on to the PropertyView.
 void setRefreshContext(com.wewebu.ow.server.app.OwClientRefreshContext pluginRefreshCtx_p)
          set a plugin refresh callback interface
protected  void setSkeletonNameProperty(com.wewebu.ow.server.ecm.OwObject objSkeleton_p, com.wewebu.ow.server.app.OwDocumentImportItem importerItem_p)
          Set the name property of given skeleton object, retrieving the value from the document importer item.
 void setUseImporterProposedName(boolean useImporterProposedName_p)
          Set flag for proposed Name handling during creation.
 void setValues(Map properties_p)
          submit a set of values that should be set as default for the new object
 void setViewMask(int iViewMask_p)
          determine the views to be displayed by masking them with their flag
protected  String storeDocument(com.wewebu.ow.server.ecm.OwContentCollection content_p, String strMimeType_p, String strMimeParameter_p, Object checkinMode_p, boolean fReleaseVersion_p)
          called by onSaveDocument when a user clicks on 'save' in the properties view
 boolean useImporterProposedName()
          Get notification if proposed name or display name of OwDocumentImportItem should be used.
 
Methods inherited from class com.wewebu.ow.server.app.OwStandardDialog
getInfoIcon, hasHelpButton, onHelp, onRender, renderCloseButton, renderHelpButton, setHelp, setInfoIcon, setTitle
 
Methods inherited from class com.wewebu.ow.server.ui.OwDialog
setListener
 
Methods inherited from class com.wewebu.ow.server.ui.OwLayout
addRegion, addView, addView, addViewReference, getIterator, getViewRegion, isRegionMaximized, isRegionMinimized, isRegionNormal, renderNamedRegion
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getViewList, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, render, renderHTMLFormular, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_MASK_ENABLE_PASTE_METADATA

public static final int VIEW_MASK_ENABLE_PASTE_METADATA
mask value to enable paste metadata in property view

See Also:
Constant Field Values

VIEW_MASK_ACCESS_RIGHTS

public static final int VIEW_MASK_ACCESS_RIGHTS
mask value for the access rights view

See Also:
Constant Field Values

VIEW_MASK_AUTOOPEN

public static final int VIEW_MASK_AUTOOPEN
mask value for auto open

See Also:
Constant Field Values

VIEW_MASK_MULTIPLEFILE_UPLOAD

public static final int VIEW_MASK_MULTIPLEFILE_UPLOAD
view flag

See Also:
Constant Field Values

VIEW_MASK_CHECKIN_MODE_OPTION

public static final int VIEW_MASK_CHECKIN_MODE_OPTION
view flag

See Also:
Constant Field Values

VIEW_MASK_RELEASE_VERSION_OPTION

public static final int VIEW_MASK_RELEASE_VERSION_OPTION
view flag

See Also:
Constant Field Values

VIEW_MASK_RELEASE_VERSION_DEFAULT

public static final int VIEW_MASK_RELEASE_VERSION_DEFAULT
view flag

See Also:
Constant Field Values

VIEW_MASK_ENABLE_SAVE_ALL

public static final int VIEW_MASK_ENABLE_SAVE_ALL
view flag to enable save all button option when more than one documents are selected

See Also:
Constant Field Values

DIALOG_STATUS_NONE

protected static final int DIALOG_STATUS_NONE
status of this dialog: nothing done yet

See Also:
Constant Field Values

DIALOG_STATUS_OK

protected static final int DIALOG_STATUS_OK
status of this dialog: checkin successful

See Also:
Constant Field Values

DIALOG_STATUS_FAILED

protected static final int DIALOG_STATUS_FAILED
status of this dialog: checkin failed

See Also:
Constant Field Values

m_dialogStatus

protected int m_dialogStatus
status of this dialog needed for historization


m_Layout

protected com.wewebu.ow.server.app.OwSubLayout m_Layout
layout to be used for the dialog


m_SubNavigation

protected com.wewebu.ow.server.app.OwSubNavigationView m_SubNavigation
navigation view to navigate through the subviews


m_document

protected OwAddMultiDocumentsDocument m_document
the document which is used by this dialog


m_documentImportView

protected OwDocumentImportView m_documentImportView
reference to the document importer view


m_classView

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView m_classView
reference to the used class view


m_AccessRightsView

protected OwMultiDocumentObjectAccessRightsView m_AccessRightsView
the access rights view


m_propertyBridge

protected com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge m_propertyBridge
the property view bridge

Since:
3.1.0.0

m_idxClassView

protected int m_idxClassView
index of tab ClassView in m_SubNavigation

Since:
2.5.2.0

m_idxAccesRightsView

protected int m_idxAccesRightsView
index of tab AccessRightsView in m_SubNavigation

Since:
2.5.2.0

m_idxPropertyView

protected int m_idxPropertyView
index of tab PropertyView in m_SubNavigation

Since:
2.5.2.0

m_parentFolder

protected com.wewebu.ow.server.ecm.OwObject m_parentFolder

m_objectClassMap

protected Map m_objectClassMap
a Map of object class - subfolder mappings


m_PerformDragDrop

protected boolean m_PerformDragDrop

m_MultipleDocumentsCurrentPos

protected int m_MultipleDocumentsCurrentPos

m_deleteUploadDir

protected boolean m_deleteUploadDir
should upload dir itself be deleted? just if it is the deploy dir of the app-server


m_RefreshCtx

protected com.wewebu.ow.server.app.OwClientRefreshContext m_RefreshCtx
refresh context for callback


m_strParentObjectClass

protected String m_strParentObjectClass
Deprecated. will be replaced with classSelectionCfg
name of class to start from or null to start browsing from root


classSelectionCfg

protected com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg

m_ValuesMap

protected Map m_ValuesMap
a set of properties that should be set as default for the new object


m_iViewMask

protected int m_iViewMask
filters the views and behaviors to be displayed


m_fClassView

protected boolean m_fClassView
Constructor Detail

OwCreateMultipleDocumentsDialog

public OwCreateMultipleDocumentsDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p,
                                       com.wewebu.ow.server.ecm.OwResource resource_p,
                                       String strClassName_p,
                                       String strParentObjectClass_p,
                                       Collection batchIndexProperties_p,
                                       List documentImporters_p)
                                throws Exception
Deprecated. will be replaced with OwCreateMultipleDocumentsDialog(OwObject, OwResource, OwObjectClassSelectionCfg, Collection, List)

create new OwCreateMultipleDocumentsDialog

Parameters:
folderObject_p - OwObject parent to create the new object in or null to use a default location.
batchIndexProperties_p -
documentImporters_p - List of OwDocumentImporter objects
Throws:
Exception

OwCreateMultipleDocumentsDialog

public OwCreateMultipleDocumentsDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p,
                                       com.wewebu.ow.server.ecm.OwResource resource_p,
                                       com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg,
                                       Collection batchIndexProperties_p,
                                       List documentImporters_p)
                                throws Exception
create new OwCreateMultipleDocumentsDialog

Parameters:
folderObject_p - OwObject parent to create the new object in or null to use a default location.
batchIndexProperties_p -
documentImporters_p - List of OwDocumentImporter objects
Throws:
Exception
Since:
4.1.0.0
Method Detail

createDocument

protected OwAddMultiDocumentsDocument createDocument(com.wewebu.ow.server.ecm.OwResource resource_p,
                                                     com.wewebu.ow.server.ecm.OwObject folderObj_p)
(overridable) Create the Document to be used for current Dialog

Parameters:
resource_p - OwResource resource to use if parent is null
folderObj_p - OwObject parent
Returns:
OwAddMultiDocumentsDocument
Since:
3.1.0.0

getPreviewOpenend

protected boolean getPreviewOpenend()
check if preview window was opened


getBatchIndexProperties

protected Collection getBatchIndexProperties()
get a collection of property names that act in batch processing

Returns:
Collection of String

getStatus

public int getStatus()
get the current status of this dialog

Returns:
the status

hasViewMask

protected boolean hasViewMask(int iViewMask_p)
check if view should be displayed or is masked out

Parameters:
iViewMask_p - bitmask according to VIEW_MASK_SYSTEM_... flags

setViewMask

public void setViewMask(int iViewMask_p)
determine the views to be displayed by masking them with their flag

Parameters:
iViewMask_p - bitmask according to VIEW_MASK_SYSTEM_... flags

setRefreshContext

public void setRefreshContext(com.wewebu.ow.server.app.OwClientRefreshContext pluginRefreshCtx_p)
set a plugin refresh callback interface

Parameters:
pluginRefreshCtx_p - OwClientRefreshContext

setValues

public void setValues(Map properties_p)
submit a set of values that should be set as default for the new object

Parameters:
properties_p - Map of values keyed by parameter names to be set initially

setPropertyInfos

public void setPropertyInfos(List propertyInfos_p)
set a property info list defining the visibility and writability of property values that is passed on to the PropertyView.

Parameters:
propertyInfos_p - list of OwPropertyInfo objects that are passed to the PropertyView

createMultiDocumentObjectPropertyView

protected OwMultiDocumentObjectPropertyView createMultiDocumentObjectPropertyView()
                                                                           throws Exception
overridable factory method

Returns:
OwMultiDocumentObjectPropertyView
Throws:
Exception

createMultiDocumentObjectAccessRightsView

protected OwMultiDocumentObjectAccessRightsView createMultiDocumentObjectAccessRightsView()
                                                                                   throws Exception
overridable factory method

Returns:
OwMultiDocumentObjectAccessRightsView
Throws:
Exception

createObjectClassView

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView createObjectClassView(com.wewebu.ow.server.ecm.OwResource resource_p,
                                                                                        int iObjectType_p,
                                                                                        String strParentObjectClass_p)
                                                                                 throws Exception
Deprecated. replaced by createObjectClassView(OwResource, int, OwObjectClassSelectionCfg)

overridable factory method

Parameters:
resource_p - the OwResource to get the classes from
iObjectType_p - int object to browse for
strParentObjectClass_p - String name of class to start from or null to start browsing from root
Returns:
OwObjectClassView
Throws:
Exception

createObjectClassView

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView createObjectClassView(com.wewebu.ow.server.ecm.OwResource resource_p,
                                                                                        int iObjectType_p,
                                                                                        com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg)
                                                                                 throws Exception
overridable factory method

Parameters:
resource_p - the OwResource to get the classes from
iObjectType_p - int object to browse for
classSelectionCfg -
Returns:
OwObjectClassView
Throws:
Exception
Since:
4.1.0.0

createDocumentImportItemContentCollection

protected com.wewebu.ow.server.app.OwDocumentImportItemContentCollection createDocumentImportItemContentCollection(com.wewebu.ow.server.app.OwDocumentImportItem importedDocument_p)
                                                                                                            throws Exception
overridable factory method

Returns:
OwMultiDocumentsSaveDlgContentCollection
Throws:
Exception

createSubLayout

protected com.wewebu.ow.server.app.OwSubLayout createSubLayout()
                                                        throws Exception
overridable factory method

Returns:
OwSubLayout
Throws:
Exception

createSubNavigationView

protected com.wewebu.ow.server.app.OwSubNavigationView createSubNavigationView()
                                                                        throws Exception
overridable factory method

Returns:
OwSubNavigationView
Throws:
Exception

createDocumentImporterView

protected OwDocumentImportView createDocumentImporterView()
                                                   throws Exception
overridable factory method

Throws:
Exception

setFolderMapping

public void setFolderMapping(Map objectClassMap_p)
Define a Map of object class - subfolder mappings

List of object class mappings to be used.
Each object class is mapped to a subfolder path, where the key is the objectclass and the value is the folder name to be created.


init

protected void init()
             throws Exception
init the target after the context is set.

Overrides:
init in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

createPropertyViewBridge

protected com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createPropertyViewBridge()
                                                                                 throws Exception
Creates the OwPropertyViewBridge

Returns:
the newly created OwPropertyViewBridge object.
Throws:
Exception

createStandardPropertyViewBridge

protected com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createStandardPropertyViewBridge()
                                                                                         throws Exception
Creates an OwPropertyViewBridge that use standard way for properties rendering.

Returns:
- the newly created OwPropertyViewBridge object
Throws:
Exception
Since:
3.1.0.0

createFormPropertyViewBridge

protected com.wewebu.ow.server.dmsdialogs.OwPropertyViewBridge createFormPropertyViewBridge()
Create an OwPropertyViewBridge object based on a JSP file.

Returns:
the newly created OwPropertyViewBridge
Since:
3.1.0.0

createFormBasedView

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectPropertyFormularView createFormBasedView()
Create a form view, with the given JSP file.

Returns:
OwAddMultiDocumentsPropertyFormView document.
Since:
3.1.0.0

detach

public void detach()
remove view and all subviews from context

Overrides:
detach in class com.wewebu.ow.server.ui.OwView

getTitle

public String getTitle()
overridable to display the title of the dialog

Specified by:
getTitle in interface com.wewebu.ow.server.ui.OwBaseView
Overrides:
getTitle in class com.wewebu.ow.server.app.OwStandardDialog
Returns:
title

renderRegion

public void renderRegion(Writer w_p,
                         int iRegion_p)
                  throws Exception
render the views of the region

Specified by:
renderRegion in interface com.wewebu.ow.server.ui.OwBaseView
Overrides:
renderRegion in class com.wewebu.ow.server.app.OwStandardDialog
Parameters:
w_p - Writer object to write HTML to
iRegion_p - ID of the region to render
Throws:
Exception

isRegion

public boolean isRegion(int iRegion_p)
determine if region contains a view

Specified by:
isRegion in interface com.wewebu.ow.server.ui.OwBaseView
Overrides:
isRegion in class com.wewebu.ow.server.app.OwStandardDialog
Parameters:
iRegion_p - ID of the region to render
Returns:
true if region contains anything and should be rendered

onUpdate

public void onUpdate(com.wewebu.ow.server.ui.OwEventTarget caller_p,
                     int iCode_p,
                     Object param_p)
              throws Exception
Specified by:
onUpdate in interface com.wewebu.ow.server.ui.OwUpdateTarget
Overrides:
onUpdate in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

cleanup

protected void cleanup()
                throws Exception
Cleanup all resources acquired by this dialog.

Throws:
Exception

onClose

public void onClose(javax.servlet.http.HttpServletRequest request_p)
             throws Exception
Invoked by the framework whenever this dialog is closed

Overrides:
onClose in class com.wewebu.ow.server.app.OwStandardDialog
Throws:
Exception

onCancel

public void onCancel()
              throws Exception
Description copied from interface: OwMultiDocumentObjectPropertyViewListner
overridable called when user clicks cancel button, and returns to last opened view.

Attention this interface will be not deleted, but it will be refactored for consistent rendering and working of cancel operations.

Specified by:
onCancel in interface OwMultiDocumentObjectPropertyViewListner
Throws:
Exception

onSaveDocument

public void onSaveDocument()
                    throws Exception
Description copied from interface: OwMultiDocumentObjectPropertyViewListner
overridable called when user clicks save and all properties are correct

Specified by:
onSaveDocument in interface OwMultiDocumentObjectPropertyViewListner
Throws:
Exception

setBatchProperties

protected void setBatchProperties(com.wewebu.ow.server.ecm.OwPropertyCollection batchPropertiesSource_p,
                                  com.wewebu.ow.server.ecm.OwObject object_p)
Sets the batch properties with values from the source attribute to the specified object

Parameters:
batchPropertiesSource_p - collection of valued-properties to be set if they match the batched properties
object_p - OwObject to set the properties to

onSaveAllDocument

public void onSaveAllDocument()
                       throws Exception
Description copied from interface: OwMultiDocumentObjectPropertyViewListner
overridable called when user clicks save and all properties are correct

Specified by:
onSaveAllDocument in interface OwMultiDocumentObjectPropertyViewListner
Throws:
Exception

onBatchImportError

protected void onBatchImportError(Exception e_p,
                                  com.wewebu.ow.server.app.OwDocumentImportItem importedDocument_p,
                                  List skippedDocuments_p,
                                  List addedDocuments_p,
                                  List addedDocumentsNames_p)
                           throws Exception
Called when one of the documents in a batch import fails to import. If you want the import process to be stopped then throw an exception, otherwise the process will continue with the next OwDocumentImportItem.

Parameters:
e_p -
importedDocument_p -
skippedDocuments_p -
addedDocuments_p -
addedDocumentsNames_p -
Throws:
Exception
Since:
3.1.0.3
See Also:
onSaveAllDocument()

storeDocument

protected String storeDocument(com.wewebu.ow.server.ecm.OwContentCollection content_p,
                               String strMimeType_p,
                               String strMimeParameter_p,
                               Object checkinMode_p,
                               boolean fReleaseVersion_p)
                        throws Exception
called by onSaveDocument when a user clicks on 'save' in the properties view

Parameters:
content_p - OwContentCollection
strMimeType_p - String
strMimeParameter_p - String
checkinMode_p - optional Object, used with checkin operation only, can be null
fReleaseVersion_p - optional boolean flag to create a release version, used with checkin operation only
Returns:
String DMSID of created object
Throws:
Exception

prepareParentFolder

protected com.wewebu.ow.server.ecm.OwObject prepareParentFolder(com.wewebu.ow.server.app.OwMainAppContext context_p,
                                                                String documentClassName_p)
                                                         throws Exception
This method prepares the parent folder for the currently processed document (m_MultipleDocumentsCurrentPos).

Parameters:
context_p -
documentClassName_p -
Returns:
the parent folder to be used for this new document. The callers can rely on the parent folder being created by these method if needed.
Throws:
Exception
Since:
3.1.0.3

hasClassToFolderMapping

protected final boolean hasClassToFolderMapping()
If there is a mapping between Classes and Folders, documents of a given class should be saved in the same folder as specified by the mapping in m_objectClassMap.

Returns:
true if the folder is to be chosen based on the document's class.
Since:
3.1.0.3

previewDocument

protected void previewDocument(int iIndex_p)
                        throws Exception
open the preview dialog for a document

Parameters:
iIndex_p - int Position of document to preview in OwAddMultiDocumentsDocument.getUploadedFilename
Throws:
Exception

closeDialog

public void closeDialog()
                 throws Exception
close the dialog overwritten method to close the preview

Overrides:
closeDialog in class com.wewebu.ow.server.ui.OwDialog
Throws:
Exception

onDocumentImported

public void onDocumentImported()
Document imported listener. Resets the active status of the Save All action in the property view.

Specified by:
onDocumentImported in interface OwDocumentImportViewListener

isSaveAllEnabled

public boolean isSaveAllEnabled()
check if the Save all button should be enabled.

This method analyze the viewmask VIEW_MASK_ENABLE_SAVE_ALL and also if a post process view is enabled for imported documents

Returns:
boolean
Since:
2.5.2.0

getPostProcessingDialog

protected com.wewebu.ow.server.app.OwStandardDialog getPostProcessingDialog()
(overridable) Return the dialog which should be used for the post process view.

Returns:
OwStandardDialog to open as post processing dialog (non-null)
Since:
2.5.2.0

onPostProcessingDialogClose

public void onPostProcessingDialogClose(com.wewebu.ow.server.ui.OwDialog dialog_p)
                                 throws Exception
(overridable) Handles the close event of post process dialog. By default this method is empty and do nothing, it can be overwritten if close event notification subscription is needed

Parameters:
dialog_p - OwDialog used for post processing
Throws:
Exception
Since:
2.5.2.0

changeObjectClass

protected void changeObjectClass(String objectClass_p)
                          throws Exception
Helper method for changing the ObjectClass(=DocumentClass) of skeleton. Set the new ObjectClass only if object class name is valid for current context.

ATTENTION: After calling this method an onUpdate(caller, OwUpateCodes.SET_NEW_OBJECT, param) event will occur.

Parameters:
objectClass_p - String symbolic name of Document-/ObjectClass.
Throws:
Exception
Since:
2.5.2.0

setCheckinHandling

protected void setCheckinHandling(com.wewebu.ow.server.dmsdialogs.views.OwCheckInHandler handler_p)
                           throws Exception
Set the CheckInHandler regarding on current skeleton object and depending OwDocumentImportItem

Parameters:
handler_p - OwCheckInHandler
Throws:
Exception
Since:
3.1.0.0

openPostProcessDialog

protected void openPostProcessDialog(com.wewebu.ow.server.app.OwDocumentImporter importer_p,
                                     com.wewebu.ow.server.ecm.OwObject obj_p)
                              throws Exception
Method which is called after processing of documents, if the dependent document importer has a post process view for OwDocumentImporter.IMPORT_CONTEXT_NEW.

Parameters:
importer_p - OwDoucmentImporter (non-null)
obj_p - OwObject currently processed object (non-null)
Throws:
Exception - if there are problems opening the post process dialog
Since:
2.5.2.0

onDialogClose

public final void onDialogClose(com.wewebu.ow.server.ui.OwDialog dialog_p)
                         throws Exception
Handles the close event of post processing dialog. This methods will call onPostProcessingDialogClose(OwDialog) before trying to close current OwCreateMultipleDocumentsDialog.

Specified by:
onDialogClose in interface com.wewebu.ow.server.ui.OwDialog.OwDialogListener
Throws:
Exception
Since:
2.5.2.0
See Also:
OwDialogListener.onDialogClose(OwDialog)

close

protected void close()
              throws Exception
Execute the close of current dialog only if given state allows a closeDialog call.

Throws:
Exception

isPostProcessDialogOpen

public boolean isPostProcessDialogOpen()
Flag notifying if a post process dialog was/is open.

Returns:
boolean
Since:
2.5.2.0

setPostProcessDailogOpen

protected void setPostProcessDailogOpen(boolean flagDlgOpen_p)
Set the flag to notify that currently a post process dialog was/is open.

Parameters:
flagDlgOpen_p - boolean true if dialog is open, else false
Since:
2.5.2.0

postOnSaveMessage

protected void postOnSaveMessage(List addedItems_p,
                                 List addedDocumentNames_p,
                                 List skippedItems_p,
                                 boolean isSaveAll_p)
                          throws Exception
(overridable) creates and posts a message to be displayed after the onSaveAllDocument() or onSaveDocument() was performed

Parameters:
addedItems_p - a List of OwDocumentImportItems that were added
addedDocumentNames_p - a List of String document names of the already added documents
skippedItems_p - a List of OwDocumentImportItems that were skipped from importing
isSaveAll_p - true if this is a message post after onSaveAllDocument() false otherwise
Throws:
Exception
Since:
3.0.0.0

processDocument

protected boolean processDocument(com.wewebu.ow.server.app.OwDocumentImportItem document_p)
                           throws com.wewebu.ow.server.exceptions.OwException
(overridable)

Parameters:
document_p - document to be processed before adding
Returns:
true if the given document should be created/added , false otherwise
Throws:
com.wewebu.ow.server.exceptions.OwException
Since:
3.0.0.0

propagateDocumentImporterData

protected void propagateDocumentImporterData(com.wewebu.ow.server.app.OwDocumentImportItem importItem_p,
                                             com.wewebu.ow.server.ecm.OwObject objSkeleton_p)
                                      throws Exception
Propagation of data from the importer to current skeleton object.

By default the non-existing properties of current skeleton will be ignored, and only matching properties will be set.

Parameters:
importItem_p - OwDocumentImporterItem to use for property propagation
objSkeleton_p - OwObject current skeleton
Throws:
Exception - if problem occur with setting data to skeleton object.
Since:
3.1.0.0

getJspConfigurator

public com.wewebu.ow.server.app.OwJspFormConfigurator getJspConfigurator()
Specified by:
getJspConfigurator in interface com.wewebu.ow.server.ui.OwJspConfigurable

setJspConfigurator

public void setJspConfigurator(com.wewebu.ow.server.app.OwJspFormConfigurator jspFormConfigurator_p)
Specified by:
setJspConfigurator in interface com.wewebu.ow.server.ui.OwJspConfigurable

setSkeletonNameProperty

protected void setSkeletonNameProperty(com.wewebu.ow.server.ecm.OwObject objSkeleton_p,
                                       com.wewebu.ow.server.app.OwDocumentImportItem importerItem_p)
                                throws Exception
Set the name property of given skeleton object, retrieving the value from the document importer item. Will do nothing if one of the parameter is null!

Parameters:
objSkeleton_p - OwObject can be null
importerItem_p - OwDocumentImportItem can be null
Throws:
Exception - if problem with retrieving or setting property
Since:
3.1.0.0

isImporterBeforeBatchHandling

public boolean isImporterBeforeBatchHandling()
Get the order to process properties propagation.

false: Batch properties will be propagated before importer properties

true: Importer properties will be propagated before batch properties

The second propagation can overwrite the first propagation.

Returns:
boolean by default false
Since:
3.1.0.0
See Also:
setImporterBeforeBatchHandling(boolean)

setImporterBeforeBatchHandling

public void setImporterBeforeBatchHandling(boolean flag_p)
Set the properties propagation flag.

false: Batch properties will be executed before importer propagation which can leads that some properties are overwritten, for true it is vice versa.

Parameters:
flag_p -
Since:
3.1.0.0

setUseImporterProposedName

public void setUseImporterProposedName(boolean useImporterProposedName_p)
Set flag for proposed Name handling during creation.

Parameters:
useImporterProposedName_p -
Since:
3.1.0.0

useImporterProposedName

public boolean useImporterProposedName()
Get notification if proposed name or display name of OwDocumentImportItem should be used.

Returns:
boolean
Since:
3.1.0.0
See Also:
getNamePropertyValue(OwDocumentImportItem)

getNamePropertyValue

protected String getNamePropertyValue(com.wewebu.ow.server.app.OwDocumentImportItem importer_p)
Get a String which is used as name property value.

Parameters:
importer_p - OwDocumentImporterItem
Returns:
String representing name for Name-Property
Since:
3.1.0.0

getUsedPropertyInfoList

protected Collection getUsedPropertyInfoList()
Return the list which should be used for the properties view, of the dialog.

By default the getPropertyInfos() is used if it is not null and size is greater than 0 (zero), else the document (OwView.getDocument()) property info list will be returned.

Returns:
List of OwObjectPropertyView.OwPropertyInfo objects
Since:
3.1.0.2

getPropertyInfos

protected List getPropertyInfos()
Return the property info list which was defined through the setPropertyInfos(List) call.

Returns:
List of OwObjectPropertyView.OwPropertyInfo objects, or null
Since:
3.1.0.2

provideValuesMap

protected void provideValuesMap(com.wewebu.ow.server.ecm.OwObject objSkeleton_p)
                         throws Exception
Provide the map of values to the given skeleton object.

Will lookup if a matching property exist in current skeleton and provide it with a specific value.

Parameters:
objSkeleton_p - OwObjectSkeleton to execute mapping on
Throws:
Exception - if getting property or setting value has problems
Since:
3.1.0.2

setObjectClassProcessor

public void setObjectClassProcessor(com.wewebu.ow.server.dmsdialogs.views.OwObjectClassProcessor objClassProcessor)
Set an objClassProcessor instance, which should be used before skeleton creation.

By default there will be no pre-processing of the object class, OwObjectClassProcessor = null.

Parameters:
objClassProcessor - OwObjectClassProcessor (can be null)
Since:
4.1.1.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.