com.wewebu.ow.server.settingsimpl
Class OwSettingsPropertyBPMProxy

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.app.OwSettingsPropertyControl
          extended by com.wewebu.ow.server.settingsimpl.OwSettingsPropertyBaseImpl
              extended by com.wewebu.ow.server.settingsimpl.OwSettingsPropertyBPMProxy
All Implemented Interfaces:
OwSettingsProperty, OwDialog.OwDialogListener, OwUpdateTarget, EventListener

public class OwSettingsPropertyBPMProxy
extends OwSettingsPropertyBaseImpl
implements OwDialog.OwDialogListener

The proxy settings for BPM.

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
 
Fields inherited from class com.wewebu.ow.server.settingsimpl.OwSettingsPropertyBaseImpl
ITEM_PREFIX, ITEM_QUERY_KEY, m_defaultValue, m_externalFormEventTarget, m_fList, m_propertyDefinitionNode, m_strError, m_strSetName, m_value
 
Fields inherited from interface com.wewebu.ow.server.app.OwSettingsProperty
ITEM_VALUE_NODE
 
Constructor Summary
OwSettingsPropertyBPMProxy()
           
 
Method Summary
protected  Object createSingleClonedValue(Object oSingleValue_p)
          create a clone out of the given single property value
protected  String getAbsentUserID()
           
protected  OwWorkitemRepository getBPMRepository()
           
protected  Object getDefaultListItemValue()
          overridable to create a default value for list properties
protected  String getUserDisplayName(String sID_p)
          overridable to get the displayname for a given user object ID
 Object getValue()
          get current value of property
 Node getValueNode(Document doc_p)
          return the property value as a DOM Node for serialization
protected  void init()
          init the target after the context is set.
 void init(Node propertyDefinitionNode_p, Node valueNode_p, String strSetName_p)
          set current value of property, to be overridden
 void insertFormField(Writer w_p)
          insert the property into a HTML form for editing
protected  void insertFormValue(Writer w_p, Object value_p, String strID_p, int iIndex_p)
          overridable to insert a single value into a edit HTML form
 void onDialogClose(OwDialog dialogView_p)
          called when user select dialog closes
 void onSelectAbsentPerson(javax.servlet.http.HttpServletRequest request_p)
          called when user clicks select button
 void onSelectProxyPerson(javax.servlet.http.HttpServletRequest request_p)
          called when user clicks select button
 void onUpdate(OwEventTarget caller_p, int code_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.
protected  void setSingleValueFromRequest(javax.servlet.http.HttpServletRequest request_p, String strID_p, OwWorkitemRepository.OwProxyInfo info_p)
          overridable to apply changes on a submitted form
 boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p, boolean fSave_p)
          update the target after a form event, so it can set its form fields
 
Methods inherited from class com.wewebu.ow.server.settingsimpl.OwSettingsPropertyBaseImpl
appendSingleValueNode, canAdd, createValue, createValueList, extractIDIndex, getDisplayName, getFormName, getFormTarget, getHelpPath, getMaxListSize, getName, getPropertyDefinitionNode, getPropertyError, getSafePropertyError, getSingleValue, getSingleValueFromRequest, hasError, isEditable, isList, isModified, isUser, onAdd, onDelete, saved, setDefault, setExternalFormTarget, setValue, toString, writeAddNewItemButton, writeDeleteButton
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwSettingsPropertyBPMProxy

public OwSettingsPropertyBPMProxy()
Method Detail

init

public void init(Node propertyDefinitionNode_p,
                 Node valueNode_p,
                 String strSetName_p)
          throws Exception
set current value of property, to be overridden

Specified by:
init in interface OwSettingsProperty
Overrides:
init in class OwSettingsPropertyBaseImpl
Parameters:
propertyDefinitionNode_p - the node which defines the property in the plugin descriptors setting
valueNode_p - the node with the current value
strSetName_p - name of the property set for which the property is created
Throws:
Exception

init

protected void init()
             throws Exception
Description copied from class: OwSettingsPropertyBaseImpl
init the target after the context is set.

Overrides:
init in class OwSettingsPropertyBaseImpl
Throws:
Exception

