com.sas.servlet.tbeans
Class BaseActionCompositeTransformation

com.sas.servlet.tbeans.BaseActionCompositeTransformation
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
com.sas.servlet.tbeans.BaseActionCompositeTransformation2, GraphComposite, com.sas.servlet.tbeans.olapgraphics.html.OLAPGraphComposite, ShowDetailDataComposite

public abstract class BaseActionCompositeTransformation
implements HttpActionProviderViewInterface

See Also:
Serialized Form

Field Summary
protected  HttpViewerSupport viewerSupport
           
 
Constructor Summary
BaseActionCompositeTransformation()
          Default constructor.
 
Method Summary
 java.lang.String applyTemplate(BaseTransformation tbean)
          Applies the template by getting the dictionary from the following areas:
ComponentMap - if the tbean implements com.sas.servlet.tbeans.CompositeComponentInterface ComponentStyleMap - if the tbean implements com.sas.servlet.tbeans.ComplexStyleInterface TemplateDictionary - if the tbean implements com.sas.servlet.tbeans.TemplateInterface.
 java.lang.String applyTemplate(BaseTransformation tbean, java.lang.String _template)
          Applies the template by getting the dictionary from the following areas:
ComponentMap - if the tbean implements com.sas.servlet.tbeans.CompositeComponentInterface ComponentStyleMap - if the tbean implements com.sas.servlet.tbeans.ComplexStyleInterface TemplateDictionary - if the tbean implements com.sas.servlet.tbeans.TemplateInterface.
 void dispose()
           This method exists for consumers to call when they are done with a component to ensure that the HttpActionProvider is cleared of all references to and for the component.
protected  ActionSupportFilter getActionFilter(java.lang.String actionType)
          Returns the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.
 java.lang.String getActionSupportType()
          Return the key that associated with a particular support class in the ActionProvider framework.
protected  HttpAction getComponentAction(java.lang.Object componentKey)
          Returns an action that is associated with the specified componentKey.
 java.lang.Object getComponentActionType(java.lang.Object componentKey)
          Returns the actionType key associated with the specified componentKey.
 java.lang.Object getUniqueId()
          Returns the Viewer's uniqueId
protected  HttpViewerSupport getViewerSupport()
           
 boolean isActionVisible(java.lang.String actionType, java.lang.String areaType)
          Returns a boolean indicating if the action type is visible everywhere in the specified areaType.
 java.util.Collection listActionTypes(java.lang.String areaType)
          Returns a Collection of String keys that define the valid actionTypes for the specified area of the action support class designated the actionSupportType attribute.
 java.util.Collection listAreaTypes()
          Returns a Collection of String keys that define the valid areaTypes for the action support class designated by the actionSupportType attribute.
protected  void moveActionAttributesToComponent(HttpAction action, java.lang.Object component)
           
 void setActionProvider(HttpActionProvider provider)
          Sets the ActionProvider object for all components in the composite requiring an ActionProvider.
 void setActionSupportType(java.lang.String actionSupportType)
          Set the key that associated with a particular support class in the ActionProvider framework.
 void setActionVisible(java.lang.String actionType, java.lang.String areaType, boolean visible)
          Sets the visible status of the specified actionType for the specified area.
 void setComponent(java.lang.String componentKey, TransformationInterface tbean, java.lang.String actionType)
          Adds or sets a component to the list of components contained in the composite component.
 void setComponentActionType(java.lang.Object componentKey, java.lang.Object actionTypeKey)
          Sets the mapping from component key to actionType key.
 void setUniqueId(java.lang.Object uniqueId)
          Sets the Viewer's uniqueId
 void writeTemplate(BaseTransformation tbean, java.lang.String _template, java.io.PrintWriter out)
          Writes the template by getting the dictionary from the following areas:
ComponentMap - if the tbean implements com.sas.servlet.tbeans.CompositeComponentInterface ComponentStyleMap - if the tbean implements com.sas.servlet.tbeans.ComplexStyleInterface TemplateDictionary - if the tbean implements com.sas.servlet.tbeans.TemplateInterface.
 
Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
getActionProvider, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, write
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
getRequest, setRequest
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
getActionProvider
 

Field Detail

viewerSupport

protected HttpViewerSupport viewerSupport
Constructor Detail

BaseActionCompositeTransformation

public BaseActionCompositeTransformation()
Default constructor.

Method Detail

getUniqueId

public java.lang.Object getUniqueId()
Returns the Viewer's uniqueId

Specified by:
getUniqueId in interface ActionProviderViewInterface
Returns:
the Viewer's uniqueId
See Also:
ActionProviderViewInterface.setUniqueId(java.lang.Object)

setUniqueId

public void setUniqueId(java.lang.Object uniqueId)
Sets the Viewer's uniqueId

Specified by:
setUniqueId in interface ActionProviderViewInterface
Parameters:
uniqueId - the Viewer's uniqueId
See Also:
ActionProviderViewInterface.getUniqueId()

setActionVisible

public void setActionVisible(java.lang.String actionType,
                             java.lang.String areaType,
                             boolean visible)
Sets the visible status of the specified actionType for the specified area. The actionType must be non-null. The actionType and areaType must be valid in the support class that is associated with this classes current actionSupportType attribute.

Specified by:
setActionVisible in interface ActionProviderViewInterface
Parameters:
actionType - The key that identifies the type of action.
area - 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 hidden or unhidden.
Throws:
java.lang.IllegalArgumentException - if non-null Area specified with a null areaType attribute.
java.lang.IllegalStateException - if actionSupportType not set.
See Also:
ActionProviderViewInterface.isActionVisible(java.lang.String, java.lang.String), ActionProviderSupportTypes

