You can download an annotated descriptor file, rsuite-plugin-annot.xml. Since it includes examples of all the different types of extension provider elements, it is not a functioning plug-in descriptor. Use it as a reference for the markup.
This example, rsuite-plugin-annot.xml, includes all the different types of extension provider and other XML elements that can be used in a 4.0 plug-in descriptor. The annotations explain the elements.
<rsuite-plugin id="my-plugin-name" version="1.0">
<lifecycleListener type="com.rsi.rsuite.lifecycle.MyPluginLifecycleListener"/>
<extensionProvider id="rsuite.WebService"> <staticWebService path="/WebContent" root="/my-plugin-name"
staticWebService: Maps a directory (in this case "WebContent") in the plug-in to be a public folder addressable by URL, which means paths in the plug-in can be accessed as /rsuite-cms/plugin/my-plugin-name/path.
<remoteApiDefinition id="myService" handler="com.rsi.rsuite.webservices.MyWebService"/>
remoteApiDefinition: Declaration of a Java class. Other configuration items in rsuite-plugin.xml can reference the id. The ID is used to provide a REST URL for the service as well, in the pattern /rsuite/rest/v1/api/id. The code is run when invoked through a user or system action, often declared through association with a context menu action in rsuite-plugin.xml.
remoteApiDefinition/@handler: Must implement the RSuite RemoteApiHandler interface.
</extensionProvider>
<extensionProvider id="rsuite.Workflow"> <workflowExecutionAdvisor id="lnp:workflowExecutionAdvisor" handler="com.rsi.rsuite.workflow.MyWorkflowExecutionAdvisor" description="Sort incoming workflow jobs to the appropriate workflow pool"
</workflowExecutionAdvisor>
<actionHandler label="My Custom Action Handler" type="com.rsi.rsuite.workflow.MyActionHandler" description="Process content at a specific point in a workflow process">
<variableList> <variable> <name>aCustomVariable</name> </variable>
</variableList> </actionHandler>
<taskUIConfiguration scope="user,roles">
<inboxRowsPerPage>20</inboxRowsPerPage>
<inboxColumnList> <column name="name" label="Task"/> <column name="description" label="Description"/> <column name="projectName" label="Project"/> <column name="workflowStatus" label="Workflow Status"/> </inboxColumnList>
inboxColumnList: Columns to include in panels using this configuration. Can refer to built-in names as well as custom names, all of which are workflow variable names.
<inboxFilterList> <filter name="name" label="Task Type"/> <filter name="projectName" label="Project"/> </inboxFilterList>
inboxFilterList: Filters available for panels using this configuration. Can refer to any workflow variable name.
</taskUIConfiguration> </extensionProvider>
<extensionProvider id="rsuite.HotFolder"> <hotFolderAdvisor type="com.rsi.rsuite.advisors.workflow.MyHotFolderAdvisor" description="This advisor ignores files that aren't zip files."/>
</extensionProvider>
<extensionProvider id="rsuite.Scheduler"> <scheduledJobHandler description="Scheduled job to do something repeatedly" handler="com.rsi.rsuite.job.MyScheduledJob" id="myScheduledJob"/>
</extensionProvider>
<extensionProvider id="rsuite.EventBus"> <eventHandler type="com.rsi.rsuite.eventhandlers.MyEventHandler" includeRegex="task.*|workflow.process.completed"/>
</extensionProvider>
<extensionProvider id="rsuite.ManagedObjectAdvisor"> <managedObjectAdvisor type="com.rsi.rsuite.advisors.mo.MyMoAdvisor"/>
</extensionProvider>
<extensionProvider id="rsuite.ManagedObjectValidation"> <managedObjectValidator type="com.rsi.rsuite.validation.MyValidator"/>
</extensionProvider>
<extensionProvider id="rsuite.UI"> <scriptInclude src="/my-plugin-name/js/myCustomJavascript.js"/>
scriptInclude: Reference to a custom Javascript file included in the plug-in. All custom Javascript must be declared in this way.
<styleInclude src="/my-plugin-name/css/styles.css"/>
styleInclude: Reference to a custom LESS (CSS) file included in the plug-in. All custom stylesheets must be declared in this way.
<messageTable src="/my-plugin-name/static/messages.xml"/>
messageTable: Reference to an XML file in the same plug-in that contains text to use in UI labels. Values in the message file are referred to elsewhere in the same plug-in. See sample <messages> instance below for more information.
<contentDisplayAdvisor id="myContentDisplayAdvisor" type="com.rsi.rsuite.advisors.content.MyContentDisplayAdvisor" label="My Content Display Advisor" description="A CDA that adjusts the appearance of objects in the UI."/>
</extensionProvider>
<extensionProvider id="rsuite.TransformationProvider"> <namedPreviewTransformer mimeType="text/html" previewXsltUri="rsuite:/res/plugin/my-plugin-name/xslt/myPreview.xsl" suggestedFileName="preview.htm" transformName="myHtmlPreviewHTML"/>
namedPreviewTransformer: Declaration of an XSLT script that transforms an XML MO or container XML. The name is referenced by a menu action elsewhere in the plug-in. If the result is not HTML or if the browser should not treat it as HTML, the mimetype can be adjusted appropriately.
<transformationProvider name="myPreviewProvider" type="com.rsi.rsuite.transformation.MyPreviewProvider" mimeType="application/octet-stream"/>
</extensionProvider>
<extensionProvider id="rsuite.ContextMenu"> <contextMenuRuleSet name="myMenuSet" scope="allNodes">
<menuItemList> <menuItem id="myMenuItem">
<actionName>rsuite:invokeWebservice</actionName>
actionName: The type of action to invoke. See the Extension Guide for an explanation of which properties are applicable to each actionName. Custom actions can be defined through Javascript. Often, an actionName requires an associated property to identify which extension ID to use for the action. In the case of rsuite:invokeWebservice, remoteApiName is required. Other commonly used action names and required property values are:
<property name="remoteApiName" value="myService"/>
property/@name=remoteApiName: The ID assigned to the Java class declaration for an action of type rsuite:invokeWebservice.
<label>My action</label>
label: The menu item label
<property name="rsuite:icon" value="/rsuite-cms/plugin/my-plugin-name/images/myicon.png"/>
property/@name=rsuite:icon: The icon to use in the menu. Optional.
<property name="rsuite:group" value="mygroup"/>
property/@name=rsuite:group: The name of the group of menu actions with which the current action should be grouped. Optional.
<property name="rsuite:path" value="My Main Menu/My Submenu"/>
property/@name=rsuite:path: The menu path under which the menu action should be made available. Multiple levels can be defined. Optional.
<property name="serviceParams.myCustomParam" value="A value"/>
property/@name=name: A means for passing custom parameters to the service or other extension class invoked.
<property name="formId" value="myCustomForm"/>
property/@name=formId: The form that should be shown prior to invoking the specified action. Optional.
<property name="formParams.myCustomFormParam" value="A value"/>
property/@name=formParams.name: A means for passing custom parameters to the form invoked prior to invoking the specified action.
<property name="showProgressMeter" value="true"/>
property/@name=showProgressMeter: Shows progress meter for long-running processes.
<property name="timeout" value="0"/>
property/@name=timeout: Duration after which a web service should time out (override of default). "0" means the process should not time out. Optional.
<property name="useTransport" value="iframe"/>
property/@name=useTransport: Returns results (if any) using specified method rather than in the default dialog box. Choices are iframe, window, and tab. Optional.
<property name="minimumDelay" value="60"/>
property/@name=minimumDelay: Specify a delay between the return of this action from the returning Web service and invocation of the Web service. Optional.
</menuItem> </menuItemList> <ruleList>
ruleList: A list of inclusion and exclusion rules that define the characteristics of objects for which the menu items should appear.
<rule>include nodeType ca,canode,mo,mononxml</rule>
<rule>include rule: An inclusion rule.
<rule>exclude role Author,Contributor</rule>
<rule>exclude rule: An exclusion rule.
Additional include examples (all are also valid exclude rules):
<rule>include nodeType folder</rule> <rule>include caType dita-topic,dita-ul</rule> <rule>include elementType topic</rule> <rule>include elementType {http://www.w3.org/1999/02/22-rdf-syntax-ns#}:RDF</rule> <rule>include lmdValue isPrimary</rule> <rule>exclude lmdValue Publication_Cycle_Status=outWithVendor</rule> <rule>include lmdValue imageType=CP,B&W</rule> <rule>include hasPermission edit</rule>
</ruleList> </contextMenuRuleSet> </extensionProvider>
<extensionProvider id="rsuite.Forms"> <formDefinition description="A form used to do something in RSuite" id="myCustomForm" label="My Custom Form" handler="com.rsi.rsuite.formhandler.MyFormHandler">
<instructions>Fill out the form, then click on OK. </instructions>
instructions: Instructions that appear at the top of the form dialog. Can also be provided using formDefinition/@instructions.
<property name="dialogOptions.width" value="950pt"/>
property/@dialogOptions.width: Set fixed width of form. Optional.
<property name="rsuite:icon" value="checkin"/>
property/@rsuite:icon: Icon to display in the form title bar. A reference to a built-in icon. Custom icons can be referred to by URI. Optional.
<column name="myColumn1">
column: A list of parameters (i.e., fields) to be included as a column on the form.
column/@name: The column name, which can be referred to as a CSS class or in code.
<param>
param: A form parameter (field).
<name>param1</name>
name: The form parameter name. Appears as a class value in the HTML so it can be used for styling. Each parameter and its the corresponding values are provided as an argument to the Java class called after the form is closed. Can also be provided as param/@name.
<label>A form field </label>
label: The form parameter label. Can also be provided as param/@label.
<formControlType>select</formControlType>
<metaDataType>contextual</metaDataType>
metaDataType: Set to "contextual" to search contextual values rather than MO values. Can also be provided as param/@metaDataType.
<allowMultiple>true</allowMultiple>
allowMultiple: Determines whether the user can select more than one value. Defaults to FALSE. Can also be provided as param/@allowMultiple.
<readOnly>true</readOnly>
readOnly: Determines whether the user can modify the values. Defaults to FALSE. Can also be provided as param/@readOnly.
<required>true</required>
required: Determines whether the user is required to enter a value before the form can be submitted. Defaults to FALSE. Can also be provided as param/@required.
<validation errorMessage="That's not right!" regex="\a\d" required="false"/>
<optionList>
optionList: A list of values that will populate the control when presented. These values will precede any provided via a datatype.
<option label="Cool" value="cool"/> <option label="Really Cool" value="reallycool"/> </optionList> <datatype name="myDatatypeName"/>
datatype: A reference to a datatype defined in this rsuite-plugin.xml. An alternative way to populate the list of values.
<sortOptions>asc</sortOptions>
sortOptions: Sorting type to be used when multiple values are presented. Possible values are asc, desc, natural, and noSort. Can also be provided as param/@sortOptions.
<required>style</required>
style: CSS style markup for the parameter. Can also be provided as param/@style.
<required>styleClass</required>
styleClass: CSS class name. Can also be provided as param/@styleClass. Deprecated elements: <size>
</param> </column>
Deprecated elements: <paramList> rather than <column>. <paramList> contained <param>s with child <col>s to set the column.
</formDefinition>
<datatypeDefinition name="myDatatypeName" formControlType="select">
datatypeDefinition: A list of values that can be referred to by forms or code.
<description>A datatype for you</description>
description: A description for documentation purposes. Optional. Can also be provided as datatypeDefinition/@description.
<optionList> <option label="Lame" value="lame"/> <option label="Really Lame" value="reallylame"/> </optionList> </datatypeDefinition> <datatypeDefinition name="myOtherDatatypeName" formControlType="select" description="My favorite datatype"> <optionListProvider handler="com.rsi.rsuite.datatypes.MyCustomDatatype"/>
</datatypeDefinition> </extensionProvider>
<extensionProvider id="rsuite.Reporting"> <reportDefinition description="Report on everything that happened." handler="com.rsi.rsuite.report.MyCustomReport" id="myReport" label="The Everything Report">
<instructions>Fill out the form then push Submit.</instructions>
instructions: Instructions that appear at the top of the report form. Can also be provided using reportDefinition/@instructions.
<property name="rsuite:icon" value="/rsuite-cms/plugin/my-plugin-name/images/myreporticon.png"/>
property/@name=rsuite:icon: The icon that appears next to the report name on the Reports tab. Optional.
<column name="myColumn1">
column: A column of one or more parameters (fields) for the report form. See example for <extensionProvider id="rsuite.Forms"><formDefinition>.
</column> </reportDefinition> </extensionProvider>
<extensionProvider id="rsuite.Search"> <searchFieldDefinition name="mySearchField" type="element-value">
<description>A description of my field.</description>
description: A description of a search field for documentation. Can also be searchFieldDefinition/@description. Optional.
<isFacet>true</isFacet>
isFacet: Indicator of whether the field should be available for inclusion in filtered search forms. Can also be searchFieldDefinition/@facet.
<componentList> <component> <elementNamespaceUri>http://www.mydomain.com/namespace</elementNamespaceUri> <elementLocalName>myElementName</elementLocalName> </component> </componentList>
</searchFieldDefinition>
<searchFieldDefinition name="outputclass" type="element-attribute-value" description="Search against @outputclass"> <componentList> <component elementLocalName="topic" attributeLocalName="outputclass"/> <component elementLocalName="p" attributeLocalName="outputclass"/> <component elementLocalName="ul" attributeLocalName="outputclass"/> <component elementNamespaceUri="http://www.mydomain.com/namespace" elementLocalName="ul" attributeNamespaceUri="http://www.mydomain.com/namespace" attributeLocalName="outputclass"/> </componentList> </searchFieldDefinition>
searchFieldDefinition/@type="element-attribute-value": Search against the value of an attribute in the context of a specific element.
<searchFieldDefinition name="status" type="lmd-name-value" description="Status field" facet="true"> <componentList> <component lmdName="status"/> <component lmdName="myStatus"/> </componentList> </searchFieldDefinition></searchFieldDefinition>
earchFieldDefinition/@type="system-value": Search against the value of a system field. See the RSuite Extension Guide for a list of fields.
<searchContentConfiguration>
searchContentConfiguration: Declarations for the built-in lists for file types.
<contentTypeConfiguration> <configItem label="Audio"> <configValue type="contentType" value="audio"/> </configItem> <configItem label="PDF"> <configValue type="mimeType" value="application/pdf"/> <configValue type="mimeType" value="application/postscript"/> </configItem> </contentTypeConfiguration>
contentTypeConfiguration: The list of values to include in the rsuite:docMedia list, and their mapping to configured content types and mimetypes. Only the specified values in the <configItem>s are listed
<xmlConfiguration> <configItem label="Article" type="article|editorial"/> <configItem label="Status Configuration" type="workflow_status_configuration"/> </xmlConfiguration>
xmlConfiguration: Assignment of labels to XML local names to override the list shown in the XML component list in the built-in filter field. Multiple values can be mapped to a single label with the or bar. Only the specified values in the <configItem>s are listed.
<containersConfiguration>
containersConfiguration: Assignment of labels to content assembly types to override the list shown in the Containers list in the built-in filter field. Only the specified <configItem>s are listed.
<configItem label="Folder" type="folder"/> <configItem label="Container" type="ca"/> <configItem label="Book" type="book"/> </containersConfiguration> </searchContentConfiguration>
<facetConfiguration>
facetConfiguration: One or more filtered form declarations and related configuration.
<facetFormConfig id="mySearchForm" description="A search form with custom fields" instructions="Select the values you want and push the search button." label="My Filtered Search">
<property name="rsuite:icon" value="facetedSearch"/>
property/@name="rsuite:icon": Icon displayed with the title in menus and at the top of the search form.
<facet name="status" label="Workflow status" c ontrolType="checkbox" maxDisplay="5" allowMultiple="true" metadataScope="global" dataTypeName="statusDataType" sortOptions="asc"/>
facet: A filter to include in the form. This one provides a checkbox list of values provided by a datatype sorted in ascending order. The user may select more than one. Only the first five values are displayed until the user requests more. The search is against global LMD, not contextual.
<facet name="outputclass" label="Output class" controlType="input" exactMatch="true" allowUserEntry="true" omitvalues="false" valueHandler="com.rsi.rsuite.search.OutputClassValueHandler" sortOptions="desc"/>
<facet name="rsuite:docMedia" label="File types"/>
facet/@name="rsuite:*": Reference to built-in filters. Uses default configuration for the built-in filter.
</facetFormConfig> </facetConfiguration>
<searchFormDefinition id="myCustomSearchForm" label="My form" handler="com.rsi.rsuite.search.MyCustomSearchHandler" description="This form is a custom one.">
<instructions>The instructions for the form.</instructions> <searchHandlerConfiguration>
searchHandlerConfiguration: Maps search field declarations to field names in the form parameters declared below in the form body.
<searchObject> <elementNamespaceUri>http://mydomain.com/ns</elementNamespaceUri> <elementLocalName>chapter</elementLocalName> </searchObject>
searchObject: Declaration of one or more elements to include in the search.
<searchConfig name="excludeContentAssemblyObjects" value="true"/>
searchConfig/@name="excludeContentAssemblyObjects": Do or don't exclude containers from the results.
<paramConfig param="OutputClass" searchField="outputclass"/>
paramConfig: Declarations for fields available on this form. See the RSuite Extension Guide for detailed configuration information.
</searchHandlerConfiguration>
<column name="myColumn1">
column: A column of one or more parameters (fields) for the custom form. See example for <extensionProvider id="rsuite.Forms"><formDefinition>.
<param> <name>OutputClass</name> </param> </column> </searchFormDefinition>
<searchResultsConfiguration> <columnList> <column name="displayName" label="Title"/> <column name="myCustomColumn" label="A Custom Field"/> </columnList> </searchResultsConfiguration>
</extensionProvider> </rsuite-plugin>