com.ibm.wps.pb.property
Interface Action


Deprecated. since 6.0.1 Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.

public interface Action

For use by portlets written to the IBM portlet API only.

Action encapsulates the information used by the Property Broker to deliver property values provided by source portlets to target portlets. The target portlet may implement the action either as a portlet action (via the ActionListener interface), or as a Struts action. Action objects will be implicitly created and registered with the Property Broker if defined in a WSDL file. Otherwise, they may be explicitly created and registered programmatically. May be programmatically created using PropertyFactory, followed by invoking the setters.

This interface is for use by portlets using the IBM portlet API.

Since:
5.0
See Also:
ActionListener, PropertyFactory, PropertyBrokerService

Field Summary
static int DEFAULT_PORTLET_ACTION
          Deprecated. Specifies delivery using DefaultPortletAction.
static int SIMPLE_PORTLET_ACTION
          Deprecated. Specifies delivery using a simple action string
static int STRUTS_ACTION
          Deprecated. Specifies delivery using Struts
 
Method Summary
 boolean getActiveOnStartup()
          Deprecated.  
 java.util.Map getConstantParameters()
          Deprecated. Returns a Map containing name, value entries.
 java.lang.String getDescription()
          Deprecated.  
 java.lang.String getDescription(java.util.Locale locale)
          Deprecated. Returns a string containing a description of the action which can be used as a visual aid.
 boolean getInvokeOnMultipleMatch()
          Deprecated.  
 java.lang.String getName()
          Deprecated. Returns the name of the action.
 java.lang.Object getOwnerId()
          Deprecated. Returns an id representing the portlet which registered this action.
 Parameter[] getParameters()
          Deprecated. Returns the parameters associated with the action.
 java.lang.String getTitle()
          Deprecated.  
 java.lang.String getTitle(java.util.Locale locale)
          Deprecated. Returns a short string about the action suitable for displaying in a menu.
 int getType()
          Deprecated. Returns the type of the action.
 boolean isActiveOnStartup()
          Deprecated. Returns true if this action is active on portlet startup.
 boolean isImplementedBy(PortletSettings caller)
          Deprecated. Returns true if the action was registered by the calling portlet.
 boolean isInvocableOnMultipleMatch()
          Deprecated. Returns a boolean indicating whether the action should be processed if it is simultaneously triggered with other actions on the same portlet (due to multiple wires being activated, or multiple actions being triggered through a Click-to-Action menu, for example).
 void setActiveOnStartup(boolean activeOnStartup)
          Deprecated. Sets the activeOnStartup parameter for this action.
 void setConstantParameters(java.util.Map params)
          Deprecated. Sets constant parameters associated with the Action, by way of name, value entries in a Map.
 void setDescription(java.lang.String descriptionKey)
          Deprecated.  
 void setDescriptionKey(java.lang.String descriptionKey)
          Deprecated. Sets the key for the description.
 void setInvocableOnMultipleMatch(boolean invokeOnMultipleMatch)
          Deprecated. Sets the parameter used to specify whether the action can be invoked in the event multiple matching actions are available for invocation on the portlet.
 void setInvokeOnMultipleMatch(boolean invokeOnMultipleMatch)
          Deprecated.  
 void setLocalizationInfo(java.lang.String nlsFileName, PortletContext context, java.util.Locale[] locales)
          Deprecated. This data is used to retrieve internationalized versions of the title and description.
 void setName(java.lang.String name)
          Deprecated. Sets the name of the action.
 void setParameters(Parameter[] params)
          Deprecated. Sets the action parameters.
 void setTitle(java.lang.String titleKey)
          Deprecated.  
 void setTitleKey(java.lang.String titleKey)
          Deprecated. Sets the key for the title.
 void setType(int type)
          Deprecated. Sets the type of this action.
 

Field Detail

DEFAULT_PORTLET_ACTION