getValueNode

public Node getValueNode(Document doc_p)
Description copied from class: OwSettingsPropertyBaseImpl
return the property value as a DOM Node for serialization

Specified by:
getValueNode in interface OwSettingsProperty
Overrides:
getValueNode in class OwSettingsPropertyBaseImpl
Parameters:
doc_p - DOM Document to add to
Returns:
Node

getBPMRepository

protected OwWorkitemRepository getBPMRepository()
                                         throws Exception
Throws:
Exception

getValue

public Object getValue()
get current value of property

Specified by:
getValue in interface OwSettingsProperty
Overrides:
getValue in class OwSettingsPropertyBaseImpl
Returns:
Object if isList() is true, Object otherwise

getAbsentUserID

protected String getAbsentUserID()
                          throws Exception
Throws:
Exception

insertFormField

public void insertFormField(Writer w_p)
                     throws Exception
insert the property into a HTML form for editing

Overrides:
insertFormField in class OwSettingsPropertyBaseImpl
Parameters:
w_p - Writer to write HTML code to
Throws:
Exception

getUserDisplayName

protected String getUserDisplayName(String sID_p)
overridable to get the displayname for a given user object ID

Parameters:
sID_p -
Returns:
String

insertFormValue

protected void insertFormValue(Writer w_p,
                               Object value_p,
                               String strID_p,
                               int iIndex_p)
                        throws Exception
overridable to insert a single value into a edit HTML form

Overrides:
insertFormValue in class OwSettingsPropertyBaseImpl
Parameters:
w_p - Writer to write HTML code to
value_p - the property value to edit
strID_p - String the ID of the HTML element for use in onApply
iIndex_p - int Index of item if it is a list
Throws:
Exception

onSelectAbsentPerson

public void onSelectAbsentPerson(javax.servlet.http.HttpServletRequest request_p)
                          throws Exception
called when user clicks select button

Parameters:
request_p - HttpServletRequest
Throws:
Exception

onSelectProxyPerson

public void onSelectProxyPerson(javax.servlet.http.HttpServletRequest request_p)
                         throws Exception
called when user clicks select button

Parameters:
request_p - HttpServletRequest
Throws:
Exception

updateExternalFormTarget

public boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p,
                                        boolean fSave_p)
                                 throws Exception
update the target after a form event, so it can set its form fields

Overrides:
updateExternalFormTarget in class OwSettingsPropertyBaseImpl
Parameters:
request_p - HttpServletRequest
fSave_p - boolean true = save the changes of the form data, false = just update the form data, but do not save
Returns:
true = field data was valid, false = field data was invalid
Throws:
Exception

setSingleValueFromRequest

protected void setSingleValueFromRequest(javax.servlet.http.HttpServletRequest request_p,
                                         String strID_p,
                                         OwWorkitemRepository.OwProxyInfo info_p)
                                  throws Exception
overridable to apply changes on a submitted form

Parameters:
request_p - HttpServletRequest with form data to update the property
strID_p - String the HTML form element ID of the requested value
info_p - OwWorkitemRepository.OwProxyInfo
Throws:
Exception

createSingleClonedValue

protected Object createSingleClonedValue(Object oSingleValue_p)
create a clone out of the given single property value

Overrides:
createSingleClonedValue in class OwSettingsPropertyBaseImpl
Parameters:
oSingleValue_p - single Object value
Returns:
Object

getDefaultListItemValue

protected Object getDefaultListItemValue()
overridable to create a default value for list properties

Overrides:
getDefaultListItemValue in class OwSettingsPropertyBaseImpl
Returns:
Object with default value for a new list item

onDialogClose

public void onDialogClose(OwDialog dialogView_p)
                   throws Exception
called when user select dialog closes

Specified by:
onDialogClose in interface OwDialog.OwDialogListener
Parameters:
dialogView_p - the Dialog that have to be closed.
Throws:
Exception

onUpdate

public void onUpdate(OwEventTarget caller_p,
                     int code_p,
                     Object param_p)
              throws Exception
Description copied from interface: OwUpdateTarget
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
Parameters:
caller_p - OwEventTarget target that called update
code_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


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.