org.apache.sling.installer.api.tasks
Interface TaskResource

All Superinterfaces:
RegisteredResource

public interface TaskResource
extends RegisteredResource

A task resource is a registered resource which has been processed by a ResourceTransformer and is now about to be processed by an .


Field Summary
static java.lang.String ATTR_INSTALL_EXCLUDED
          If this attribute is set and the resource has the state installed, it actually means that this resource has been processed but not installed.
static java.lang.String ATTR_INSTALL_INFO
          Additional installation information in human readable format.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String key)
          Get the value of an attribute.
 ResourceState getState()
          Get the current state of the resource.
 java.lang.Object getTemporaryAttribute(java.lang.String key)
          Get the value of a temporary attribute.
 org.osgi.framework.Version getVersion()
          Return the version of the artifact.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set the value of an attribute.
 void setTemporaryAttribute(java.lang.String key, java.lang.Object value)
          Set the value of a temporary attribute.
 
Methods inherited from interface org.apache.sling.installer.api.tasks.RegisteredResource
getDictionary, getDigest, getEntityId, getInputStream, getPriority, getScheme, getType, getURL
 

Field Detail

ATTR_INSTALL_INFO

static final java.lang.String ATTR_INSTALL_INFO
Additional installation information in human readable format.

See Also:
Constant Field Values

ATTR_INSTALL_EXCLUDED

static final java.lang.String ATTR_INSTALL_EXCLUDED
If this attribute is set and the resource has the state installed, it actually means that this resource has been processed but not installed. For example this can be used to exclude environment specific bundles on non supported environments etc. The value of this attribute should contain some human readable reason why this resource has been excluded.

See Also:
Constant Field Values
Method Detail

getAttribute

java.lang.Object getAttribute(java.lang.String key)
Get the value of an attribute. Attributes are specific to the resource and are either set by a ResourceTransformer or a InstallTask for processing. Typical attributes are the bundle symbolic name or bundle version.

Parameters:
key - The name of the attribute
Returns:
The value of the attribute or null

setAttribute

void setAttribute(java.lang.String key,
                  java.lang.Object value)
Set the value of an attribute.

Parameters:
key - The name of the attribute
value - The attribute value or null to remove it.

getState

ResourceState getState()
Get the current state of the resource.


getTemporaryAttribute

java.lang.Object getTemporaryAttribute(java.lang.String key)
Get the value of a temporary attribute.

Parameters:
key - The name of the attribute
Returns:
The value of the attribute or null

setTemporaryAttribute

void setTemporaryAttribute(java.lang.String key,
                           java.lang.Object value)
Set the value of a temporary attribute.

Parameters:
key - The name of the attribute
value - The attribute value or null to remove it.

getVersion

org.osgi.framework.Version getVersion()
Return the version of the artifact.

Returns:
The version of the artifact or null
Since:
1.2


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.