Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.portal.propertybroker.property
Interface Action

All Known Subinterfaces:
  ActionController

    public interface Action

`Action` encapsulates the information used by the Property Broker to deliver property values provided by sources to targets. This interface does not have any dependencies on a WebSphere Portal environment as it is designed for reuse within general component environments where brokered communication may be provided. Multiple types of actions may be supported in the same environment or different environments. Action types which are natively supported in the WebSphere Portal environment are defined in the `ActionType` class. In the WebSphere Portal runtime environment, `Action` objects may be programmatically created using `PropertyBrokerService`, followed by invoking the setter methods found in `ActionController`, or may be created by the runtime by declaring equivalent information in a WSDL file.
Implementations of this interface must be Serializable.

Since:
  5.1.0.1
See Also:
  `PropertyBrokerService`, `Parameter`, `ActionController`, `ActionType`

Method Summary
`java.lang.String` | `getActionInvocationMetaData()` Returns additional metadata which may be useful for dispatchers of the action.
`java.lang.String` | `getActionNameParameter()` Returns the name of a parameter that should be used as a key for retrieving the action name when the action name cannot be directly passed.
`java.util.Map` | `getConstantParameters()` Returns an unmodifiable `Map` containing name, value entries.
`java.lang.String` | `getDescription(java.util.Locale locale)` Returns string containing a description of the action which can be used as a visual aid when displayed by tools or as help text.
`java.lang.Object` | `getId()` Returns a globally unique id identifying the property.
`boolean` | `getInvokeIfMultipleActionsActive()` Returns a boolean value indicating if this action should be invoked even if multiple actions on the owning component are simultaneously triggered for invocation.
`java.lang.String` | `getName()` Returns the name of the action.
`java.lang.Object` | `getOwningDefinitionId()` Returns the component owner definition id associated with this action.
`Parameter[]` | `getParameters()` Returns the `Parameter` array associated with this action.
`java.util.Locale[]` | `getSupportedLocales()` Returns the locales that are supported for the displayable text, such as the title and description, associated with the current action.
`java.lang.String` | `getTitle(java.util.Locale locale)` Returns a short string about the action suitable for displaying in a menu, in tools, or as help text.
`ActionType` | `getType()` Returns the type of the action.
`boolean` | `isInitiallyActive()` Returns a boolean value indicating if the action is active when the owning component is initialized and active, or whether the owning component will programmatically activate and deactivate the action.

Method Detail

### getName

    java.lang.String getName()

  Returns the name of the action. Must be unique withing the action set associated with a given component. The return value will normally not be null, as actions must have their name set prior to registering with the portal. See `ActionController` for setter methods.

  Returns:
    a `String` containing the action name
  See Also:
    `ActionController`

### getId

    java.lang.Object getId()

  Returns a globally unique id identifying the property. This cannot be set through `ActionController` but will be set by the runtime once the property has been created and registered. If the `Action` object has been created but not registered, null will be returned. Once the action is registered with the portal, the id will not be null.

  Returns:
    an `Object` which serves as the globally unique identifier for the property.

### getConstantParameters

    java.util.Map getConstantParameters()

  Returns an unmodifiable `Map` containing name, value entries. These entries will be passed to the action when it is invoked. How the entries are passed to the action is dependent on the action type and the runtime environment. For example, in the WebSphere Portal runtime environment, for an action type of `ActionType.STANDARD_PORTLET_ACTION`, the entries will be bound as request parameters. The values for the entries are restricted to strings. The keys and values in the `Map` are of type `String`.

  Returns:
    a `Map` of constant objects associated with this action

### getTitle

    java.lang.String getTitle(java.util.Locale locale)

  Returns a short string about the action suitable for displaying in a menu, in tools, or as help text. This will return the title for the specified locale. An exact match for the locale is required. If the title for the specified locale is not found, the action name is returned.

  Parameters:
    `locale` - the client locale
  Returns:
    the internationalized version of the title string

### getDescription

    java.lang.String getDescription(java.util.Locale locale)

  Returns string containing a description of the action which can be used as a visual aid when displayed by tools or as help text. This will return the description for the specified locale. An exact match is required for the locale.

  Parameters:
    `locale` - the client locale
  Returns:
    the internationalized version of the description string

### getOwningDefinitionId

    java.lang.Object getOwningDefinitionId()

  Returns the component owner definition id associated with this action. In a Websphere Portal environment this would be the portlet definition id. The return value will not be null.

  Returns:
    the definition id object this action is associated with.

### getParameters

    Parameter[] getParameters()

  Returns the `Parameter` array associated with this action. The length of the array will be at least one, as registered actions must have at least an input or an output parameter. The returned array must not be modified.

  Returns:
    the array of `Parameter` objects associated with this action.

### getType

    ActionType getType()

  Returns the type of the action. Different type values may be supported in the same or different runtime environments.

  Returns:
    the type of the action
  See Also:
    `ActionType`

### isInitiallyActive

    boolean isInitiallyActive()

  Returns a boolean value indicating if the action is active when the owning component is initialized and active, or whether the owning component will programmatically activate and deactivate the action. Only active actions are ready for invocation through the broker. Default value is true.

  Returns:
    boolean indicating if the action is active when the portlet is initialized

### getActionInvocationMetaData

    java.lang.String getActionInvocationMetaData()

  Returns additional metadata which may be useful for dispatchers of the action. This is a `String` which may be set at the time of action creation and is not modified by the runtime.

  Returns:
    the metadata

### getInvokeIfMultipleActionsActive

    boolean getInvokeIfMultipleActionsActive()

  Returns a boolean value indicating if this action should be invoked even if multiple actions on the owning component are simultaneously triggered for invocation. The default value is false.

  Returns:
    boolean true if this action should be invoked

### getSupportedLocales

    java.util.Locale[] getSupportedLocales()

  Returns the locales that are supported for the displayable text, such as the title and description, associated with the current action. If no locales were set at the time of action creation, an empty array is returned.
  The returned array must not be modified.

  Returns:
    the array of Locales

### getActionNameParameter

    java.lang.String getActionNameParameter()

  Returns the name of a parameter that should be used as a key for retrieving the action name when the action name cannot be directly passed. Used in runtime environments (such as WebSphere Portal JSR portlet container) where the action name is not directly passed to the implementation as a method argument. The specific manner in which the action name parameter is used is dependent on the runtime environment (for example, in the WebSphere Portal JSR portlet container, the action name parameter is the name of a request parameter where the action name is bound before the action is invoked).

  Returns:
    the action name parameter

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD