Interface TaskResourceGroup
-
@ProviderType public interface TaskResourceGroup
This is a group of resources all pointing to the same artifact, but maybe in different versions or locations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable TaskResource
getActiveResource()
Return the first resource if it either needs to be installed or uninstalled.@Nullable Iterator<TaskResource>
getActiveResourceIterator()
Return an iterator over all active resources in this group if there is more than just one active resourcew.@Nullable String
getAlias()
Get the current alias for this group.@Nullable 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, String alias)
Set the finish state for the active resource and register an alias.void
setFinishState(ResourceState state, String alias, String error)
Set the finish state for the active resource and register an alias.
-
-
-
Method Detail
-
getActiveResource
@Nullable @Nullable TaskResource getActiveResource()
Return the first resource if it either needs to be installed or uninstalled.- Returns:
- The task resource.
-
getNextActiveResource
@Nullable @Nullable TaskResource getNextActiveResource()
If there is more than the active resource in the group, return the second resource from the group.- Returns:
- The next task resource or
null
. - Since:
- 1.1
-
getActiveResourceIterator
@Nullable @Nullable Iterator<TaskResource> getActiveResourceIterator()
Return an iterator over all active resources in this group if there is more than just one active resourcew. The iterator does not allow to modify the group.- Returns:
- An iterator for all active resources in this group or {code null} if there is no or just one active resource.
- Since:
- 1.6
-
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.- Parameters:
state
- The finish state.
-
setFinishState
void setFinishState(ResourceState state, String alias)
Set the finish state for the active resource and register an alias. This method does the same assetFinishState(ResourceState)
but in addition registers an alias id for the resource.- Parameters:
state
- The finish state.alias
- The alias for this group (may benull
).- Since:
- 1.1
- See Also:
setFinishState(ResourceState)
-
setFinishState
void setFinishState(ResourceState state, String alias, String error)
Set the finish state for the active resource and register an alias. In addition set an error text (may be null). This method does the same assetFinishState(ResourceState)
but in addition registers an alias id for the resource and an error text.- Parameters:
state
- The finish state.alias
- The alias for this group (may benull
).error
- The error text explaining why the finish state was set (may benull
) .- Since:
- 1.4
- See Also:
setFinishState(ResourceState)
-
getAlias
@Nullable @Nullable String getAlias()
Get the current alias for this group.- Returns:
- The alias or
null
. - Since:
- 1.1
-
-