isActionVisible

public boolean isActionVisible(java.lang.String actionType,
                               java.lang.String areaType)
Returns a boolean indicating if the action type is visible everywhere in the specified areaType. If the actionType is not visible anywhere anywhere in the areaType, then false is returned.

Specified by:
isActionVisible in interface ActionProviderViewInterface
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.
Returns:
a boolean indicating if the action type is visible everywhere in the specified areaType.
See Also:
ActionProviderViewInterface.setActionVisible(java.lang.String, java.lang.String, boolean), ActionProviderSupportTypes

listAreaTypes

public java.util.Collection listAreaTypes()
Returns a Collection of String keys that define the valid areaTypes for the action support class designated by the actionSupportType attribute.

Specified by:
listAreaTypes in interface ActionProviderViewInterface
Returns:
a Collection of String keys that define the valid areaTypes for the specified support class.
See Also:
ActionProviderViewInterface.listActionTypes(java.lang.String), ActionProviderViewInterface.setActionSupportType(java.lang.String)

listActionTypes

public java.util.Collection listActionTypes(java.lang.String areaType)
Returns a Collection of String keys that define the valid actionTypes for the specified area of the action support class designated the actionSupportType attribute.

Specified by:
listActionTypes in interface ActionProviderViewInterface
Parameters:
areaType - The key associated with a defined areaType.
Returns:
a Collection of String keys that define the valid actionTypes for the specified area of the specified support class.
See Also:
ActionProviderViewInterface.listAreaTypes(), ActionProviderViewInterface.setActionSupportType(java.lang.String)

setActionSupportType

public void setActionSupportType(java.lang.String actionSupportType)
Set the key that associated with a particular support class in the ActionProvider framework.

Specified by:
setActionSupportType in interface ActionProviderViewInterface
Parameters:
actionSupportType - The key that is associated with a particular support class.
See Also:
ActionProviderViewInterface.getActionSupportType(), ActionProviderSupportTypes

getActionSupportType

public java.lang.String getActionSupportType()
Return the key that associated with a particular support class in the ActionProvider framework.

Specified by:
getActionSupportType in interface ActionProviderViewInterface
Returns:
the key that associated with a particular support class.
See Also:
ActionProviderViewInterface.setActionSupportType(java.lang.String), ActionProviderSupportTypes

getComponentActionType

public java.lang.Object getComponentActionType(java.lang.Object componentKey)
Returns the actionType key associated with the specified componentKey.

Parameters:
componentKey -
Returns:
the actionType key.

setComponentActionType

public void setComponentActionType(java.lang.Object componentKey,
                                   java.lang.Object actionTypeKey)
Sets the mapping from component key to actionType key.

Parameters:
componentKey -
actionTypeKey -

setComponent

public void setComponent(java.lang.String componentKey,
                         TransformationInterface tbean,
                         java.lang.String actionType)
Adds or sets a component to the list of components contained in the composite component. Components .must all have a unique componentKey. ComponentKeys are defined for complex and composite components in com.sas.servlet.tbeans.component-name.component-nameKeysInterface.

Parameters:
componentKey - unique component keys.
tbean - Transformation Bean.

getComponentAction

protected HttpAction getComponentAction(java.lang.Object componentKey)
Returns an action that is associated with the specified componentKey.

Parameters:
componentKey -
Returns:
an action that is associated with the specified componentKey.

getActionFilter

protected ActionSupportFilter getActionFilter(java.lang.String actionType)
Returns the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.

Parameters:
actionType. -
Returns:
the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.

applyTemplate

public java.lang.String applyTemplate(BaseTransformation tbean)
Applies the template by getting the dictionary from the following areas:

Overrides:
applyTemplate in class BaseCompositeTransformation
Parameters:
tbean - The TransformationBean which implements a com.sas.servlet.tbeans.TemplateInterface
Returns:
the applied template

applyTemplate

public java.lang.String applyTemplate(BaseTransformation tbean,
                                      java.lang.String _template)
Applies the template by getting the dictionary from the following areas:

Overrides:
applyTemplate in class BaseCompositeTransformation
Parameters:
tbean - The TransformationBean which implements a com.sas.servlet.tbeans.TemplateInterface
_template - Custom Template. If null and tbean implements TemplateInterface, getTemplate() or getTemplateFileName() will be used
Returns:
the applied template

writeTemplate

public void writeTemplate(BaseTransformation tbean,
                          java.lang.String _template,
                          java.io.PrintWriter out)
Writes the template by getting the dictionary from the following areas:

Overrides:
writeTemplate in class BaseCompositeTransformation
Parameters:
tbean - The TransformationBean which implements a com.sas.servlet.tbeans.TemplateInterface
_template - Custom Template. If null and tbean implements TemplateInterface, getTemplate() or getTemplateFileName() will be used
out - The PrintWriter to which the template will be written.

moveActionAttributesToComponent

protected void moveActionAttributesToComponent(HttpAction action,
                                               java.lang.Object component)

dispose

public void dispose()

This method exists for consumers to call when they are done with a component to ensure that the HttpActionProvider is cleared of all references to and for the component.

Calling any methods on a component after it has been disposed is not recommended and can have undesirable results.

See Also:
HttpActionProvider

getViewerSupport

protected HttpViewerSupport getViewerSupport()

setActionProvider

public void setActionProvider(HttpActionProvider provider)
Sets the ActionProvider object for all components in the composite requiring an ActionProvider.

Specified by:
setActionProvider in interface HttpActionProviderInterface
Overrides:
setActionProvider in class BaseCompositeTransformation
Parameters:
provider - HttpActionProvider Object
See Also:
HttpActionProviderInterface.getActionProvider()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.