|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.actionprovider.support.BaseActionProviderSupport
public abstract class BaseActionProviderSupport
The BaseActionProviderSupport class is the base class for all support classes of the Action Provider Framework( APF ). Support classes provide the functionality for registering and accessing Actions.
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 .
Field Summary | |
---|---|
static int |
AREA_DISABLED
Return value from getActionStatus method if the Action is disabled for
specific areas within a more general areaType. |
static java.lang.String |
AREA_VALUE_ATTRKEY
The Action attributeKey used to access the data value associated with the specific area where the Action is to be rendered. |
static int |
DISABLED
Return value from getActionStatus method if the Action is disabled for an
unspecified reason. |
static int |
ENABLED
Return value from getActionStatus method if the Action is fully operational. |
static int |
IS_CURRENT_STATE_DISABLED
Return value of getActionStatus method if Action is disabled
given that the intended state of the operation already exists. |
static int |
MODEL_MEMBER_DISABLED
Return value of getActionStatus method if Action is disabled for
a particular member of the model. |
static int |
MODEL_STATE_DISABLED
Return value of getActionStatus method if Action is disabled due
to some state of the model. |
static int |
MODEL_TYPE_DISABLED
Return value of getActionStatus method if Action is disabled for a
particular type of model. |
static java.lang.String |
NON_SPECIFIC_AREA
Reserved areaType key for use when registering Actions that map directly to some specific sub-component of a composite. |
static int |
UNSUPPORTED
Return value of getActionStatus method if Action is disabled due to the
command's isSupported returning false. |
static int |
VIEWER_DISABLED
Return value from getActionStatus method if the Action is disabled due
to some state of the Viewer. |
Constructor Summary | |
---|---|
BaseActionProviderSupport()
Default Constructor |
|
BaseActionProviderSupport(java.lang.Class actionClass)
ActionClass Constructor |
Method Summary | |
---|---|
protected void |
addDefaultAction(BaseAction action,
java.lang.String areaType)
Registers a default action for a specific area and ensure that the specified areaType is registered as a valid areaType. |
BaseAction |
getAction(java.lang.String actionType,
ActionSupportFilter actionFilter)
Returns the Action corresponding to the specified actionType. |
protected java.lang.String |
getActionId(ActionSupportFilter filter,
java.lang.String actionType,
java.lang.String orderListName)
|
ActionOrderList |
getActionOrderList(ActionProviderViewInterface viewer,
java.lang.String areaType)
Returns the order list that is used to control the structure and ordering of the ActionList returned by the getActions() method. |
BaseActionProvider |
getActionProvider()
Returns the instance of the ActionProvider that is using this support class. |
ActionList |
getActions(ActionSupportFilter actionFilter)
Returns an ActionList containing all the actions, both default and custom, that are available according to the information provided by the viewer component on the ActionSupportFilter . |
protected java.lang.Object |
getActionScopeAttribute(java.lang.String actionType,
java.lang.String attributeName,
ActionSupportFilter filter,
java.lang.Object currentValue)
Returns a specific dynamic value for an attribute whose value varies according to the type of action being generated. |
protected java.util.Map |
getActionScopeAttributeMap(java.lang.String actionType,
ActionSupportFilter filter)
Returns mappings for a pre-defined set of Action attribute keys to their corresponding dynamic values for a specific area and a specific actionType. |
BaseAction |
getDefaultAction(java.lang.String areaType,
java.lang.String actionType)
Return the specific default action registered for a specific areaType. |
java.util.Locale |
getLocale()
Get the locale |
abstract void |
initialize()
Initializes the support class. |
java.util.Collection |
listActionTypes(java.lang.String areaType)
Returns a Collection of String keys that define the valid actionTypes for the specified area of this support class. |
java.util.Collection |
listAreaTypes()
Returns a Collection of String keys that define the valid areaTypes for this support class. |
java.util.Collection |
listDefaultActions(java.lang.String areaType)
Return a Collection of all the default actions registered for a specific areaType. |
abstract BaseAction |
newActionInstance(java.lang.String areaType,
java.lang.String actionType)
Returns a new instance of a default actionType. |
void |
reset()
|
void |
setAction(BaseAction action,
java.util.Collection viewers,
Area area)
Override a default Action or add a custom action. |
void |
setActionOrderList(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 |
setActionProvider(BaseActionProvider actionProvider)
Sets the instance of the ActionProvider that is using this support class. |
void |
setLocale(java.util.Locale loc)
Set the locale |
Field Detail |
---|
public static final java.lang.String NON_SPECIFIC_AREA
public static final int ENABLED
getActionStatus
method if the Action is fully operational.
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int DISABLED
getActionStatus
method if the Action is disabled for an
unspecified reason.
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int VIEWER_DISABLED
getActionStatus
method if the Action is disabled due
to some state of the Viewer.
For example,
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int AREA_DISABLED
getActionStatus
method if the Action is disabled for
specific areas within a more general areaType.
For example,
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int MODEL_TYPE_DISABLED
getActionStatus
method if Action is disabled for a
particular type of model.
For example,
SortableInterface
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int MODEL_STATE_DISABLED
getActionStatus
method if Action is disabled due
to some state of the model.
For example,
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int MODEL_MEMBER_DISABLED
getActionStatus
method if Action is disabled for
a particular member of the model.
For example,
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int IS_CURRENT_STATE_DISABLED
getActionStatus
method if Action is disabled
given that the intended state of the operation already exists.
For example,
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
Constant Field Valuespublic static final int UNSUPPORTED
getActionStatus
method if Action is disabled due to the
command's isSupported
returning false.
This key is returned when the Action's command implements the CommandSupportedInterface and
its isSupported() method return false.
getActionStatus(com.sas.actionprovider.BaseAction, com.sas.actionprovider.ActionSupportFilter)
,
CommandSupportedInterface
,
Constant Field Valuespublic static final java.lang.String AREA_VALUE_ATTRKEY
Constructor Detail |
---|
public BaseActionProviderSupport()
public BaseActionProviderSupport(java.lang.Class actionClass)
actionClass
- The base type of class this support class should create instances of and
return for all of its default action types unless overridden on a per-actionType basis.Method Detail |
---|
public ActionOrderList getActionOrderList(ActionProviderViewInterface viewer, java.lang.String areaType)
viewer
- The viewer this order list affects.
If null, the default orderlist for this support class is returned.
If non-null, the orderlist registered for the specific viewer is returned.
If non-null and an orderlist is not reqistered for the specific viewer, a copy of the default orderlist is registered for the viewer and then returned.
areaType
- The area this order list affects.
java.lang.IllegalArgumentException
- if areaType is not valid.setActionOrderList(com.sas.actionprovider.ActionOrderList, com.sas.actionprovider.ActionProviderViewInterface, java.lang.String)
public void setActionOrderList(ActionOrderList orderList, ActionProviderViewInterface viewer, java.lang.String areaType)
orderList
- The order list.viewer
- The viewer this order list affects.
If null, the specified orderlist replaces the default orderList for this support class.
areaType
- The area this order list affects.
java.lang.IllegalArgumentException
- if any of the arguments are null or if areaType is not valid.getActionOrderList(com.sas.actionprovider.ActionProviderViewInterface, java.lang.String)
public void setAction(BaseAction action, java.util.Collection viewers, Area area)
action
- The custom or override action object.viewers
- The collection of viewers to which this Action should be available.area
- The Area object that specifies the area where this action should be available.
java.lang.IllegalArgumentException
- if any of the arguments are invalid.public ActionList getActions(ActionSupportFilter actionFilter)
ActionSupportFilter
.
actionFilter
- the ActionSupportFilter that the component passed as an
argument on the getActions() method.
java.lang.IllegalArgumentException
- if the filter is invalid.public BaseAction getAction(java.lang.String actionType, ActionSupportFilter actionFilter)
actionType
- the type of action to be returned.actionFilter
- the ActionSupportFilter.
java.lang.IllegalArgumentException
- if the filter is invalid or actionType is null.public BaseAction getDefaultAction(java.lang.String areaType, java.lang.String actionType)
areaType
- areaType the areaType key which is associated with a defined area.actionType
- The actionType key that is associated with the action to be returned.
listDefaultActions(java.lang.String)
protected java.lang.String getActionId(ActionSupportFilter filter, java.lang.String actionType, java.lang.String orderListName)
protected java.lang.Object getActionScopeAttribute(java.lang.String actionType, java.lang.String attributeName, ActionSupportFilter filter, java.lang.Object currentValue)
actionType
- The key that uniquely identifies this type of action.attributeName
- The name of the dynamic attribute.filter
- Defines the specific area.currentValue
- The current value of this attribute on the actionprotected java.util.Map getActionScopeAttributeMap(java.lang.String actionType, ActionSupportFilter filter)
actionType
- filter
- Defines the specific area.public java.util.Collection listAreaTypes()
listActionTypes(java.lang.String)
public java.util.Collection listActionTypes(java.lang.String areaType)
areaType
- The key associated with a defined areaType.
java.lang.IllegalArgumentException
- if areaType is null.listAreaTypes()
protected void addDefaultAction(BaseAction action, java.lang.String areaType)
action
- the Action to be registered.areaType
- the areaType key which is associated with a defined area.
java.lang.IllegalArgumentException
- if action or areaType or action's actionType are null.public java.util.Collection listDefaultActions(java.lang.String areaType)
areaType
- areaType the areaType key which is associated with a defined area.
public void setLocale(java.util.Locale loc)
loc
- The locale to be used for locale-dependent action attributes.public java.util.Locale getLocale()
public void reset()
public void setActionProvider(BaseActionProvider actionProvider)
actionProvider
- the instance of the ActionProvider that is using this support class.getActionProvider()
public BaseActionProvider getActionProvider()
setActionProvider(com.sas.actionprovider.BaseActionProvider)
public abstract void initialize()
Called by the ActionProvider after it sets the locale on this support class.
setLocale(java.util.Locale)
public abstract BaseAction newActionInstance(java.lang.String areaType, java.lang.String actionType)
Returns null if actionType is valid but not defined by the support class.
areaType
- the key associated with a defined area type.actionType
- the key associated with a defined action type.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |