This section describes how to configure a custom plugin for use with the Asset Picker.
In most cases, you can use the default Asset Picker container pages to call your plugin component without any additional configuration of these pages. Also, if your objective is simply to make assets from a custom repository available for searching or browsing in the Business Control Center, you can use the default plugin pages to do so (see Default Search and Browse Plugins). You need to create new pages only if the default UI handling does not meet your business requirements.
In all cases, to allow your plugin to be displayed and used in the Business Control Center, you must register it with the view mapping repository. To do so, you need to configure the following view mapping items:
An
itemView
specifying the JSP that represents the plugin.An
itemViewMapping
representing the tab—for example, a Search tab—that presents the plugin to the user.An
itemMapping
, which declares the asset type and view mode for which the plugin is used.
You create view mapping items through the Publishing > View Mapping option in the ACC. For detailed instructions, see Creating View Mapping Repository Items section of the Customizing Asset Display chapter in the ATG Content Administration Programming Guide.
Information on key properties for each of the view mapping items that you need for the plugin is given below.
Plugin itemView
The following list describes key properties in the itemView
you create for an Asset Picker plugin. As a model, use the DefaultAssetPickerVFSSearch
itemView
.
applicationName
: Specify the display name of the J2EE Web application in which the plugin page is stored. The display name is defined in the application’sweb.xml
file. You can store plugin pages in any J2EE Web application that runs with theAssetUI
Web application. (Default Asset Picker pages are stored inAssetUI.war
, which has the display nameAssetUI
.) TheapplicationName
value is used to resolve the context root of the application.attributes
: Create anitemViewAttributeDefinition
(a Map) with a key value oftabDisplayName
whosedefaultValue
is set to the name you want to display on the tab for this plugin (frequentlySearch
).mode
: specifypick
uri
: specify the path to the plugin page in the contained Web application. Do not include the context root, which is resolved from theapplicationName
, as mentioned earlier. Example: theitemView
representing the default Asset Picker plugin for searching file-based assets has the following value:/assetPicker/plugins/vfsSearch.jsp
.
Plugin itemViewMapping
The itemViewMapping
represents the tab that you want to appear on the page. As a model for the itemViewMapping
, use DefaultAssetPickerVFSSearch
.
There is one key property to define in the itemViewMapping
:
view
: specify theitemView
you created for the plugin.
Plugin itemMapping
The following list describes key properties in the itemMapping
you create for the Asset Picker plugin. As a model, use the Default Asset Picker Mapping for ConfigFileSystem Assets
.
itemPath
: Nucleus path to repository for which this plugin is applicable. SpecifyRepository Item
for all repositories orFile
for all virtual file systems.itemName
: the name of the item descriptor for which this plugin is applicable. Enter an asterisk to specify all items in the given repository.mode
: specifypick
.viewMappings
: Specify theitemViewMapping
you created for the plugin, as well as any otheritemViewMappings
you want to appear in this display. (itemViewMappings
represent tabs in the user interface, so if your custom plugin is a Search tab, you might want a corresponding browse tab to appear as well.) DefaultitemViewMappings
areDefaultAssetPickerRepSearch
(searches repository assets),DefaultAssetPickerVFSSearch
, andDefaultAssetPickerVFSBrowse
(which displays assets as an expandable tree).
Note that the Default Asset Picker Mapping for ConfigFileSystem Assets
uses the attributes
property to identify a component that allows users to browse assets as an expandable tree; this behavior is optional. For more information, see Creating a Tree-Based Asset Picker Plugin.