com.wewebu.ow.server.plug.owaddobject
Class OwAddObjectRecordFunction

java.lang.Object
  extended by com.wewebu.ow.server.app.OwFunction
      extended by com.wewebu.ow.server.app.OwRecordFunction
          extended by com.wewebu.ow.server.plug.owaddobject.OwAddObjectRecordFunction
All Implemented Interfaces:
com.wewebu.ow.server.app.OwPlugin, com.wewebu.ow.server.ui.OwDialog.OwDialogListener, com.wewebu.ow.server.ui.OwUpdateTarget, EventListener

public class OwAddObjectRecordFunction
extends com.wewebu.ow.server.app.OwRecordFunction
implements com.wewebu.ow.server.ui.OwDialog.OwDialogListener

Implementation of the record function plugin, for adding objects.
If specified in the configuration it uses a given formular for property editing.

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  boolean isGeneratedIdsFeatureInUse
          Flag notifying if the generation feature is used
protected  com.wewebu.ow.server.ecm.OwObject m_folderObject
          last folder object for history events
protected  com.wewebu.ow.server.app.OwJspFormConfigurator m_jspPageConfigurator
          JSPForm Configuration handler.
protected  String m_objectClass
          Deprecated. will be removed in the future. See OwObjectClassSelectionCfg.
protected  com.wewebu.ow.server.ecm.OwObject m_rootObject
          last root object for history events
 
Fields inherited from class com.wewebu.ow.server.app.OwFunction
DESCRIPTION_KEY_CLASSES, DESCRIPTION_KEY_OBJ_TYPES, DESCRIPTION_KEY_TYPE, DRAG_DROP_PROPERTY_MAX_FILESIZE, m_MainContext
 
Constructor Summary
OwAddObjectRecordFunction()
           
 
Method Summary
protected  com.wewebu.ow.server.dmsdialogs.OwCreateObjectDialog createCreateObjectDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p, com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg, boolean fOpenObject_p)
          overridable factory method
protected  com.wewebu.ow.server.dmsdialogs.OwCreateObjectDialog createCreateObjectDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p, String strClassName_p, String strObjectClassParent_p, boolean fOpenObject_p)
          Deprecated.  
protected  List<com.wewebu.ow.server.dmsdialogs.views.OwObjectPropertyView.OwPropertyInfo> createPropertiesInfo(Node editPropertyConfigNode_p)
          Create properties info for EditPropertiesView
 String getBigIcon()
          get the URL to the icon of the dialog / function
 String getIcon()
          get the URL to the icon of the dialog / function
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectClassProcessor getObjectClassProcessor()
          OwObjectClassProcessor if any was defined.