static final int DEFAULT_PORTLET_ACTION
Deprecated. 
Specifies delivery using DefaultPortletAction. The use of this value is deprecated and is retained for backwards compatibility

See Also:
Constant Field Values

SIMPLE_PORTLET_ACTION

static final int SIMPLE_PORTLET_ACTION
Deprecated. 
Specifies delivery using a simple action string

See Also:
Constant Field Values

STRUTS_ACTION

static final int STRUTS_ACTION
Deprecated. 
Specifies delivery using Struts

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Deprecated. 
Returns the name of the action. Must be unique for a given portlet.

Returns:
a String containing the action name

getConstantParameters

java.util.Map getConstantParameters()
Deprecated. 
Returns a Map containing name, value entries. These entries will be passed to the action when it is invoked through the property broker. How the entries are passed to the action is dependent on the action type. For actions implemented by portlets, the values are passed as request parameters. The values for the entries are restricted to String.

Returns:
an unmodifiable Map of constant objects associated with this action. If no constant parameters were set, an empty Map is returned.
Since:
5.1

getParameters

Parameter[] getParameters()
Deprecated. 
Returns the parameters associated with the action.

Returns:
an array of Parameter objects containing the parameter information for this action
See Also:
Parameter

getTitle

java.lang.String getTitle()
Deprecated. 

This method is deprecated. Use the locale-specific version.

Returns:
a String containing the title
See Also:
getTitle(Locale)

getDescription

java.lang.String getDescription()
Deprecated. 

This method is deprecated. Use the locale-specific version.

Returns:
a String containing the description
See Also:
getTitle(Locale)

getTitle

java.lang.String getTitle(java.util.Locale locale)
Deprecated. 
Returns a short string about the action suitable for displaying in a menu. This will return the title for the specified locale. Displayed in Click-to-Action menus, tools, or as help text as an aid to the user.

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

getDescription

java.lang.String getDescription(java.util.Locale locale)
Deprecated. 
Returns a string containing a description of the action which can be used as a visual aid. Displayed in tools or as help text as an aid to the user. This will return the description for the specified locale.

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

isInvocableOnMultipleMatch

boolean isInvocableOnMultipleMatch()
Deprecated. 
Returns a boolean indicating whether the action should be processed if it is simultaneously triggered with other actions on the same portlet (due to multiple wires being activated, or multiple actions being triggered through a Click-to-Action menu, for example). If return value is true, then this action will be invoked even if other actions on the portlet are simultaneously triggered. This is a safety mechanism used to prevent multiple actions from being invoked on the portlet even if simultaneously triggered, unless explictly overridden through this setting. The default value is false.

Returns:
a boolean value

getInvokeOnMultipleMatch

boolean getInvokeOnMultipleMatch()
Deprecated. 

This method is deprecated. Use isInvocableOnMultipleMatch instead.

See Also:
isInvocableOnMultipleMatch()

getType

int getType()
Deprecated. 
Returns the type of the action.

Returns:
the type of the action, ie DEFAULT_PORTLET_ACTION et. al. See the constants in this interface for allowed values.

getOwnerId

java.lang.Object getOwnerId()
Deprecated. 
Returns an id representing the portlet which registered this action.

Returns:
an Object representing the id of the portlet which registered this action. May be used in comparisons.

isImplementedBy

boolean isImplementedBy(PortletSettings caller)
Deprecated. 
Returns true if the action was registered by the calling portlet.

Parameters:
caller - the PortletSettings object identifying the calling portlet
Returns:
true iff this action was registered by by the portlet identified by the PortletSettings object passed in.

isActiveOnStartup

boolean isActiveOnStartup()
Deprecated. 
Returns true if this action is active on portlet startup.

Returns:
true iff this action is active on portlet startup. If false, the portlet must make a call to activateActions in the PropertyBrokerService interface.
See Also:
PropertyBrokerService

getActiveOnStartup

