com.wewebu.ow.server.dmsdialogs
Class OwCreateObjectDialog

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.dmsdialogs.OwCreateObjectDialog
All Implemented Interfaces:
OwObjectClassView.OwObjectClassViewListner, OwBaseView, OwConfigurableDialog, OwJspConfigurable, OwUpdateTarget
Direct Known Subclasses:
OwCreateObjectWithFormDialog

public class OwCreateObjectDialog
extends OwStandardDialog
implements OwObjectClassView.OwObjectClassViewListner, OwConfigurableDialog, OwJspConfigurable

Dialog for adding records or single folders to a folder.

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
OwDialog.OwDialogListener
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
OwLayout.OwDispatchRegion
 
Field Summary
protected  OwMultipanelAccessRightsView accessRightsView
          Access Rights view for access rights handling
protected  OwDelegateView delegateView
          Delegation View for JSP and default rendering of properties view
static int DIALOG_STATUS_FAILED
          status of this dialog: checkin failed
static int DIALOG_STATUS_NONE
          status of this dialog: nothing done yet
static int DIALOG_STATUS_OK
          status of this dialog: checkin successful
protected  OwObjectClassView m_classView
           
protected  OwXMLUtil m_configNode
          the configuration node
protected  int m_dialogStatus
          status of this dialog needed for historization
protected  OwObjectClass m_folderClass
          class to use for new folder
protected  OwObject m_folderObject
          selected object of record
protected  boolean m_fOpenObject
          open with new record
protected  OwSubLayout m_Layout
          layout to be used for the dialog
protected  String m_objectClassName
          class name
protected  Collection m_propertyInfos
          Collection of OwObjectPropertyView.OwPropertyInfo objects
protected  OwClientRefreshContext m_RefreshCtx
          refresh context for callback
protected  OwObjectSkeleton m_sceletonObject
          the new folder object
protected  String m_strObjectClass
          Deprecated. will be replaced by classSelectionCfg
protected  String m_strObjectClassParent
          Deprecated. will be replaced by classSelectionCfg
protected  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
protected  OwNavigationView.OwTabInfo propertiesTab
          Tab where the properties view is contained
protected  OwPropertyViewBridge propertyViewBridge
          the property view
 
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
OwCreateObjectDialog(OwObject folderObject_p, OwObjectClassSelectionCfg classSelectionCfg, boolean fOpenObject_p)
          create a record / folder create dialog
OwCreateObjectDialog(OwObject folderObject_p, String strClassName_p, String strObjectClassParent_p, boolean fOpenObject_p)
          Deprecated. will be replaced by OwCreateObjectDialog(OwObject, OwObjectClassSelectionCfg, boolean)
 
Method Summary
protected  String create()
          create the folder / record
protected  OwMultipanelAccessRightsView createAccessRightsView()
          (overridable) Factory for AccessRightsView, can be over written to initialize dialog with own access rights representation.
protected  OwDelegateView createDelegateView()
          (overridable) Create the instance which is used for delegation of Property View rendering.
protected  OwDocument createDocument()
          Factory method for document creation
 OwCreateObjectDialog createFormDialog()
           
protected  OwFormPropertyViewBridge createFormViewBridge()
          (overridable) Create a property view bridge with form rendering.
protected  OwObjectPropertyView createObjectPropertyView()
          overridable to create properties view
protected  OwPropertyViewBridge createPropertyViewBridge()
           
protected  OwStandardPropertyViewBridge createStandardViewBridge()
          (overridable) Create a standard property view bridge, for standard rendering.
 void detach()
          remove view and all subviews from context
protected  OwMultipanelAccessRightsView getAccessRightsView()
          Get method to retrieve the access rights view, which is responsible for rendering.
 OwXMLUtil getConfigNode()
          Get the associated OwXMLUtil object.
 OwJspFormConfigurator getJspConfigurator()
          Get the associated OwJspFormConfigurator object.
 OwObject getNewObject()
          get the newly created object
 OwObjectClassProcessor getObjectClassProcessor()
          Get ObjectClassProcessor for handling of skeleton creation.
Can return null if no processor was defined/configured.
 int getStatus()
          get the current status of this dialog
protected  void init()
          init the target after the context is set.
