public class Contribution
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Contribution(java.net.URI uri) |
Contribution(java.net.URI uri,
org.fabric3.api.host.stream.Source source,
java.net.URL location,
long timestamp,
java.lang.String contentType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalLocation(java.net.URL location)
Adds an additional content location.
|
void |
addMetaData(java.lang.Object key,
java.lang.Object value)
Adds metadata to the context.
|
void |
addResolvedExtensionProvider(java.net.URI uri)
Adds the URI of the resolved extension provider.
|
void |
addResource(Resource resource)
Adds a resource to the contribution.
|
void |
addWire(ContributionWire<?,?> wire)
Adds a wire for an import
|
void |
deploy()
Deploys the contribution.
|
boolean |
equals(java.lang.Object o) |
java.util.List<java.net.URL> |
getAdditionalLocations()
Returns additional content locations for the contribution.
|
java.lang.String |
getContentType()
Returns the MIME type for the contribution.
|
java.net.URL |
getLocation()
Returns the local URL for the contribution artifact or null if the contribution is not a physical artifact (e.g.
|
ContributionManifest |
getManifest()
Returns the contribution manifest.
|
<T> T |
getMetaData(java.lang.Class<T> type,
java.lang.Object key)
Returns metadata stored metadata.
|
java.util.List<java.net.URI> |
getResolvedExtensionProviders()
Gets the URIs of the resolved extension providers.
|
java.util.List<Resource> |
getResources()
Returns the list of resources for the contribution.
|
org.fabric3.api.host.stream.Source |
getSource()
Returns a source for reading contents of the contribution.
|
ContributionState |
getState()
Returns the contribution lifecycle state.
|
long |
getTimestamp()
Returns the timestamp of the most recent update to the artifact.
|
java.net.URI |
getUri()
Returns the contribution URI.
|
java.util.List<ContributionWire<?,?>> |
getWires()
Returns the wires for this contribution.
|
void |
install()
Marks the contribution as installed.
|
void |
overrideLocation(java.net.URL location)
Used to override the contribution location during processing.
|
void |
removeMetaData(java.lang.Object key)
Removes metadata to the context.
|
void |
setManifest(ContributionManifest manifest)
Sets the contribution manifest.
|
void |
undeploy()
Undeploys the contribution.
|
void |
uninstall()
Uninstalls the contribution.
|
public Contribution(java.net.URI uri)
public Contribution(java.net.URI uri,
org.fabric3.api.host.stream.Source source,
java.net.URL location,
long timestamp,
java.lang.String contentType)
uri - the contribution URIsource - the source for reading the contribution contentslocation - the URL for the contribution archive. This can be null for contributions that are not physical archives.timestamp - the contribution artifact time stampcontentType - the contribution MIME typepublic java.net.URI getUri()
public ContributionState getState()
public void install()
public void uninstall()
public void deploy()
public void undeploy()
public java.net.URL getLocation()
public void overrideLocation(java.net.URL location)
location - the new contribution locationpublic java.util.List<java.net.URL> getAdditionalLocations()
public void addAdditionalLocation(java.net.URL location)
location - the locationpublic java.lang.String getContentType()
public org.fabric3.api.host.stream.Source getSource()
public long getTimestamp()
public ContributionManifest getManifest()
public void setManifest(ContributionManifest manifest)
manifest - the contribution manifestpublic void addResource(Resource resource)
resource - the resourcepublic java.util.List<Resource> getResources()
public void addWire(ContributionWire<?,?> wire)
wire - the wirepublic java.util.List<ContributionWire<?,?>> getWires()
public void addResolvedExtensionProvider(java.net.URI uri)
uri - the URI of the resolved extension provider.public java.util.List<java.net.URI> getResolvedExtensionProviders()
public void addMetaData(java.lang.Object key,
java.lang.Object value)
key - the metadata keyvalue - the metadata valuepublic void removeMetaData(java.lang.Object key)
key - the metadata keypublic <T> T getMetaData(java.lang.Class<T> type,
java.lang.Object key)
type - the expected metadata typekey - the metadata keypublic boolean equals(java.lang.Object o)
equals in class java.lang.Object