com.wewebu.ow.server.app
Class OwRecordFunction

java.lang.Object
  extended by com.wewebu.ow.server.app.OwFunction
      extended by com.wewebu.ow.server.app.OwRecordFunction
All Implemented Interfaces:
OwPlugin

public abstract class OwRecordFunction
extends OwFunction

Base class for Record Function plugins, used in the record plugin only.

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.app.OwFunction
DESCRIPTION_KEY_CLASSES, DESCRIPTION_KEY_OBJ_TYPES, DESCRIPTION_KEY_TYPE, DRAG_DROP_PROPERTY_MAX_FILESIZE, m_MainContext
 
Constructor Summary
OwRecordFunction()
           
 
Method Summary
 void addHistoryEvent(OwObject rootObject_p, Collection objects_p, int iEventType_p, int iStatus_p)
          add the plugin invoke event to the history manager
protected  void addHistoryEvent(OwObject rootObject_p, OwObject folderObject_p, int iEventType_p, int iStatus_p)
          add the plugin invoke event to the history manager
 String getBigDefaultIconHTML()
          get the HTML code for the big (24x24 pixels) icon for this plugin to be displayed in the object list.
 String getBigIconHTML(OwObject rootObject_p, OwObject folderObject_p)
          get the HTML code for the small (24x24 pixels) icon for this plugin to be displayed in the object list.
 String getDefaultIconHTML()
          get the HTML code for the small (16 x16 pixels) icon for this plugin to be displayed in the object list.
 String getDefaultLabel()
          get the label for the plugin, used in menus Used for context menus where no object information is available
 Properties getDragDropProperties()
          get the properties for drag and drop like allowed file size and file count or file type...
 String getIconHTML(OwObject rootObject_p, OwObject folderObject_p)
          get the HTML code for the small (16x16 pixels) icon for this plugin to be displayed in the object list.
 String getLabel(OwObject rootObject_p, OwObject folderObject_p)
          get the label for the plugin, used in menus
 String getPluginType()
          get the plugin type
 void init(OwXMLUtil node_p, OwMainAppContext context_p)
          set the plugin description node
 boolean isDragDropTarget()
          check if plugin acts as a drag and drop target
 boolean isEnabled(OwObject rootObject_p, OwObject folderObject_p, int iContext_p)
          check if function is enabled for the given object parameters
 boolean isMultifileDragDropAllowed()
          check if plugin allows multiple files to be dropped on it
 void onClickEvent(OwObject rootObject_p, OwObject folderObject_p, OwClientRefreshContext refreshCtx_p)
          event called when user clicked the plugin label / icon overridable
 void onClickEvent(OwObject rootObject_p, OwObject folderObject_p, String subpath_p, String subdisplaypath_p, OwClientRefreshContext refreshCtx_p)
          event called when user clicked the plugin label / icon overridable
 
Methods inherited from class com.wewebu.ow.server.app.OwFunction
getBigIcon, getConfigNode, getContext, getContextMenu, getEventManager, getHelpPath, getIcon, 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
 

Constructor Detail

OwRecordFunction

public OwRecordFunction()
Method Detail

init

public void init(OwXMLUtil node_p,
                 OwMainAppContext context_p)
          throws Exception
set the plugin description node

Overrides:
init in class OwFunction
Parameters:
node_p - OwXMLUtil wrapped DOM Node containing the plugin description
context_p - OwMainAppContext
Throws:
Exception

getDefaultIconHTML

public String getDefaultIconHTML()
                          throws Exception
get the HTML code for the small (16 x16 pixels) icon for this plugin to be displayed in the object list. An anchor tag is wrapped around this HTML code to trigger events for the plugin. Used for context menus where no object information is available NOTE: you can return arbitrary HTML here, if you do not want to display an icon.

Returns:
HTML code to be inserted for the document function plugin.
Throws:
Exception

getBigDefaultIconHTML

public String getBigDefaultIconHTML()
                             throws Exception
get the HTML code for the big (24x24 pixels) icon for this plugin to be displayed in the object list. An anchor tag is wrapped around this HTML code to trigger events for the plugin. Used for context menus where no object information is available NOTE: you can return arbitrary HTML here, if you do not want to display an icon.

Returns:
HTML code to be inserted for the document function plugin.
Throws:
Exception

getIconHTML

public String getIconHTML(OwObject rootObject_p,
                          OwObject folderObject_p)
                   throws Exception
