com.ibm.workplace.wcm.api.extensions.authoring
Interface AuthoringAction

All Superinterfaces:
Localized

public interface AuthoringAction
extends Localized

The interface for adding additional custom actions to the WCM authoring interface. The action will appear within the standard button bar of the open item form.

The AuthoringAction can decide if the custom action is only valid in the read-mode

This class extends com.ibm.portal.Localized which is documented in the WebSphere Portal Infocenter. The com.ibm.portal.Localized interface provides the text to the used as the text of the button shown in the user interface.

The following is an example of an Authoring plugin definition: <extension point="com.ibm.workplace.wcm.api.AuthoringAction" id="SampleAuthoringAction"> <provider class="com.acme.MyAuthoringAction"/> </extension>

Since:
v8.0

Method Summary
 ActionResult execute(FormContext formContext)
          This method of the AuthoringAction will be invoked after a user clicks on the button visible in the object form.
 boolean isValidForForm(FormContext formContext)
          Flag whether this AuthoringAction should be included in the included on the specified forms button bar or ignored for this current open item.
 int ordinal()
          Get the desired relative order that this action will appear when compared to all other AuthoringActions that will be included on the authoring form.
 
Methods inherited from interface com.ibm.portal.Localized
getDescription, getLocales, getTitle
 

Method Detail

isValidForForm

boolean isValidForForm(FormContext formContext)
Flag whether this AuthoringAction should be included in the included on the specified forms button bar or ignored for this current open item.

NOTE: Any uncommitted changes made during the execution of this method to the Document contained within the FormContext for this method will be discarded.

NOTE: This method will be invoked each time the page is rendered to limit performance impacts do not perform any queries or updates.

Parameters:
formContext - The target authoring form
Returns:
true if this action should be included on the authoring form.

ordinal

int ordinal()
Get the desired relative order that this action will appear when compared to all other AuthoringActions that will be included on the authoring form. The AuthoringAction with the lowest value will be listed first.

Returns:
The ordinal. This value will be compared to all other AuthoringActions that will be included on the form. Actions will be ordered lowest value to highest.

execute

ActionResult execute(FormContext formContext)
This method of the AuthoringAction will be invoked after a user clicks on the button visible in the object form. NOTE: If the Authoring interface is in read mode then any uncommitted changes to the Document will be discarded. The authoring interface will be updated with the latest version of the Document when the form is reloaded.

Parameters:
formContext - The target authoring form
Returns:
ActionResult of this action invocation