Class TransformationResult


  • public class TransformationResult
    extends java.lang.Object
    A result of a ResourceTransformer. In most cases the new transformation result just contains new content (provided through getInputStream(). However, if the transformer is able to detect the new resource type and sets it, it must also provide a unique id ( getResourceType() and getId().
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
      Attributes include the bundle symbolic name, bundle version, etc.
      java.lang.String getId()
      Get the new unique id
      java.io.InputStream getInputStream()
      Get the new input stream
      java.lang.String getResourceType()
      Get the new resource type
      org.osgi.framework.Version getVersion()
      Get the version
      void setAttributes​(java.util.Map<java.lang.String,​java.lang.Object> attr)
      Set the new attributes.
      void setId​(java.lang.String id)
      Set a new unique id.
      void setInputStream​(java.io.InputStream inputStream)
      Set a new input stream.
      void setResourceType​(java.lang.String resourceType)
      Set a new resource type.
      void setVersion​(org.osgi.framework.Version version)
      Set the version.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TransformationResult

        public TransformationResult()
    • Method Detail

      • getResourceType

        public java.lang.String getResourceType()
        Get the new resource type
        Returns:
        New resource type or null.
      • getInputStream

        public java.io.InputStream getInputStream()
        Get the new input stream
        Returns:
        New input stream or null.
      • getId

        public java.lang.String getId()
        Get the new unique id
        Returns:
        New unique id or null.
      • setResourceType

        public void setResourceType​(java.lang.String resourceType)
        Set a new resource type.
        Parameters:
        resourceType - The resource type
      • setId

        public void setId​(java.lang.String id)
        Set a new unique id.
        Parameters:
        id - The unique id
      • setInputStream

        public void setInputStream​(java.io.InputStream inputStream)
        Set a new input stream.
        Parameters:
        inputStream - The input stream
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Attributes include the bundle symbolic name, bundle version, etc.
        Returns:
        The map if attributes.
      • setAttributes

        public void setAttributes​(java.util.Map<java.lang.String,​java.lang.Object> attr)
        Set the new attributes.
        Parameters:
        attr - The map of attributes
      • setVersion

        public void setVersion​(org.osgi.framework.Version version)
        Set the version.
        Parameters:
        version - The new version
        Since:
        1.2
      • getVersion

        public org.osgi.framework.Version getVersion()
        Get the version
        Returns:
        The version or null
        Since:
        1.2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object