org.apache.sling.installer.api.tasks
Class TransformationResult

java.lang.Object
  extended by org.apache.sling.installer.api.tasks.TransformationResult

public class TransformationResult
extends 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().


Constructor Summary
TransformationResult()
           
 
Method Summary
 Map<String,Object> getAttributes()
          Attributes include the bundle symbolic name, bundle version, etc.
 String getId()
          Get the new unique id
 InputStream getInputStream()
          Get the new input stream
 String getResourceType()
          Get the new resource type
 void setAttributes(Map<String,Object> attr)
          Set the new attributes.
 void setId(String id)
          Set a new unique id.
 void setInputStream(InputStream inputStream)
          Set a new input stream.
 void setResourceType(String resourceType)
          Set a new resource type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationResult

public TransformationResult()
Method Detail

getResourceType

public String getResourceType()
Get the new resource type

Returns:
New resource type or null.

getInputStream

public InputStream getInputStream()
Get the new input stream

Returns:
New input stream or null.

getId

public String getId()
Get the new unique id

Returns:
New unique id or null.

setResourceType

public void setResourceType(String resourceType)
Set a new resource type.

Parameters:
resourceType - The resource type

setId

public void setId(String id)
Set a new unique id.

Parameters:
id - The unique id

setInputStream

public void setInputStream(InputStream inputStream)
Set a new input stream.

Parameters:
inputStream - The input stream

getAttributes

public Map<String,Object> getAttributes()
Attributes include the bundle symbolic name, bundle version, etc.


setAttributes

public void setAttributes(Map<String,Object> attr)
Set the new attributes.



Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.