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


public interface TaskResourceGroup

This is a group of resources all pointing to the same artifact, but maybe in different versions or locations.


Method Summary
 TaskResource getActiveResource()
          Return the first resource if it either needs to be installed or uninstalled.
 java.lang.String getAlias()
          Get the current alias for this group.
 TaskResource getNextActiveResource()
          If there is more than the active resource in the group, return the second resource from the group.
 void setFinishState(ResourceState state)
          Set the finish state for the active resource.
 void setFinishState(ResourceState state, java.lang.String alias)
          Set the finish state for the active resource and register an alias.
 

Method Detail

getActiveResource

TaskResource getActiveResource()
Return the first resource if it either needs to be installed or uninstalled.


getNextActiveResource

TaskResource getNextActiveResource()
If there is more than the active resource in the group, return the second resource from the group.

Since:
1.1

setFinishState

void setFinishState(ResourceState state)
Set the finish state for the active resource. If this resource has been uninstalled, check the next in the list if it needs to be reactivated.


setFinishState

void setFinishState(ResourceState state,
                    java.lang.String alias)
Set the finish state for the active resource and register an alias. This method does the same as setFinishState(ResourceState) but in addition registers an alias id for the resource.

Since:
1.1
See Also:
setFinishState(ResourceState)

getAlias

java.lang.String getAlias()
Get the current alias for this group.

Returns:
The alias or null
Since:
1.1


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