Note: The use of internal plug-ins such as API plug-ins has been deprecated in Assets Server 6.73. Plug-ins should instead be created as an external plug-in.
The configuration file of an Action plug-in is named 'action.config.xml' and consists of the following structure:
- General information is specified between the
<info> </info>
tags.
- Generic settings are specified between the
<action> </action>
tags
- Specific settings are specified between the
<config> </config>
tags
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<info>
</info>
<action>
</action>
<config>
</config>
</plugin>
This article describes the generic settings.
For information about the general information settings and the specific plug-in settings, see Assets Server plug-in configuration files.
The generic Action settings
Generic Action settings are considered to be advanced and intended to be configured by plug-in developers.
The action plug-in configuration is quite extensive, this section contains a brief explanation for each setting.
<action>
<url>...</url>
<icon16Url>...</icon16Url>
<icon24Url>...</icon24Url>
<userInterface>...</userInterface>
<menuAssignments>...</menuAssignments>
<userAgents>...</userAgents>
<enabledExpression>...</enabledExpression>
<filterExpression>...</filterExpression>
<requiredPermissionMask>...</requiredPermissionMask>
<requiredRoles>...</requiredRoles>
<flattenContainersInSelection>...</flattenContainersInSelection>
<removeContainersFromSelection>...</removeContainersFromSelection>
<keyBindings>...</keyBindings>
<messages>...</messages>
</action>
Below follows a short description of each option. For full information, click the relevant link.
- url (Required) Web page that will be loaded when the plug-in is executed. The main page and its resources can be hosted within the plug-in folder, but it can also be on an external server such as HTML, PHP, ASP, and JSP.
- icon16Url (Required) Plug-in icon image URL, 16x16 pixels (currently not used, defined for future reference).
- icon24Url (Required) Plug-in icon image URL, 24x24 pixels, used for the plug-in toolbar button.
- userInterface (Required) Controls where the plug-in URL is opened: in a tab, a dialog or in an external Web browser.
- menuAssignments (Required) Controls from which menu(s) the plug-in is available. This can be a combination of the main button toolbar and the asset context menu.
- userAgents (Optional) Platform specific user agent used when loading the URL in a tab or dialog.
- enabledExpression (Optional) Expression to check if the current asset selection is valid. For example, the plug-in is only available when only one asset selected.
- filterExpression (Optional) Expression to validate an individual asset. For example, the plug-in exclusively works with video assets.
- requiredPermissionMask (Optional) Permission mask validation to check if the current asset or folder selection is valid. For example, a user needs EDIT permission on the selection to perform the action.
- requiredRoles (Optional) Used for controlling user access to the plug-in.
- flattenContainersInSelection (Optional) If true, load container assets (scuh as Collections) and provide a "flat" selection of unique assets in the elvisContext. Default value: true.
- removeContainersFromSelection (Optional) If true, remove all container assets (such as Collections) from the selection in the elvisContext. Default value: true.
- keyBindings (Optional) Platform specific keyboard bindings.
- messages (Required) Button labels, menu labels, tooltips, and so on. Configurable per locale.
Examples
Minimal action plug-in configuration
<action>
<url>${pluginBaseUrl}l/index.html</url>
<icon16Url>${pluginBaseUrl}/icon16.png</icon16Url>
<icon24Url>${pluginBaseUrl}/icon24.png</icon24Url>
<userInterface>
<tab/>
</userInterface>
<menuAssignments>
<menuAssignment id="toolBar" order="5"/>
</menuAssignments>
<messages>
<entries locale="en_US">
<entry key="button.label">My action label</entry>
<entry key="button.tooltip">My action tooltip info</entry>
<entry key="title">My action tab or dialog title</entry>
</entries>
</messages>
</action>
Action plug-in configuration with all options
<action>
<url>${pluginBaseUrl}/index.html</url>
<icon16Url>${pluginBaseUrl}/icon16.png</icon16Url>
<icon24Url>${pluginBaseUrl}/icon24.png</icon24Url>
<userInterface>
<dialog width="900" height="900"/>
</userInterface>
<menuAssignments>
<menuAssignment id="toolBar" order="5"/>
<menuAssignment id="assetContextMenu" order="1"/>
</menuAssignments>
<userAgents>
<userAgentMacOSX>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1</userAgentMacOSX>
<userAgentWindows>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1</userAgentWindows>
</userAgents>
<enabledExpression>elvisContext.hasFilteredSelection()</enabledExpression>
<filterExpression>item.hasAssetDomain("video") || item.hasAssetDomain("image")</filterExpression>
<requiredPermissionMask>VP-------</requiredPermissionMask>
<requiredRoles>
<role>ROLE_DOWNLOAD</role>
<role>ROLE_CUSTOM_ACTION_MY_DIALOG</role>
</requiredRoles>
<keyBindings>
<keyBinding os="Windows" key="h" modifiers="CTRL,SHIFT,ALT"/>
<keyBinding os="MacOSX" key="h" modifiers="CMD,SHIFT,ALT"/>
</keyBindings>
<flattenContainersInSelection>true</flattenContainersInSelection>
<removeContainersFromSelection>true</removeContainersFromSelection>
<messages>
<entries locale="en_US">
<entry key="button.label">My action label</entry>
<entry key="button.tooltip">My action tooltip info</entry>
<entry key="title">My action tab or dialog title</entry>
</entries>
<entries locale="nl_NL">
<entry key="button.label">Mijn actie dialoog</entry>
<entry key="button.tooltip">Mijn actie tooltip informatie</entry>
<entry key="title">Mijn actie tab of dialoog titel</entry>
</entries>
</messages>
</action>
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.