Interface Resource
- 
- All Superinterfaces:
 RegisteredResource
@ProviderType public interface Resource extends RegisteredResource
A resource provides all relevant information about a registered resource.- Since:
 - 1.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable java.lang.ObjectgetAttribute(java.lang.String key)Get the value of an attribute.@Nullable java.lang.StringgetError()In case the resource was not successfully processed this might expose the related error descriptionlonggetLastChange()When did the last change happen?ResourceStategetState()Get the current state of the resource.@Nullable org.osgi.framework.VersiongetVersion()Return the version of the artifact.- 
Methods inherited from interface org.apache.sling.installer.api.tasks.RegisteredResource
getDictionary, getDigest, getEntityId, getInputStream, getPriority, getScheme, getType, getURL 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getState
ResourceState getState()
Get the current state of the resource.- Returns:
 - The resource state.
 
 
- 
getError
@Nullable @Nullable java.lang.String getError()
In case the resource was not successfully processed this might expose the related error description- Returns:
 - an error string or 
null 
 
- 
getVersion
@Nullable @Nullable org.osgi.framework.Version getVersion()
Return the version of the artifact.- Returns:
 - The version of the artifact or 
null 
 
- 
getLastChange
long getLastChange()
When did the last change happen?- Returns:
 - -1 if no change , 0 if unknown, > 0 otherwise
 
 
- 
getAttribute
@Nullable @Nullable 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 aResourceTransformeror aInstallTaskfor processing.- Parameters:
 key- The name of the attribute- Returns:
 - The value of the attribute or 
null 
 
 - 
 
 -