org.apache.sling.installer.api.info
Interface Resource

All Superinterfaces:
RegisteredResource

public interface Resource
extends RegisteredResource

A resource provides all relevant information about a registered resource.

Since:
1.0

Method Summary
 java.lang.Object getAttribute(java.lang.String key)
          Get the value of an attribute.
 long getLastChange()
          When did the last change happen?
 ResourceState getState()
          Get the current state of the resource.
 org.osgi.framework.Version getVersion()
          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.


getVersion

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

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.

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


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