protected  void initTabOrder()
          (overridable) Called during init() method to assign the view order, in which the views should be processed.
 void onObjectClassViewSelectClass(OwObjectClass classDescription_p, String strPath_p)
          event called when user selects a class
 void onUpdate(OwEventTarget caller_p, int iCode_p, Object param_p)
          called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender.
 void setConfigNode(OwXMLUtil configNode_p)
          Set the associated OwXMLUtil object.
 void setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
          Set the associated OwJspFormConfigurator object.
 void setObjectClassProcessor(OwObjectClassProcessor objProc)
          Set/Provide an OwObjectClassProcessor.
 void setPropertyInfos(List propertyInfos_p)
          set a OwPropertyInfo list defining the visibility and writability of property values that is passed on to the PropertyView.
 void setRefreshContext(OwClientRefreshContext pluginRefreshCtx_p)
          set a plugin refresh callback interface
 void setValues(Map properties_p)
          submit a set of values that should be set as default for the new object
protected  void updateObjectClass()
          the object class for the folder was changed, update the skeleton
 
Methods inherited from class com.wewebu.ow.server.app.OwStandardDialog
getInfoIcon, getTitle, hasHelpButton, isRegion, onClose, onHelp, onRender, renderCloseButton, renderHelpButton, renderRegion, setHelp, setInfoIcon, setTitle
 
Methods inherited from class com.wewebu.ow.server.ui.OwDialog
closeDialog, 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

m_Layout

protected OwSubLayout m_Layout
layout to be used for the dialog


m_sceletonObject

protected OwObjectSkeleton m_sceletonObject
the new folder object


m_classView

protected OwObjectClassView m_classView

m_SubNavigation

protected OwSubNavigationView m_SubNavigation
navigation view to navigate through the subviews


propertyViewBridge

protected OwPropertyViewBridge propertyViewBridge
the property view


m_folderObject

protected OwObject m_folderObject
selected object of record


m_strObjectClass

protected String m_strObjectClass
Deprecated. will be replaced by classSelectionCfg
the initial class


m_strObjectClassParent

protected String m_strObjectClassParent
Deprecated. will be replaced by classSelectionCfg
parent object class from where the user can select, only useful if classes are structured in a tree


m_folderClass

protected OwObjectClass m_folderClass
class to use for new folder


m_RefreshCtx

protected OwClientRefreshContext m_RefreshCtx
refresh context for callback


m_fOpenObject

protected boolean m_fOpenObject
open with new record


m_ValuesMap

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


m_propertyInfos

protected Collection m_propertyInfos
Collection of OwObjectPropertyView.OwPropertyInfo objects


DIALOG_STATUS_NONE

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

See Also:
Constant Field Values

DIALOG_STATUS_OK

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

See Also:
Constant Field Values

DIALOG_STATUS_FAILED

public 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


delegateView

protected OwDelegateView delegateView
Delegation View for JSP and default rendering of properties view

Since:
3.1.0.0

propertiesTab

protected OwNavigationView.OwTabInfo propertiesTab
Tab where the properties view is contained

Since:
3.1.0.0

m_objectClassName

protected String m_objectClassName
class name


accessRightsView

protected OwMultipanelAccessRightsView accessRightsView
Access Rights view for access rights handling

Since:
3.1.0.0

m_configNode

protected OwXMLUtil m_configNode
the configuration node

Since:
3.1.0.0
Constructor Detail

OwCreateObjectDialog

public OwCreateObjectDialog(OwObject folderObject_p,
                            String strClassName_p,
                            String strObjectClassParent_p,
                            boolean fOpenObject_p)
Deprecated. will be replaced by OwCreateObjectDialog(OwObject, OwObjectClassSelectionCfg, boolean)

create a record / folder create dialog

Parameters:
folderObject_p - OwObject parent folder to add to
strClassName_p - class name to use for new folder, null = let user select a class
strObjectClassParent_p - String parent class to let user browse
fOpenObject_p - boolean open the new folder or false if folder should not be opened

OwCreateObjectDialog

public OwCreateObjectDialog(OwObject folderObject_p,
                            OwObjectClassSelectionCfg classSelectionCfg,
                            boolean fOpenObject_p)
create a record / folder create dialog

Parameters:
folderObject_p - OwObject parent folder to add to
classSelectionCfg -
fOpenObject_p - boolean open the new folder or false if folder should not be opened
Since:
4.1.0.0
Method Detail

createDocument

protected OwDocument createDocument()
Factory method for document creation

Returns:
the OwDocument object
Since:
3.1.0.0

getStatus

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

Returns:
the status

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 OwPropertyInfo 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
Since:
2.5.3.0

init

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

Overrides:
init in class OwView
Throws:
Exception

initTabOrder

protected void initTabOrder()
                     throws Exception
(overridable) Called during init() method to assign the view order, in which the views should be processed.

Overriding this method allow to change the order in which the views would appear, and also gives the possibility to create additional views.

Throws:
Exception
Since:
3.1.0.0

createPropertyViewBridge

protected OwPropertyViewBridge createPropertyViewBridge()
                                                 throws Exception
