Package com.ptc.netmarkets.util.misc
Interface ActionDynamicContentDelegate
- All Known Implementing Classes:
DefaultActionDynamicContentDelegate,TestActionDynamicContentDelegate
public interface ActionDynamicContentDelegate
An interface to override the properties of NmAction at runtime. Implementations should extend the
Supported API: true
Extendable: true
DefaultActionDynamicContentDelegate abstract class rather than implementing this interface directly.
Creating such a delegate is only necessary if the action's label/tooltip/icon/url must change dynamically based on
some runtime info. For example, the open in cadtool action is dynamically choosing an icon based the authoring app of
the context object. (see OpenInCadToolDynamicContentDelegate)
If the label/tooltip/icon/url do not need to be calculated at runtime, then an ActionDynamicContentDelegate is not
necessary and should not be used.
These delegates must be 'registered' in a service.properties.xconf file with the action name as selector. For
example:
Where the OPENINCADTOOL action definition is like:
Note: The xconf lookup is currently just the action name and disregards objecttype. The requestor can't be used to
differentiate between actions with different objecttype.
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionReturns additional config options.getIcon()Returns the icon for the action, which may or may not actually be displayed in the UI depending on where the action is used.getLabel()Returns label for the action, which may or may not actually be displayed in the UI depending on where the action is used.Returns toolTip for the action, which may or may not actually be displayed in the UI depending on where the action is used.getUrl()Returns the Url for the action.update()Returns a HashMap, the key being the property that you want to update in the NmAction and its value will be set as the property value.
-
Method Details
-
getLabel
String getLabel()Returns label for the action, which may or may not actually be displayed in the UI depending on where the action is used.
Supported API: true
-
getToolTip
String getToolTip()Returns toolTip for the action, which may or may not actually be displayed in the UI depending on where the action is used.
Supported API: true
-
getIcon
String getIcon()Returns the icon for the action, which may or may not actually be displayed in the UI depending on where the action is used.
Supported API: true
-
getUrl
String getUrl()Returns the Url for the action.
Supported API: true
-
getAdditionalConfigOptions
Returns additional config options.
Supported API: true
Extendable: false- See Also:
-
update
Returns a HashMap, the key being the property that you want to update in the NmAction and its value will be set as the property value.
Supported API: true
-