Class TransformationResult
java.lang.Object
org.apache.sling.installer.api.tasks.TransformationResult
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
-
Method Summary
Modifier and TypeMethodDescriptionAttributes include the bundle symbolic name, bundle version, etc.getId()
Get the new unique idGet the new input streamGet the new resource typeorg.osgi.framework.Version
Get the versionvoid
setAttributes
(Map<String, Object> attr) Set the new attributes.void
Set a new unique id.void
setInputStream
(InputStream inputStream) Set a new input stream.void
setResourceType
(String resourceType) Set a new resource type.void
setVersion
(org.osgi.framework.Version version) Set the version.toString()
-
Constructor Details
-
TransformationResult
public TransformationResult()
-
-
Method Details
-
getResourceType
Get the new resource type- Returns:
- New resource type or
null
.
-
getInputStream
Get the new input stream- Returns:
- New input stream or
null
.
-
getId
Get the new unique id- Returns:
- New unique id or
null
.
-
setResourceType
Set a new resource type.- Parameters:
resourceType
- The resource type
-
setId
Set a new unique id.- Parameters:
id
- The unique id
-
setInputStream
Set a new input stream.- Parameters:
inputStream
- The input stream
-
getAttributes
Attributes include the bundle symbolic name, bundle version, etc.- Returns:
- The map if attributes.
-
setAttributes
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
-