public abstract class

AbstractTransformable

extends AbstractPersistable
implements Transformable
java.lang.Object
   ↳ com.microstrategy.utils.serialization.AbstractPersistable
     ↳ com.microstrategy.web.beans.AbstractTransformable
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This is a base class for transformable objects. It provides default implementation of many methods defined in this interface.

See Also

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Fields
protected BeanContext _beanContext
Public Constructors
AbstractTransformable()
Public Methods
TransformInstance addTransform(Transform transform)
Please also override hasTransform(String) if overriding this method.
TransformInstance addTransformByClass(String transformClass)
Adds into the collection of transforms a Transform object with the specified fully qualified class name.
TransformInstance addTransformByStyle(String style, StyleRequestContext context)
Adds into the collection of transforms a Transform object with the specified style name.
TransformInstance addTransformByStyle(String style)
Adds into the collection of transforms a Transform object with the specified style name.
void clearTransforms()
Deletes all transforms added to the object
BeanContext getBeanContext()
Returns an instance of BeanContext.
String getMessageString(String key)
Returns the string descriptor from a Messages instance, which is in turn retrieved from the BeanContext if any.
Enumeration getMyTransformInstances()
TransformInstance getTransformInstance()
Returns the default TransformInstance object
TransformInstance getTransformInstance(String key)
Returns the TransformInstance object with the specified key.
Enumeration getTransformInstances()
Retuns a java.util.Enumeration over all the TransformInstance objects.
boolean hasTransform()
Returns a boolean value indicating whether there is a default TransformInstance object.
boolean hasTransform(String key)
Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.
void invalidateTransformCache()
This method is called by any transformable object after collecting data
void setBeanContext(BeanContext beanContext)
Sets an instance of BeanContext on the current WebBean.
MarkupOutput transform(String key)
Performs transform on a component by the TransformInstance with the specified key.
MarkupOutput transform()
Performs transform on a component by the default TransformInstance object.
Protected Methods
TransformInstance addTransform(Transform transform, String key)
TransformInstance createTransformInstance(Transform transform)
TransformInstance createTransformInstance(Transform transform, TransformKeyMapper m)
TransformInstance getDefaultTransform()
Returns default transform associated with this object
void internalCollectData(boolean collectOnError, boolean collectOnProcessing)
Overriding method should not only throw WebBeanException, but also sets error info if possible.
void internalCollectData(boolean collectOnError)
Overriding method should not only throw WebBeanException, but also sets error info if possible.
void internalCollectData()
Overriding method should not only throw WebBeanException, but also sets error info if possible.
boolean isTransformSuitable(Transform transform)
This method is called in the addTransform methods.
BeanContext newDefaultBeanContext()
This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.
StyleRequestContext newStyleRequestContext()
MarkupOutput transform(TransformInstance ti)
void transform(Transform t, MarkupOutput mo)
All public transform methods eventually delegate to this method.
[Expand]
Inherited Methods
From class com.microstrategy.utils.serialization.AbstractPersistable
From class java.lang.Object
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.Transformable

Fields

protected BeanContext _beanContext

Public Constructors

public AbstractTransformable ()

Public Methods

public TransformInstance addTransform (Transform transform)

Please also override hasTransform(String) if overriding this method.

Parameters
transform a Transform to add
Returns
  • a TransformInstance holding the transform added.
Throws
IllegalArgumentException

public TransformInstance addTransformByClass (String transformClass)

Adds into the collection of transforms a Transform object with the specified fully qualified class name. The first transform added is automatically set to be the default transform. Any transform added has a key of value null.

The collection of TransformInstance is a synchronized collection.

Parameters
transformClass the fully qualified class name of the Transform object to be added.
Returns
  • a TransformInstance holding the transform added.
Throws
IllegalArgumentException
WebTransformException

public TransformInstance addTransformByStyle (String style, StyleRequestContext context)

Adds into the collection of transforms a Transform object with the specified style name. The first transform added is automatically set to be the default transform. Any transform added has a key of value null.

The collection of TransformInstance is a synchronized collection.

Parameters
style the style name in a style catalog.
context the StyleRequestContext object.
Returns
  • a TransformInstance holding the transform added.