get the HTML code for the small (16x16 pixels) icon for this plugin to be displayed in the object list. An anchor tag is wrapped around this HTML code to trigger events for the plugin. NOTE: you can return arbitrary HTML here, if you do not want to display an icon.

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
Returns:
HTML code to be inserted for the document function plugin.
Throws:
Exception

getBigIconHTML

public String getBigIconHTML(OwObject rootObject_p,
                             OwObject folderObject_p)
                      throws Exception
get the HTML code for the small (24x24 pixels) icon for this plugin to be displayed in the object list. An anchor tag is wrapped around this HTML code to trigger events for the plugin. NOTE: you can return arbitrary HTML here, if you do not want to display an icon.

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
Returns:
HTML code to be inserted for the document function plugin.
Throws:
Exception

getLabel

public String getLabel(OwObject rootObject_p,
                       OwObject folderObject_p)
                throws Exception
get the label for the plugin, used in menus

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
Returns:
tooltip code to be inserted for the document function plugin.
Throws:
Exception

getDefaultLabel

public String getDefaultLabel()
                       throws Exception
get the label for the plugin, used in menus Used for context menus where no object information is available

Returns:
tooltip code to be inserted for the document function plugin.
Throws:
Exception

isEnabled

public boolean isEnabled(OwObject rootObject_p,
                         OwObject folderObject_p,
                         int iContext_p)
                  throws Exception
check if function is enabled for the given object parameters

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
iContext_p - OwStatusContextDefinitions
Returns:
true = enabled, false otherwise
Throws:
Exception

isDragDropTarget

public boolean isDragDropTarget()
check if plugin acts as a drag and drop target

Overrides:
isDragDropTarget in class OwFunction
Returns:
true = plugin is drag and drop target and can retrieve uploaded files via OwMainAppContext.getDragAndDropUploadDir, false otherwise

isMultifileDragDropAllowed

public boolean isMultifileDragDropAllowed()
check if plugin allows multiple files to be dropped on it

Returns:
true = allow multiple files to be dropped on the plugin, false only single files may be dropped

getDragDropProperties

public Properties getDragDropProperties()
get the properties for drag and drop like allowed file size and file count or file type...

Overrides:
getDragDropProperties in class OwFunction
Returns:
Properties map of properties as defined with DRAG_DROP_PROPERTY_..., or null if not properties are defined

onClickEvent

public void onClickEvent(OwObject rootObject_p,
                         OwObject folderObject_p,
                         String subpath_p,
                         String subdisplaypath_p,
                         OwClientRefreshContext refreshCtx_p)
                  throws Exception
event called when user clicked the plugin label / icon overridable

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
subpath_p - String subpath of subfolder or null if root folder
subdisplaypath_p - String subpath of subfolder
refreshCtx_p - OwClientRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is needed
Throws:
Exception

onClickEvent

public void onClickEvent(OwObject rootObject_p,
                         OwObject folderObject_p,
                         OwClientRefreshContext refreshCtx_p)
                  throws Exception
event called when user clicked the plugin label / icon overridable

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
refreshCtx_p - OwClientRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is needed
Throws:
Exception

addHistoryEvent

public void addHistoryEvent(OwObject rootObject_p,
                            Collection objects_p,
                            int iEventType_p,
                            int iStatus_p)
                     throws Exception
add the plugin invoke event to the history manager

Parameters:
rootObject_p - OwObject root folder to work on
objects_p - OwObject objects that have to be audited
iEventType_p - int one out of: OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_UI OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_VIEW OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_EDIT
iStatus_p - int Status as defined in OwEventManger.HISTORY_STATUS_...
Throws:
Exception

addHistoryEvent

protected void addHistoryEvent(OwObject rootObject_p,
                               OwObject folderObject_p,
                               int iEventType_p,
                               int iStatus_p)
                        throws Exception
add the plugin invoke event to the history manager

Parameters:
rootObject_p - OwObject root folder to work on
folderObject_p - OwObject selected folder to work on
iEventType_p - int one out of: OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_UI OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_VIEW OwEventManger.HISTORY_EVENT_TYPE_PLUGIN_INVOKE_EDIT
iStatus_p - int Status as defined in OwEventManger.HISTORY_STATUS_...
Throws:
Exception

getPluginType

public String getPluginType()
get the plugin type

Returns:
String as defined in OwConfiguration.PLUGINTYPE_...


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.