public class TransformationResult extends Object
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 and Description |
---|
TransformationResult() |
Modifier and Type | Method and Description |
---|---|
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
|
org.osgi.framework.Version |
getVersion()
Get the version
|
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.
|
void |
setVersion(org.osgi.framework.Version version)
Set the version.
|
public String getResourceType()
null
.public InputStream getInputStream()
null
.public String getId()
null
.public void setResourceType(String resourceType)
resourceType
- The resource typepublic void setId(String id)
id
- The unique idpublic void setInputStream(InputStream inputStream)
inputStream
- The input streampublic Map<String,Object> getAttributes()
public void setVersion(org.osgi.framework.Version version)
version
- The new versionpublic org.osgi.framework.Version getVersion()
null
Copyright © 2015 The Apache Software Foundation. All rights reserved.