Class TransformationResult
- java.lang.Object
-
- org.apache.sling.installer.api.tasks.TransformationResult
-
public class TransformationResult extends Object
A result of aResourceTransformer. In most cases the new transformation result just contains new content (provided throughgetInputStream(). However, if the transformer is able to detect the new resource type and sets it, it must also provide a unique id (getResourceType()andgetId().
-
-
Constructor Summary
Constructors Constructor Description TransformationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getAttributes()Attributes include the bundle symbolic name, bundle version, etc.StringgetId()Get the new unique idInputStreamgetInputStream()Get the new input streamStringgetResourceType()Get the new resource typeorg.osgi.framework.VersiongetVersion()Get the versionvoidsetAttributes(Map<String,Object> attr)Set the new attributes.voidsetId(String id)Set a new unique id.voidsetInputStream(InputStream inputStream)Set a new input stream.voidsetResourceType(String resourceType)Set a new resource type.voidsetVersion(org.osgi.framework.Version version)Set the version.StringtoString()
-
-
-
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.- Returns:
- The map if attributes.
-
setAttributes
public void setAttributes(Map<String,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
-
-