boolean getActiveOnStartup()
Deprecated. 

This method is deprecated. Use isActiveOnStartup instead.

See Also:
isActiveOnStartup()

setName

void setName(java.lang.String name)
Deprecated. 
Sets the name of the action.

Parameters:
name - the name
See Also:
getName()

setConstantParameters

void setConstantParameters(java.util.Map params)
Deprecated. 
Sets constant parameters associated with the Action, by way of name, value entries in a Map. The values are restricted to String. If this method is called multiple times, the values in the Map passed to the last call override previous values. If null or an empty Map is passed, any constant parameters set earlier are cleared.

Parameters:
params - a Map of constant String values.
Throws:
java.lang.ClassCastException - if the name or value is not String.
java.lang.IllegalArgumentException - if the parameters do not satisfy required constraints.
Since:
5.1
See Also:
getConstantParameters()

setParameters

void setParameters(Parameter[] params)
                   throws InvalidPropertyException
Deprecated. 
Sets the action parameters.

Parameters:
params - an array of Parameter objects.
Throws:
InvalidPropertyException - is thrown if the parameters do not satisfy required constraints.
See Also:
Parameter, InvalidPropertyException, getParameters()

setTitle

void setTitle(java.lang.String titleKey)
Deprecated. 

This method is deprecated. Use setTitleKey instead.

Parameters:
titleKey - the key for the title
See Also:
setTitleKey(String)

setTitleKey

void setTitleKey(java.lang.String titleKey)
Deprecated. 
Sets the key for the title. The key is used in conjunction with the localization info set in the setLocalizationInfo method to retrieve the translated title for supported locales.

Parameters:
titleKey - the key for the title

setDescription

void setDescription(java.lang.String descriptionKey)
Deprecated. 

This method is deprecated. Use setDescriptionKey instead.

Parameters:
descriptionKey - the key for the description
See Also:
setDescriptionKey(String)

setDescriptionKey

void setDescriptionKey(java.lang.String descriptionKey)
Deprecated. 
Sets the key for the description. The key is used in conjunction with the localization info set in the setLocalizationInfo method to retrieve the translated description for supported locales.

Parameters:
descriptionKey - the key for the description

setLocalizationInfo

void setLocalizationInfo(java.lang.String nlsFileName,
                         PortletContext context,
                         java.util.Locale[] locales)
Deprecated. 
This data is used to retrieve internationalized versions of the title and description.

Parameters:
nlsFileName - the base name of the nls resource file(s) containing translated strings
context - the PortletContext for the calling portlet
locales - the locales supported by this portlet

setInvocableOnMultipleMatch

void setInvocableOnMultipleMatch(boolean invokeOnMultipleMatch)
Deprecated. 
Sets the parameter used to specify whether the action can be invoked in the event multiple matching actions are available for invocation on the portlet. See the isInvocableOnMultipleMatch method description for a description of the semantics of this parameter.

Parameters:
invokeOnMultipleMatch - true or false
See Also:
isInvocableOnMultipleMatch()

setInvokeOnMultipleMatch

void setInvokeOnMultipleMatch(boolean invokeOnMultipleMatch)
Deprecated. 

This method is deprecated. Use setInvocableOnMultipleMatch instead.

See Also:
setInvocableOnMultipleMatch(boolean)

setType

void setType(int type)
             throws InvalidPropertyException
Deprecated. 
Sets the type of this action. Must be one of the type values defined in this class. DEFAULT_PORTLET_ACTION is the default if not set.

Parameters:
type - the type of the action
Throws:
InvalidPropertyException - is thrown if the type does not satisfy the required constraint.

setActiveOnStartup

void setActiveOnStartup(boolean activeOnStartup)
Deprecated. 
Sets the activeOnStartup parameter for this action. See the getActiveOnStartup method description for a description of this parameter.

Parameters:
activeOnStartup - true or false
See Also:
isActiveOnStartup()