Interface TaskResource
- All Superinterfaces:
RegisteredResource
A task resource is a registered resource which has been
processed by a
ResourceTransformer
and is now
about to be processed by an InstallTask
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Object
getAttribute
(String key) Get the value of an attribute.@Nullable String
getError()
In case the resource was not successfully processed this might expose the related error descriptiongetState()
Get the current state of the resource.@Nullable Object
Get the value of a temporary attribute.@Nullable org.osgi.framework.Version
Return the version of the artifact.void
setAttribute
(String key, Object value) Set the value of an attribute.void
setTemporaryAttribute
(String key, 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 Details
-
ATTR_INSTALL_INFO
Additional installation information in human readable format.- See Also:
-
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:
-
-
Method Details
-
getAttribute
Get the value of an attribute. Attributes are specific to the resource and are either set by aResourceTransformer
or aInstallTask
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
Set the value of an attribute.- Parameters:
key
- The name of the attributevalue
- The attribute value ornull
to remove it.
-
getState
ResourceState getState()Get the current state of the resource.- Returns:
- The state of the resource.
-
getError
In case the resource was not successfully processed this might expose the related error description- Returns:
- an error string or
null
-
getTemporaryAttribute
Get the value of a temporary attribute.- Parameters:
key
- The name of the attribute- Returns:
- The value of the attribute or
null
-
setTemporaryAttribute
Set the value of a temporary attribute.- Parameters:
key
- The name of the attributevalue
- The attribute value ornull
to remove it.
-
getVersion
@Nullable @Nullable org.osgi.framework.Version getVersion()Return the version of the artifact.- Returns:
- The version of the artifact or
null
- Since:
- 1.2
-