Class AbstractTransformable

    • Constructor Detail

      • AbstractTransformable

        public AbstractTransformable()
    • Method Detail

      • addTransform

        public TransformInstance addTransform​(Transform transform)
                                       throws java.lang.IllegalArgumentException
        Please also override hasTransform(String) if overriding this method.
        Specified by:
        addTransform in interface Transformable
        Parameters:
        transform - a Transform to add
        Returns:
        a TransformInstance holding the transform added.
        Throws:
        java.lang.IllegalArgumentException
      • createTransformInstance

        protected TransformInstance createTransformInstance​(Transform transform)
        Since:
        MicroStrategy Web 9.0.1
      • addTransform

        protected TransformInstance addTransform​(Transform transform,
                                                 java.lang.String key)
                                          throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 9.0.0
      • addTransformByClass

        public TransformInstance addTransformByClass​(java.lang.String transformClass)
                                              throws WebTransformException,
                                                     java.lang.IllegalArgumentException
        Description copied from interface: Transformable
        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.

        Specified by:
        addTransformByClass in interface Transformable
        Parameters:
        transformClass - the fully qualified class name of the Transform object to be added.
        Returns:
        a TransformInstance holding the transform added.
        Throws:
        WebTransformException - thrown if the specified transform can not be found or instantiated.
        java.lang.IllegalArgumentException
      • addTransformByStyle

        public TransformInstance addTransformByStyle​(java.lang.String style)
                                              throws WebTransformException,
                                                     java.lang.IllegalArgumentException
        Description copied from interface: Transformable
        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.

        Specified by:
        addTransformByStyle in interface Transformable
        Parameters:
        style - the style name in a style catalog.
        Returns:
        a TransformInstance holding the transform added.
        Throws:
        WebTransformException - thrown if the specified transform can not be instantiated.
        java.lang.IllegalArgumentException
      • newStyleRequestContext

        protected StyleRequestContext newStyleRequestContext()
        Since:
        MicroStrategy Web 9.0.0
      • addTransformByStyle

        public TransformInstance addTransformByStyle​(java.lang.String style,
                                                     StyleRequestContext context)
                                              throws WebTransformException,
                                                     java.lang.IllegalArgumentException
        Description copied from interface: Transformable
        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.

        Specified by:
        addTransformByStyle in interface Transformable
        Parameters:
        style - the style name in a style catalog.
        context - the StyleRequestContext object.
        Returns:
        a TransformInstance holding the transform added.
        Throws:
        WebTransformException - thrown if the specified transform can not be instantiated.
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 8.0.1
      • hasTransform

        public boolean hasTransform()
        Description copied from interface: Transformable
        Returns a boolean value indicating whether there is a default TransformInstance object.
        Specified by:
        hasTransform in interface Transformable
        Returns:
        true if there is a default transform.
      • hasTransform

        public boolean hasTransform​(java.lang.String key)
        Description copied from interface: Transformable
        Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.
        Specified by:
        hasTransform in interface Transformable
        Parameters:
        key - the key of a Transform
        Returns:
        true if there is such a TransformInstance with the specified key.
      • getTransformInstance

        public TransformInstance getTransformInstance()
        Description copied from interface: Transformable
        Returns the default TransformInstance object
        Specified by:
        getTransformInstance in interface Transformable
        Returns:
        the default TransformInstance object; null if there is no default TransformInstance object.
      • getTransformInstances

        public java.util.Enumeration getTransformInstances()
        Description copied from interface: Transformable
        Retuns a java.util.Enumeration over all the TransformInstance objects.
        Specified by:
        getTransformInstances in interface Transformable
        Returns:
        a java.util.Enumeration over all the TransformInstance objects.
      • getMyTransformInstances

        public java.util.Enumeration getMyTransformInstances()
        Specified by:
        getMyTransformInstances in interface Transformable
        Since:
        MicroStrategy Web 9.0.0
      • invalidateTransformCache

        public void invalidateTransformCache()
        This method is called by any transformable object after collecting data
        Specified by:
        invalidateTransformCache in interface Transformable
      • internalCollectData

        protected void internalCollectData​(boolean collectOnError)
                                    throws WebBeanException
        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
        Since:
        MicroStrategy Web 9.0.0
      • internalCollectData

        protected void internalCollectData​(boolean collectOnError,
                                           boolean collectOnProcessing)
                                    throws WebBeanException
        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
        Since:
        MicroStrategy Web 9.4.0
      • getDefaultTransform

        protected TransformInstance getDefaultTransform()
        Returns default transform associated with this object
      • isTransformSuitable

        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.
      • newDefaultBeanContext

        protected BeanContext newDefaultBeanContext()
        This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.
        Since:
        MicroStrategy Web 9.0.0
      • getMessageString

        public java.lang.String getMessageString​(java.lang.String key)
        Description copied from interface: Transformable
        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.
        Specified by:
        getMessageString in interface Transformable
        Parameters:
        key - the key mapped to a string descriptor in a Messages
        Returns:
        the string descriptor from a Messages.
      • clearTransforms

        public void clearTransforms()
        Deletes all transforms added to the object
        Specified by:
        clearTransforms in interface Transformable
        Since:
        MicroStrategy Web 8.0.0