public abstract class OwDocumentFunction extends OwFunction
Base Class for Document Function plugins.
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
DESCRIPTION_KEY_CLASSES, DESCRIPTION_KEY_OBJ_TYPES, DESCRIPTION_KEY_TYPE, DRAG_DROP_PROPERTY_MAX_FILESIZE, m_MainContext
Constructor and Description |
---|
OwDocumentFunction() |
Modifier and Type | Method and Description |
---|---|
protected void |
addHistoryEvent(Collection objects_p,
OwObject oParent_p,
int iEventType_p,
int iStatus_p)
add the plugin invoke event to the history manager
|
protected void |
addHistoryEvent(OwObject oObject_p,
OwObject oParent_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 oObject_p,
OwObject oParent_p)
get the HTML code for the big (24 x 24 Pixels )icon for this plugin to be displayed in the object list.
|
String |
getColumnTitle()
get column title if defined
|
boolean |
getContextMenu()
get property from the XML plugin config node
|
String |
getDefaultIconHTML()
get the HTML code for the small (16x16 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
|
protected String |
getDisplayNameFromUserId(String checkedoutByID_p)
Helper method that returns the display name of the user with a certain user id (login name),
if the adapter implements or allows the methods, if not: the method returns the passed user id.
This method is used by a document function plugin to return information about a user, because it cannot be executed, e.g.: - a object is checked out by a certain user:get the display name of this user - a plugin cannot perform an action because the object is locked by a certain user - a document is not enable, get detailed information why, check the user that is involved. |
boolean |
getEnableColumnClickEvent()
check if plugin should generate a click event when the user clicked on the column (only when own column was defined using getColumnTitle())
|
String |
getIconHTML(OwObject oObject_p,
OwObject oParent_p)
get the HTML code for the small (16x16 pixels) icon for this plugin to be displayed in the object list.
|
String |
getLabel(OwObject oObject_p,
OwObject oParent_p)
get the label for the plugin, used in menus
|
boolean |
getMultiselect()
get property from the XML plugin config node
|
boolean |
getNeedParent()
check if plugin needs oParent_p parameter in onClick handler
|
boolean |
getObjectInstance()
get property from the XML plugin config node
|
String |
getPluginType()
get the plugin type
|
Collection |
getRetrievalPropertyNames()
Get a collection of property names that are needed to display the Objects in the list
i.e.
|
boolean |
getShowInEditViews()
get property from the XML plugin config node
|
void |
init(OwXMLUtil node_p,
OwMainAppContext context_p)
set the plugin description node
|
boolean |
isEnabled(Collection objects_p,
OwObject oParent_p,
int iContext_p)
check if function is enabled for the given objects (called only for multi select operations)
|
boolean |
isEnabled(OwObject oObject_p,
OwObject oParent_p,
int iContext_p)
check if function is enabled for the given object parameters (called only for single select operations)
|
boolean |
isObjectTypeSupported(int iObjectType_p)
check if the object type is supported by the plugin, used to filter out plugins
NOTE: Only used to preselect plugins, you will still have to call isEnabled,
to find out exactly if plugin supports a specific object
|
abstract void |
onClickEvent(OwObject oObject_p,
OwObject oParent_p,
OwClientRefreshContext refreshCtx_p)
event called when user clicked the plugin label / icon
|
void |
onColumnClickEvent(OwObjectCollection objects_p,
OwObject oParent_p,
OwClientRefreshContext refreshCtx_p)
event called when user clicked the plugin column (only when own column was defined using getColumnTitle())
|
void |
onMultiselectClickEvent(Collection objects_p,
OwObject oParent_p,
OwClientRefreshContext refreshCtx_p)
event called when user clicked the plugin for multiple selected items
|
getBigIcon, getConfigNode, getContext, getDragDropProperties, getEventManager, getHelpPath, getIcon, getName, getNoEvent, getPluginID, getPluginTitle, getPluginTypeDisplayName, getSafeSetting, getSupportedObjectClassesFromDescriptor, getSupportedObjectTypesFromDescriptor, getTooltip, isDragDropTarget, isObjectClassSupported, setSafeSetting
public void init(OwXMLUtil node_p, OwMainAppContext context_p) throws Exception
init
in class OwFunction
node_p
- OwXMLUtil wrapped DOM Node containing the plugin descriptioncontext_p
- OwMainAppContextException
public String getColumnTitle()
public boolean getEnableColumnClickEvent()
public boolean getNeedParent()
public boolean getMultiselect()
public boolean getObjectInstance()
public boolean getShowInEditViews()
public boolean getContextMenu()
getContextMenu
in class OwFunction
public String getIconHTML(OwObject oObject_p, OwObject oParent_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectException
public String getBigIconHTML(OwObject oObject_p, OwObject oParent_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectException
public String getDefaultLabel() throws Exception
Exception
public String getLabel(OwObject oObject_p, OwObject oParent_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectException
public String getDefaultIconHTML() throws Exception
Exception
public String getBigDefaultIconHTML() throws Exception
Exception
public boolean isObjectTypeSupported(int iObjectType_p)
iObjectType_p
- int OwObject typepublic boolean isEnabled(OwObject oObject_p, OwObject oParent_p, int iContext_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectiContext_p
- OwStatusContextDefinitionsException
public boolean isEnabled(Collection objects_p, OwObject oParent_p, int iContext_p) throws Exception
objects_p
- Collection of OwObjectoParent_p
- Parent which listed the ObjectiContext_p
- OwStatusContextDefinitionsException
public abstract void onClickEvent(OwObject oObject_p, OwObject oParent_p, OwClientRefreshContext refreshCtx_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectrefreshCtx_p
- OwClientRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is neededException
public void onMultiselectClickEvent(Collection objects_p, OwObject oParent_p, OwClientRefreshContext refreshCtx_p) throws Exception
objects_p
- Collection of OwObjectoParent_p
- Parent which listed the ObjectsrefreshCtx_p
- OwClientRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is neededException
public void onColumnClickEvent(OwObjectCollection objects_p, OwObject oParent_p, OwClientRefreshContext refreshCtx_p) throws Exception
objects_p
- OwObjectCollection of all OwObject s in the listoParent_p
- Parent which listed the ObjectsrefreshCtx_p
- OwClientRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is neededException
protected void addHistoryEvent(OwObject oObject_p, OwObject oParent_p, int iEventType_p, int iStatus_p) throws Exception
oObject_p
- OwObject where event was triggeredoParent_p
- Parent which listed the ObjectiEventType_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_EDITiStatus_p
- int Status as defined in OwEventManger.HISTORY_STATUS_...Exception
protected void addHistoryEvent(Collection objects_p, OwObject oParent_p, int iEventType_p, int iStatus_p) throws Exception
objects_p
- Collection of OwObjectoParent_p
- Parent which listed the ObjectiEventType_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_EDITiStatus_p
- int Status as defined in OwEventManger.HISTORY_STATUS_...Exception
public final String getPluginType()
public Collection getRetrievalPropertyNames() throws Exception
ATTENTION: Define here the collection of property names, which are needed by this document function! This method is used by other plugins to create a request with all properties against the (back-end) ECM system, so no more roundtrips have to be made by additional retrieval.
Exception
protected String getDisplayNameFromUserId(String checkedoutByID_p)
checkedoutByID_p
- user id which should be used to return the display nameCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.