Throws:
Exception

createFormViewBridge

protected OwFormPropertyViewBridge createFormViewBridge()
(overridable) Create a property view bridge with form rendering.

Returns:
OwFormPropertViewBridge
Since:
3.1.0.0
See Also:
getJspConfigurator()

createStandardViewBridge

protected OwStandardPropertyViewBridge createStandardViewBridge()
                                                         throws Exception
(overridable) Create a standard property view bridge, for standard rendering.

Returns:
OwStandardPropertyViewBridge
Throws:
Exception - if cannot create object property view
Since:
3.1.0.0
See Also:
createObjectPropertyView()

createObjectPropertyView

protected OwObjectPropertyView createObjectPropertyView()
                                                 throws Exception
overridable to create properties view

Returns:
OwObjectPropertyView
Throws:
Exception
Since:
2.5.2.0

detach

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

Overrides:
detach in class OwView

getNewObject

public OwObject getNewObject()
                      throws Exception
get the newly created object

Throws:
Exception

onUpdate

public void onUpdate(OwEventTarget caller_p,
                     int iCode_p,
                     Object param_p)
              throws Exception
called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender. onUpdate is always called before all onRender methods.

Specified by:
onUpdate in interface OwUpdateTarget
Overrides:
onUpdate in class OwView
Parameters:
caller_p - OwEventTarget target that called update
iCode_p - int optional reason code
param_p - Object optional parameter representing the refresh, depends on the value of iCode_p, can be null
Throws:
Exception

setRefreshContext

public void setRefreshContext(OwClientRefreshContext pluginRefreshCtx_p)
set a plugin refresh callback interface

Parameters:
pluginRefreshCtx_p - OwClientRefreshContext

create

protected String create()
                 throws Exception
create the folder / record

Returns:
String DMSID of new object
Throws:
Exception

updateObjectClass

protected void updateObjectClass()
                          throws Exception
the object class for the folder was changed, update the skeleton

Throws:
Exception

onObjectClassViewSelectClass

public void onObjectClassViewSelectClass(OwObjectClass classDescription_p,
                                         String strPath_p)
                                  throws Exception
event called when user selects a class

Specified by:
onObjectClassViewSelectClass in interface OwObjectClassView.OwObjectClassViewListner
Parameters:
classDescription_p - OwObjectClass
strPath_p - String path to selected tree item
Throws:
Exception

createFormDialog

public OwCreateObjectDialog createFormDialog()

setConfigNode

public void setConfigNode(OwXMLUtil configNode_p)
Description copied from interface: OwConfigurableDialog
Set the associated OwXMLUtil object. Can be null.

Specified by:
setConfigNode in interface OwConfigurableDialog

setJspConfigurator

public void setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
Description copied from interface: OwJspConfigurable
Set the associated OwJspFormConfigurator object. Can be null.

Specified by:
setJspConfigurator in interface OwJspConfigurable

getConfigNode

public OwXMLUtil getConfigNode()
Description copied from interface: OwConfigurableDialog
Get the associated OwXMLUtil object. Can be null.

Specified by:
getConfigNode in interface OwConfigurableDialog
Returns:
the associated OwXMLUtil object. Can be null.

getJspConfigurator

public OwJspFormConfigurator getJspConfigurator()
Description copied from interface: OwJspConfigurable
Get the associated OwJspFormConfigurator object. Can be null.

Specified by:
getJspConfigurator in interface OwJspConfigurable
Returns:
the associated OwJspFormConfigurator object or null.

createAccessRightsView

protected OwMultipanelAccessRightsView createAccessRightsView()
(overridable) Factory for AccessRightsView, can be over written to initialize dialog with own access rights representation.

Returns:
OwMultipanelAccessRightsView
Since:
3.1.0.0

getAccessRightsView

protected OwMultipanelAccessRightsView getAccessRightsView()
Get method to retrieve the access rights view, which is responsible for rendering.

Returns:
OwMultipanelAccessRightsView
Since:
3.1.0.0

createDelegateView

protected OwDelegateView createDelegateView()
(overridable) Create the instance which is used for delegation of Property View rendering.

Returns:
OwDelegateView
Since:
3.1.0.0

setObjectClassProcessor

public void setObjectClassProcessor(OwObjectClassProcessor objProc)
Set/Provide an OwObjectClassProcessor.

Parameters:
objProc - OwObjectClassProcessor
Since:
4.1.1.0

getObjectClassProcessor

public OwObjectClassProcessor getObjectClassProcessor()
Get ObjectClassProcessor for handling of skeleton creation.
Can return null if no processor was defined/configured.

Returns:
OwObjectClassProcessor or null
Since:
4.1.1.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.