protected  Map getPredefinedValues(com.wewebu.ow.server.ecm.OwObject rootObject_p, com.wewebu.ow.server.ecm.OwObject folderObject_p)
          Return a map with values which should be predefined/set in initial context.
 void init(com.wewebu.ow.server.util.OwXMLUtil node_p, com.wewebu.ow.server.app.OwMainAppContext context_p)
           
 boolean isEnabled(com.wewebu.ow.server.ecm.OwObject rootObject_p, com.wewebu.ow.server.ecm.OwObject folderObject_p, int iContext_p)
          check if function is enabled for the given object parameters
 void onClickEvent(com.wewebu.ow.server.ecm.OwObject rootObject_p, com.wewebu.ow.server.ecm.OwObject folderObject_p, com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
          event called when user clicked the plugin label / icon
 void onDialogClose(com.wewebu.ow.server.ui.OwDialog dialogView_p)
          Listener for DialogClose events used to historize SUCCESS/CANCEL/FAILURE
 void onUpdate(com.wewebu.ow.server.ui.OwEventTarget caller_p, int code_p, Object param_p)
           
 
Methods inherited from class com.wewebu.ow.server.app.OwRecordFunction
addHistoryEvent, addHistoryEvent, getBigDefaultIconHTML, getBigIconHTML, getDefaultIconHTML, getDefaultLabel, getDragDropProperties, getIconHTML, getLabel, getPluginType, isDragDropTarget, isMultifileDragDropAllowed, onClickEvent
 
Methods inherited from class com.wewebu.ow.server.app.OwFunction
getConfigNode, getContext, getContextMenu, getEventManager, getHelpPath, getName, getNoEvent, getPluginID, getPluginTitle, getPluginTypeDisplayName, getSafeSetting, getSupportedObjectClassesFromDescriptor, getSupportedObjectTypesFromDescriptor, getTooltip, isObjectClassSupported, setSafeSetting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_rootObject

protected com.wewebu.ow.server.ecm.OwObject m_rootObject
last root object for history events


m_folderObject

protected com.wewebu.ow.server.ecm.OwObject m_folderObject
last folder object for history events


m_objectClass

protected String m_objectClass
Deprecated. will be removed in the future. See OwObjectClassSelectionCfg.
the configured object class


m_jspPageConfigurator

protected com.wewebu.ow.server.app.OwJspFormConfigurator m_jspPageConfigurator
JSPForm Configuration handler.

Since:
3.1.0.0

isGeneratedIdsFeatureInUse

protected boolean isGeneratedIdsFeatureInUse
Flag notifying if the generation feature is used

Since:
3.1.0.0
Constructor Detail

OwAddObjectRecordFunction

public OwAddObjectRecordFunction()
Method Detail

init

public void init(com.wewebu.ow.server.util.OwXMLUtil node_p,
                 com.wewebu.ow.server.app.OwMainAppContext context_p)
          throws Exception
Overrides:
init in class com.wewebu.ow.server.app.OwRecordFunction
Throws:
Exception

getIcon

public String getIcon()
               throws Exception
get the URL to the icon of the dialog / function

Specified by:
getIcon in interface com.wewebu.ow.server.app.OwPlugin
Overrides:
getIcon in class com.wewebu.ow.server.app.OwFunction
Throws:
Exception

getBigIcon

public String getBigIcon()
                  throws Exception
get the URL to the icon of the dialog / function

Overrides:
getBigIcon in class com.wewebu.ow.server.app.OwFunction
Throws:
Exception

isEnabled

public boolean isEnabled(com.wewebu.ow.server.ecm.OwObject rootObject_p,
                         com.wewebu.ow.server.ecm.OwObject folderObject_p,
                         int iContext_p)
                  throws Exception
check if function is enabled for the given object parameters

Overrides:
isEnabled in class com.wewebu.ow.server.app.OwRecordFunction
Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
Returns:
true = enabled, false otherwise
Throws:
Exception

onClickEvent

public void onClickEvent(com.wewebu.ow.server.ecm.OwObject rootObject_p,
                         com.wewebu.ow.server.ecm.OwObject folderObject_p,
                         com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
                  throws Exception
event called when user clicked the plugin label / icon

Overrides:
onClickEvent in class com.wewebu.ow.server.app.OwRecordFunction
Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
refreshCtx_p - OwFunctionRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is needed
Throws:
Exception

createCreateObjectDialog

protected com.wewebu.ow.server.dmsdialogs.OwCreateObjectDialog createCreateObjectDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p,
                                                                                        String strClassName_p,
                                                                                        String strObjectClassParent_p,
                                                                                        boolean fOpenObject_p)
                                                                                 throws Exception
Deprecated. 

overridable factory method

Since 3.1.0.0 it is possible to configure in <DialogHanlder/> node a subclass of OwCreateObjectDialog.
In that situation it's mandatory that configured class must have a public constructor with the same signature as:

OwCreateObjectDialog.OwCreateObjectDialog(OwObject, String, String, boolean)

If another constructor is intended to be used, this method must be overwritten.

Parameters:
folderObject_p -
strClassName_p -
strObjectClassParent_p -
fOpenObject_p -
Returns:
OwCreateObjectDialog
Throws:
Exception

createCreateObjectDialog

protected com.wewebu.ow.server.dmsdialogs.OwCreateObjectDialog createCreateObjectDialog(com.wewebu.ow.server.ecm.OwObject folderObject_p,
                                                                                        com.wewebu.ow.server.dmsdialogs.views.classes.OwObjectClassSelectionCfg classSelectionCfg,
                                                                                        boolean fOpenObject_p)
                                                                                 throws Exception
overridable factory method

Since 3.1.0.0 it is possible to configure in <DialogHanlder/> node a subclass of OwCreateObjectDialog.
In that situation it's mandatory that configured class must have a public constructor with the same signature as:

OwCreateObjectDialog.OwCreateObjectDialog(OwObject, OwObjectClassSelectionCfg, boolean)

If another constructor is intended to be used, this method must be overwritten.

Parameters:
folderObject_p -
classSelectionCfg -
fOpenObject_p -
Returns:
OwCreateObjectDialog
Throws:
Exception
Since:
4.1.0.0

createPropertiesInfo

protected List<com.wewebu.ow.server.dmsdialogs.views.OwObjectPropertyView.OwPropertyInfo> createPropertiesInfo(Node editPropertyConfigNode_p)
                                                                                                        throws Exception
Create properties info for EditPropertiesView

Parameters:
editPropertyConfigNode_p -
Returns:
a List object with properties information
Throws:
Exception

onDialogClose

public void onDialogClose(com.wewebu.ow.server.ui.OwDialog dialogView_p)
                   throws Exception
Listener for DialogClose events used to historize SUCCESS/CANCEL/FAILURE

Specified by:
onDialogClose in interface com.wewebu.ow.server.ui.OwDialog.OwDialogListener
Parameters:
dialogView_p - the closed dialog
Throws:
Exception

onUpdate

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

getPredefinedValues

protected Map getPredefinedValues(com.wewebu.ow.server.ecm.OwObject rootObject_p,
                                  com.wewebu.ow.server.ecm.OwObject folderObject_p)
                           throws Exception
Return a map with values which should be predefined/set in initial context.

Parameters:
rootObject_p - OwObject which will be the parent
folderObject_p - OwObject (can be null)
Returns:
Map with specific property name to value entries, or null if none available
Throws:
Exception - could not create map
Since:
3.2.0.0

getObjectClassProcessor

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectClassProcessor getObjectClassProcessor()
OwObjectClassProcessor if any was defined.

Returns:
OwObjectclassProcessor
Since:
4.1.1.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.