Throws
IllegalArgumentException
WebTransformException

public TransformInstance addTransformByStyle (String style)

Adds into the collection of transforms a Transform object with the specified style name. The first transform added is automatically set to be the default transform. Any transform added has a key of value null.

The collection of TransformInstance is a synchronized collection.

Parameters
style the style name in a style catalog.
Returns
  • a TransformInstance holding the transform added.
Throws
IllegalArgumentException
WebTransformException

public void clearTransforms ()

Deletes all transforms added to the object

public BeanContext getBeanContext ()

Returns an instance of BeanContext.

Returns

public String getMessageString (String key)

Returns the string descriptor from a Messages instance, which is in turn retrieved from the BeanContext if any. The string descriptor is mapped by the specified key. A String of value "ERROR" is returned if there is no such a string descriptor.

Parameters
key the key mapped to a string descriptor in a Messages
Returns
  • the string descriptor from a Messages.

public Enumeration getMyTransformInstances ()

public TransformInstance getTransformInstance ()

Returns the default TransformInstance object

Returns
  • the default TransformInstance object; null if there is no default TransformInstance object.

public TransformInstance getTransformInstance (String key)

Returns the TransformInstance object with the specified key.

Parameters
key the key of a TransformInstance.
Returns
  • the TransformInstance object with the specified key.

public Enumeration getTransformInstances ()

Retuns a java.util.Enumeration over all the TransformInstance objects.

Returns
  • a java.util.Enumeration over all the TransformInstance objects.

public boolean hasTransform ()

Returns a boolean value indicating whether there is a default TransformInstance object.

Returns
  • true if there is a default transform.

public boolean hasTransform (String key)

Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.

Parameters
key the key of a Transform
Returns
  • true if there is such a TransformInstance with the specified key.

public void invalidateTransformCache ()

This method is called by any transformable object after collecting data

public void setBeanContext (BeanContext beanContext)

Sets an instance of BeanContext on the current WebBean.

Parameters
beanContext the BeanContext instance to set.

public MarkupOutput transform (String key)

Performs transform on a component by the TransformInstance with the specified key. This method is synchronized on the TransformInstance object.

Parameters
key the key of a TransformInstance object.
Returns
  • a MarkupOutput object containing the result of transform.

public MarkupOutput transform ()

Performs transform on a component by the default TransformInstance object. This method is synchronized on the TransformInstance object.

Returns
  • a MarkupOutput object containing the result of transform.

Protected Methods

protected TransformInstance addTransform (Transform transform, String key)

Throws
IllegalArgumentException

protected TransformInstance createTransformInstance (Transform transform)

protected TransformInstance createTransformInstance (Transform transform, TransformKeyMapper m)

protected TransformInstance getDefaultTransform ()

Returns default transform associated with this object

protected void internalCollectData (boolean collectOnError, boolean collectOnProcessing)

Overriding method should not only throw WebBeanException, but also sets error info if possible.

Parameters
collectOnError will attempt to collect data even if object in in error.
collectOnProcessing will attempt to collect data even if object is in processing.
Throws
WebBeanException thrown if there is severe errors when collecting data

protected void internalCollectData (boolean collectOnError)

Overriding method should not only throw WebBeanException, but also sets error info if possible.

Parameters
collectOnError will attempt to collect data even if object in in error.
Throws
WebBeanException thrown if there is severe errors when collecting data

protected void internalCollectData ()

Overriding method should not only throw WebBeanException, but also sets error info if possible. This is equivalent to internalCollectData(true).

Throws
WebBeanException thrown if there is severe errors when collecting data

protected boolean isTransformSuitable (Transform transform)

This method is called in the addTransform methods. It verifies that the passed transform is suitable for this object. Default implementation simply calls transform's supports method.

protected BeanContext newDefaultBeanContext ()

This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.

protected StyleRequestContext newStyleRequestContext ()

protected void transform (Transform t, MarkupOutput mo)

All public transform methods eventually delegate to this method. This method calls transform an the passed transform object passing itself and mo as parameters.

Throws
IllegalArgumentException
TransformDoesNotExistException