com.sas.actionprovider.support
Class BaseViewerSupport

com.sas.actionprovider.support.BaseViewerSupport
Direct Known Subclasses:
HttpViewerSupport, SwingViewerSupport

public abstract class BaseViewerSupport

The base implementation of the methods needed by all viewer components that acquire their Actions via the ActionProvider Framework (APF).

A basic understanding of the ActionProvider Framework, of which this class is a part, is recommended before attempting to use this class.



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 .

Since:
3.0

Constructor Summary
BaseViewerSupport(ActionProviderViewInterface viewer)
          Constructor that takes an instance of the view component that this class supports.
 
Method Summary
 java.lang.String getActionSupportType()
          Returns the key that is mapped to a particular support class in the APF.
 java.lang.Object getUniqueId()
          Returns the unique identifier used by the APF to distinguish between multiple components.
 boolean isActionVisible(java.lang.String actionType, java.lang.String areaType)
          Returns a boolean indicating if the action type is visible in the specified area.
abstract  java.util.Collection listActionTypes(java.lang.String areaType)
          Returns a Collection of String keys that define the valid actionTypes as defined by the support class that is currently associated with this component.
abstract  java.util.Collection listAreaTypes()
          Returns a Collection of String keys that define the valid areaTypes as defined by the support class that is currently associated with this component.
 void setActionSupportType(java.lang.String actionSupportType)
          Sets the key that is mapped to a particular support class in the APF.
 void setActionVisible(java.lang.String actionType, java.lang.String areaType, boolean visible)
          Sets the visibility status of the specified actionType for the specified area.
 void setUniqueId(java.lang.Object uniqueId)
          Sets the unique identifier used by the APF to distinguish between multiple components.
 

Constructor Detail

BaseViewerSupport

public BaseViewerSupport(ActionProviderViewInterface viewer)
Constructor that takes an instance of the view component that this class supports.

Parameters:
viewer - The instance of the view component.
Method Detail

setActionVisible

public void setActionVisible(java.lang.String actionType,
                             java.lang.String areaType,
                             boolean visible)
Sets the visibility status of the specified actionType for the specified area.

Parameters:
actionType - The key that identifies the type of action as defined by the support class.
areaType - The area affected by the change in visibility fort the actionType. If null, then the method call applies to all the known areaTypes.
visible - The boolean indicating whether the actionType should be visible.
Throws:
java.lang.IllegalArgumentException - if null or invalid actionType specified.
java.lang.IllegalArgumentException - if invalid areaType specified.
java.lang.IllegalStateException - if actionSupportType not set.
See Also:
isActionVisible(java.lang.String, java.lang.String)

isActionVisible

public boolean isActionVisible(java.lang.String actionType,
                               java.lang.String areaType)
Returns a boolean indicating if the action type is visible in the specified area.

Parameters:
actionType - The key that identifies the type of action as defined by the support class.
areaType - The key that identifies the type of area as defined by the support class. If null, the method returns true only if the action is visible in all areaTypes defined by the support class.
Returns:
a boolean indicating if the action type is visible in the specified area.
Throws:
java.lang.IllegalArgumentException - if null or invalid actionType specified.
java.lang.IllegalArgumentException - if invalid areaType specified.
See Also:
setActionVisible(java.lang.String, java.lang.String, boolean)

setActionSupportType

public void setActionSupportType(java.lang.String actionSupportType)
Sets the key that is mapped to a particular support class in the APF.

Parameters:
actionSupportType - The key that is associated with a particular support class.
See Also:
getActionSupportType(), ActionProviderSupportTypes

getActionSupportType

public java.lang.String getActionSupportType()
Returns the key that is mapped to a particular support class in the APF.

Returns:
the key that associated with a particular support class.
See Also:
setActionSupportType(java.lang.String), ActionProviderSupportTypes

getUniqueId

public java.lang.Object getUniqueId()
Returns the unique identifier used by the APF to distinguish between multiple components.

Returns:
the Viewer's uniqueId
See Also:
setUniqueId(java.lang.Object)

setUniqueId

public void setUniqueId(java.lang.Object uniqueId)
Sets the unique identifier used by the APF to distinguish between multiple components.

Parameters:
the - Viewer's uniqueId
See Also:
getUniqueId()

listAreaTypes

public abstract java.util.Collection listAreaTypes()
Returns a Collection of String keys that define the valid areaTypes as defined by the support class that is currently associated with this component.

Returns:
a Collection of String keys that define the valid areaTypes.
Throws:
java.lang.IllegalStateException - if actionSupportType not set.
See Also:
listActionTypes(java.lang.String), setActionSupportType(java.lang.String)

listActionTypes

public abstract java.util.Collection listActionTypes(java.lang.String areaType)
Returns a Collection of String keys that define the valid actionTypes as defined by the support class that is currently associated with this component.

Parameters:
areaType - The key associated with a defined areaType.
Returns:
a Collection of String keys that define the valid actionTypes.
Throws:
java.lang.IllegalStateException - if actionSupportType not set.
java.lang.IllegalArgumentException - if areaType is null.
See Also:
listAreaTypes(), setActionSupportType(java.lang.String)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.