public abstract class OwFunction extends Object implements OwPlugin
Base class for all 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
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION_KEY_CLASSES
key for the classes types node in the plugin description
|
static String |
DESCRIPTION_KEY_OBJ_TYPES
key for the object types node in the plugin description
|
static String |
DESCRIPTION_KEY_TYPE
key for a object type node in the plugin description
|
static String |
DRAG_DROP_PROPERTY_MAX_FILESIZE
drag and drop property,see getDragDropProperties()
|
protected OwMainAppContext |
m_MainContext
reference to the cast AppContext
|
Constructor and Description |
---|
OwFunction() |
Modifier and Type | Method and Description |
---|---|
String |
getBigIcon()
get the big (24x24 pixels) icon URL for this plugin to be displayed
|
OwXMLUtil |
getConfigNode()
get the reference to the plugin description node
|
protected OwMainAppContext |
getContext()
get a reference to the app context
|
boolean |
getContextMenu()
check if plugin should be displayed in context menu
|
Properties |
getDragDropProperties()
get the properties for drag and drop like allowed file size and file count or file type...
|
protected OwEventManager |
getEventManager()
get a reference to the event manager to write history events
|
String |
getHelpPath()
get the help path to the plugin
|
String |
getIcon()
get the small (16x16 pixels) icon URL for this plugin to be displayed
|
String |
getName()
get the name of the function plugin
|
boolean |
getNoEvent()
check if the plugin handles events with functioncalls,
or if it is just used to display an icon.
|
String |
getPluginID()
get the plugin ID
|
String |
getPluginTitle()
get a localized display name
|
String |
getPluginTypeDisplayName()
get a display name for the plugin type
|
Object |
getSafeSetting(String strName_p,
Object default_p)
get a setting for the plugin
|
protected Set |
getSupportedObjectClassesFromDescriptor(String strKey_p)
utility function to retrieve a set of object class names from a descriptor definition with the given key
|
protected Set |
getSupportedObjectTypesFromDescriptor(String strKey_p)
utility function to retrieve a set of object types from a descriptor definition with the given key
The object types can either be the numbers as defined in OwObjectReference or you can use the field names directly, which will then be converted to the integer numbers.
|
String |
getTooltip()
Get the tooltip text
|
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 |
isObjectClassSupported(String strClassName_p)
check if the object class 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
|
void |
setSafeSetting(String strName_p,
Object value_p)
set a settings value for the plugin
NOTE: You must call OwMainAppContext.saveUserPrefs(); to serialize the new value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPluginType
public static final String DRAG_DROP_PROPERTY_MAX_FILESIZE
public static final String DESCRIPTION_KEY_OBJ_TYPES
public static final String DESCRIPTION_KEY_CLASSES
protected OwMainAppContext m_MainContext
public static final String DESCRIPTION_KEY_TYPE
public void init(OwXMLUtil node_p, OwMainAppContext context_p) throws Exception
node_p
- OwXMLUtil wrapped DOM Node containing the plugin descriptioncontext_p
- OwMainAppContextException
public String getIcon() throws Exception
public String getBigIcon() throws Exception
Exception
public boolean isObjectClassSupported(String strClassName_p)
strClassName_p
- OwObject class namepublic String getHelpPath()
public String getName()
public boolean getNoEvent()
public boolean isDragDropTarget()
public Properties getDragDropProperties()
public boolean getContextMenu()
public OwXMLUtil getConfigNode()
getConfigNode
in interface OwPlugin
public String getPluginTitle()
getPluginTitle
in interface OwPlugin
public String getPluginID()
getPluginID
in interface OwPlugin
public String getPluginTypeDisplayName()
getPluginTypeDisplayName
in interface OwPlugin
protected OwMainAppContext getContext()
public Object getSafeSetting(String strName_p, Object default_p)
strName_p
- name of property to retrievedefault_p
- Object if setting is not defined in plugin descriptorpublic void setSafeSetting(String strName_p, Object value_p) throws Exception
strName_p
- name of property to retrievevalue_p
- Object to setException
protected OwEventManager getEventManager()
protected Set getSupportedObjectTypesFromDescriptor(String strKey_p) throws OwConfigurationException
strKey_p
- String XML node name for listOwConfigurationException
protected Set getSupportedObjectClassesFromDescriptor(String strKey_p) throws OwConfigurationException
strKey_p
- String XML node name for listOwConfigurationException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.