public class Resource
extends java.lang.Object
| Constructor and Description |
|---|
Resource(Contribution contribution,
org.fabric3.api.host.stream.Source source,
java.lang.String contentType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResourceElement(ResourceElement<?,?> element)
Adds a resource element.
|
java.lang.String |
getContentType()
Returns the resource content type
|
Contribution |
getContribution()
Returns the contribution this resource is contained in.
|
java.util.List<ResourceElement<?,?>> |
getResourceElements()
Returns a map of resource elements keyed by their symbol.
|
org.fabric3.api.host.stream.Source |
getSource()
Returns the source for reading the resource contents.
|
ResourceState |
getState()
Returns resource state.
|
void |
setContribution(Contribution contribution)
Overrides the contribution this resource is contained in.
|
void |
setState(ResourceState state)
Sets the resource state.
|
public Resource(Contribution contribution, org.fabric3.api.host.stream.Source source, java.lang.String contentType)
public Contribution getContribution()
public void setContribution(Contribution contribution)
contribution - the containing contributionpublic java.lang.String getContentType()
public org.fabric3.api.host.stream.Source getSource()
public void addResourceElement(ResourceElement<?,?> element)
element - the resourceElementpublic java.util.List<ResourceElement<?,?>> getResourceElements()
public ResourceState getState()
public void setState(ResourceState state)
state - the resource state