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
Modifier and TypeMethodDescription@Nullable TaskResource
Return the first resource if it either needs to be installed or uninstalled.@Nullable Iterator<TaskResource>
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
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 Details
-
getActiveResource
Return the first resource if it either needs to be installed or uninstalled.- Returns:
- The task resource.
-
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
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
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
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
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:
-
getAlias
Get the current alias for this group.- Returns:
- The alias or
null
. - Since:
- 1.1
-