|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.actionprovider.BaseActionProvider
public abstract class BaseActionProvider
The BaseActionProvider class is the Base class for the ActionProviders of the Action Provider Framework (APF).
Components that implement the appropriate viewer interface:
may query an ActionProvider for Actions via its getActions() method.
A basic understanding of the ActionProvider Framework, of which this class is a part, is recommended before attempting to use this class.
For general information on the ActionProvider Framework, including an overview of how
the primary classes of the framework work together, refer to the
package documentation.
com.sas.actionprovider
For examples demonstrating how to use the ActionProvider Framework, including how to override default Actions or add new custom Actions, refer to the Samples Site.
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
Constructor Summary | |
---|---|
BaseActionProvider()
Default Constructor |
Method Summary | |
---|---|
void |
addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Add a listener for the com.sas.commands.ActionProviderEvent event. |
BaseAction |
getAction(java.lang.String actionType,
ActionSupportFilter filter)
Returns the Action corresponding to the specified actionType. |
ActionOrderList |
getActionOrderList(java.lang.String supportType,
ActionProviderViewInterface viewer,
java.lang.String areaType)
Returns the order list that is used to control the structure and ordering of the ActionList returned via the getActions() method. |
ActionList |
getActions(ActionSupportFilter filter)
Returns a list of the Actions that are supported for the component area specified by the filter. |
BaseAction |
getDefaultAction(java.lang.String supportType,
java.lang.String areaType,
java.lang.String actionType)
Returns the Action associated with the specified actionType and areaType on the support class that is associated with the supportType argument. |
java.util.Locale |
getLocale()
Gets the locale that is given to each support class that this ActionProvider instantiates. |
java.lang.String |
getName()
Returns the name of the ActionProvider. |
java.util.Collection |
listActionTypes(java.lang.String supportType,
java.lang.String areaType)
Returns a Collection of String keys that are the valid actionTypes for the specified area of the specified support class. |
java.util.Collection |
listAreaTypes(java.lang.String supportType)
Returns a Collection of keys that are the valid areaTypes for the specified support class. |
java.util.Collection |
listDefaultActions(java.lang.String supportType,
java.lang.String areaType)
Returns a Collection of the valid actions for the given areaType as defined by the support class associated with the supportType argument. |
BaseAction |
newActionInstance(java.lang.String supportType,
java.lang.String areaType,
java.lang.String actionType)
Returns a new instance of a default actionType. |
void |
removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Remove a listener for the com.sas.commands.ActionProviderEvent event. |
void |
setAction(BaseAction action,
java.util.Collection viewers,
Area area)
Register a new Action with the ActionProvider for the purpose of either overriding a default Action or adding a custom Action. |
void |
setActionOrderList(java.lang.String supportType,
ActionOrderList orderList,
ActionProviderViewInterface viewer,
java.lang.String areaType)
Sets the order list that is used to control the structure and ordering of the ActionList returned via the getActions() method. |
void |
setLocale(java.util.Locale loc)
Sets the locale that is given to each support class that this ActionProvider instantiates. |
void |
setName(java.lang.String name)
Sets the name of the ActionProvider |
Constructor Detail |
---|
public BaseActionProvider()
Method Detail |
---|
public ActionList getActions(ActionSupportFilter filter)
Note: If poolingOn attribute is true on the ActionSupportFilter argument then the acquired ActionList must be returned via the returnActionList() method.
Note: If poolingOn attribute is true then the entityKey attribute of the returned ActionLists and Actions is not guaranteed to be unique.
filter
- Encapsulates a set of attributes that identify the viewer and the specific area for which it is querying.
java.lang.IllegalArgumentException
- if filter attributes invalid.
java.lang.IllegalStateException
- if an instance of the support class could not be acquired.public BaseAction getAction(java.lang.String actionType, ActionSupportFilter filter)
Note: If poolingOn attribute is true on the ActionSupportFilter argument then the acquired ActionList must be returned via the returnAction() method.
Note: If poolingOn attribute is true then the entityKey attribute of the returned Action is not guaranteed to be unique.
actionType
- the type of action to be returned.actionFilter
- the ActionSupportFilter.
java.lang.IllegalArgumentException
- if the filter is invalid or actionType is null.public void setAction(BaseAction action, java.util.Collection viewers, Area area)
If the actionType of the registered action is not present in the default ActionOrderList
for the specified areaType, then the default ActionOrderList is updated so that the new action is
positioned at the end of the root-level ActionOrderList.
To change the default order and positioning of the new Action, the new ActionType must be removed from the default ActionOrderList and added to the position of choice.
action
- The Action object to be registered with the ActionProvider.viewers
- A collection of all the viewer instances to which this Action should be available.area
- The Area object that specifies a general area type and, possibly, more specific area
type values.
Valid values for the Area's type and value are provided by the support class associated with the Action's specified supportType.
java.lang.IllegalArgumentException
- if the action, viewers or Area method args are invalid.
java.lang.IllegalStateException
- if the support class to which
this action should be registered could not be acquired.newActionInstance(java.lang.String, java.lang.String, java.lang.String)
public void setLocale(java.util.Locale loc)
loc
- the locale that is given to each support class that this ActionProvider instantiates.getLocale()
public java.util.Locale getLocale()
setLocale(java.util.Locale)
public java.util.Collection listDefaultActions(java.lang.String supportType, java.lang.String areaType)
Caution should be exercised when changing any of these Actions' attributes because the Actions that a support class actually returns will be based on these default actions. Users should only change these Action attributes if they are sure that those changes should apply to all viewer components that might request these actions.
Users should use the setAction() method if they want to restrict their changes to certain viewers or other conditions.
supportType
- The key that maps to a specific support class from which to retrieve the actions.areaType
- The key specifying which area-based subset of actions should be returned.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if support class needed to
query for default actions could not be acquired.setAction(com.sas.actionprovider.BaseAction, java.util.Collection, com.sas.actionprovider.Area)
,
listActionTypes(java.lang.String, java.lang.String)
,
listAreaTypes(java.lang.String)
public BaseAction getDefaultAction(java.lang.String supportType, java.lang.String areaType, java.lang.String actionType)
Caution should be exercised when changing any of this Action's attributes because the Action that a support class actually returns will be based on this default action. Users should only change these Action attributes if they are sure that those changes should apply to all viewer components that might request this action.
Users should use the setAction() method if they want to restrict their changes to certain viewers or other conditions.
supportType
- The key that maps to a specific support class from which to retrieve the actions.areaType
- The key specifying which area-based subset of actions should be returned.actionType
- The key associated with a particular default action.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if support class needed
to query for default action could not be acquired.setAction(com.sas.actionprovider.BaseAction, java.util.Collection, com.sas.actionprovider.Area)
,
listActionTypes(java.lang.String, java.lang.String)
,
listAreaTypes(java.lang.String)
public java.lang.String getName()
setName(java.lang.String)
public void setName(java.lang.String name)
name
- Name of the ActionProvidergetName()
public BaseAction newActionInstance(java.lang.String supportType, java.lang.String areaType, java.lang.String actionType)
Returns null if actionType is valid but not defined by the support class.
supportType
- The key associated with a support class.areaType
- The key associated with a defined areaType of the support class.actionType
- The key associated with a defined actionType of the support class.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if
support class needed to query for the new action instance could not be acquired.listAreaTypes(java.lang.String)
,
listActionTypes(java.lang.String, java.lang.String)
public java.util.Collection listAreaTypes(java.lang.String supportType)
The areaType keys are String Objects.
supportType
- The key associated with a support class.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if support class could not be acquired.
#listActionTypespublic java.util.Collection listActionTypes(java.lang.String supportType, java.lang.String areaType)
The actionType keys are String Objects.
supportType
- The key associated with a support class.areaType
- The key associated with a defined areaType of the support class.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if support class could not be acquired.
#listAreaTypes
#getDefaultAction
#listDefaultActionspublic void setActionOrderList(java.lang.String supportType, ActionOrderList orderList, ActionProviderViewInterface viewer, java.lang.String areaType)
supportType
- The supportType key that identifies the support class
to which this order list affects.orderList
- The order list.viewer
- The viewer this order list affects.
If null, the specified orderlist becomes the default.
areaType
- The area this order list affects.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.
java.lang.IllegalStateException
- if
support class needed for registration of this list could not be acquired.getActionOrderList(java.lang.String, com.sas.actionprovider.ActionProviderViewInterface, java.lang.String)
public ActionOrderList getActionOrderList(java.lang.String supportType, ActionProviderViewInterface viewer, java.lang.String areaType)
supportType
- The supportType key that identifies the support class
to which this order list affects.viewer
- The viewer this order list affects.
If null, the default orderlist for this support class is returned. If non-null and an orderList has not be registered for the viewer, the default orderList for this support class is returned.
areaType
- The area this order list affects.
java.lang.IllegalStateException
- if support class needed to query for the order list could not be acquired.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.setActionOrderList(java.lang.String, com.sas.actionprovider.ActionOrderList, com.sas.actionprovider.ActionProviderViewInterface, java.lang.String)
public void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
listener
- an object which handles ActionProviderEvent events.
The listener is not added a second time if it already exists
in the list of listeners for this event. If listener is null,
it is ignored.ContentsChangedSource
public void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
listener
- an object which handles ActionProviderEvent eventsContentsChangedSource
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |