public class PluginDefinition extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PluginDefinition.Authority
Represents a security authority.
|
| Constructor and Description |
|---|
PluginDefinition()
The basic constructor.
|
PluginDefinition(PluginDefinition def)
Copy constructor.
|
PluginDefinition(String id,
String name,
Class<? extends ElementBase> clazz)
Constructs a plugin definition for the specified plugin id, name and class.
|
| Modifier and Type | Method and Description |
|---|---|
ElementBase |
createElement(ElementBase parent,
org.carewebframework.api.property.IPropertyProvider propertyProvider,
boolean deserializing)
Creates an instance of the element based on its definition.
|
List<PluginDefinition.Authority> |
getAuthorities()
Returns the list of authorities required for access to this plugin.
|
String |
getCategory()
Returns the category under which this plugin is to be classified.
|
Class<? extends ElementBase> |
getClazz()
Returns the UI element class associated with this definition.
|
String |
getCopyright()
Returns any copyright information for this plugin.
|
String |
getCreator()
Returns the name of the creator of this plugin.
|
static PluginDefinition |
getDefinition(Class<? extends ElementBase> clazz)
Returns the plugin definition associated with the specified class.
|
static PluginDefinition |
getDefinition(String tag)
Returns the plugin definition associated with the specified xml tag (same as plugin id).
|
String |
getDescription()
Returns the description of this plugin.
|
String |
getIcon()
Returns the url of the icon associated with the plugin.
|
String |
getId()
Returns the unique id of the plugin definition.
|
String |
getName()
Returns the display name of the plugin definition.
|
List<PropertyInfo> |
getProperties()
Returns the list of properties associated with this plugin.
|
String |
getReleased()
Returns release information (typically a date) about the plugin.
|
List<IPluginResource> |
getResources()
Returns the list of associated plugin resources.
|
<E extends IPluginResource> |
getResources(Class<E> clazz)
Returns the list of plugin resources belonging to the specified resource class.
|
String |
getSource()
Returns the source of the plugin.
|
String |
getUrl()
Returns the URL of the principal cwf page for the plugin.
|
String |
getVersion()
Returns version information about the plugin.
|
boolean |
hasEditableProperties()
Returns true if this definition contains any editable properties.
|
void |
initElement(ElementBase element,
org.carewebframework.api.property.IPropertyProvider propertyProvider)
Initialize the element's properties using the specified property provider.
|
boolean |
isDisabled()
Returns true if the plugin has been disabled.
|
boolean |
isForbidden()
Returns true if access to the plugin is restricted.
|
boolean |
isInternal()
Returns true if this definition represents an internal UI element (i.e., one that has been
pre-created by some other means).
|
boolean |
isLazyLoad()
Returns the lazyLoad flag.
|
boolean |
isRequiresAll()
Returns the requiresAll flag.
|
void |
setAuthorities(List<PluginDefinition.Authority> authorities)
Adds authorities from the list to the list of authorities associated with this plugin.
|
void |
setCategory(String category)
Sets the category under which this plugin is to be classified.
|
void |
setClazz(Class<? extends ElementBase> clazz)
Sets the UI element class associated with this definition.
|
void |
setCopyright(String copyright)
Sets any copyright information for this plugin.
|
void |
setCreator(String creator)
Sets the name of the creator of this plugin.
|
void |
setDescription(String description)
Sets the description of this plugin.
|
void |
setDisabled(boolean disabled)
Sets the disabled state of the plugin.
|
void |
setIcon(String icon)
Sets the url of the icon associated with the plugin.
|
void |
setId(String id)
Sets the unique id of the plugin definition
|
void |
setLazyLoad(boolean lazyLoad)
Sets the lazyLoad flag.
|
void |
setName(String name)
Sets the display name of the plugin definition.
|
void |
setPath(String path)
Sets the path of the resource containing the plugin definition.
|
void |
setProperties(List<PropertyInfo> properties)
Adds properties from the list to the list of properties associated with this plugin.
|
void |
setReleased(String released)
Sets release information (typically a date) about the plugin.
|
void |
setRequiresAll(boolean requiresAll)
Sets the requiresAll flag.
|
void |
setResources(List<IPluginResource> resources)
Adds resources from the list to the list of resources associated with this plugin.
|
void |
setSource(String source)
Sets the source of the plugin.
|
void |
setUrl(String url)
Sets the URL of the principal cwf page for the plugin.
|
void |
setVersion(String version)
Sets version information about the plugin.
|
public PluginDefinition()
public PluginDefinition(String id, String name, Class<? extends ElementBase> clazz)
id - Unique id for pluginname - Display name of the plugin.clazz - Associated UI element class.public PluginDefinition(PluginDefinition def)
def - Plugin definition to copy.public static PluginDefinition getDefinition(String tag)
tag - XML tag (plugin id).public static PluginDefinition getDefinition(Class<? extends ElementBase> clazz)
clazz - The class whose plugin definition is sought.public String getId()
public void setId(String id)
id - The unique plugin id.public String getSource()
public void setSource(String source)
source - Plugin source.public String getName()
public void setName(String name)
name - Plugin display name.public String getUrl()
public void setUrl(String url)
url - The URL of the principal cwf page.public void setRequiresAll(boolean requiresAll)
requiresAll - The requiresAll flag.public boolean isRequiresAll()
public boolean isLazyLoad()
public void setLazyLoad(boolean lazyLoad)
lazyLoad - The lazyLoad flag.public List<IPluginResource> getResources()
public <E extends IPluginResource> List<E> getResources(Class<E> clazz)
E - A subclass of PluginResource.clazz - The resource class being sought.public void setResources(List<IPluginResource> resources)
resources - Resources to add.public List<PluginDefinition.Authority> getAuthorities()
public void setAuthorities(List<PluginDefinition.Authority> authorities)
authorities - Authorities required by this plugin.public List<PropertyInfo> getProperties()
public void setProperties(List<PropertyInfo> properties)
properties - List of associated properties.public Class<? extends ElementBase> getClazz()
public void setClazz(Class<? extends ElementBase> clazz)
clazz - The associated class.public String getDescription()
public void setDescription(String description)
description - The plugin description.public void setCategory(String category)
category - The plugin category.public String getCategory()
public String getCreator()
public void setCreator(String creator)
creator - The plugin creator.public String getCopyright()
public void setCopyright(String copyright)
copyright - Plugin copyright information.public String getVersion()
public void setVersion(String version)
version - The plugin version.public void setReleased(String released)
released - Release information.public String getReleased()
public void setIcon(String icon)
icon - Url of an icon.public String getIcon()
public boolean isInternal()
public boolean isDisabled()
public void setDisabled(boolean disabled)
disabled - The desired state.public boolean isForbidden()
public boolean hasEditableProperties()
public void setPath(String path)
path - Path of the resource containing this plugin definition.public ElementBase createElement(ElementBase parent, org.carewebframework.api.property.IPropertyProvider propertyProvider, boolean deserializing)
parent - Parent element (may be null).propertyProvider - Property source for initializing element properties (may be null).deserializing - If true, we are deserializing a layout.public void initElement(ElementBase element, org.carewebframework.api.property.IPropertyProvider propertyProvider)
element - Element to initialize.propertyProvider - Provider of property values.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.