public class ModelTargetUtil extends Object
| Constructor and Description |
|---|
ModelTargetUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<ModelTarget> |
addTargetIfNotPresent(List<ModelTarget> targets, ModelTarget newTarget)
Add a target to a list of targets if it is not already present
|
static List<ModelTarget> |
explodeTargets(EnvironmentModel model, List<ModelTarget> targets)
Create an exploded list of target objects that do not contain any wildcards.
|
static List<ModelTarget> |
explodeTargets(EnvironmentModel model, ModelTarget target)
Create an exploded list of target objects that do not contain any wildcards.
|
static List<ModelTarget> |
filterTargets(List<ModelTarget> targets, List<ModelTarget.ModelTargetType> allowedTypes)
Filter a list of targets to those allowed by a particular action
|
static List<ModelTarget> |
filterTargets(List<ModelTarget> targets, ModelTarget.ModelTargetType allowedType)
Filter a list of targets to those allowed by a particular action
|
static List<ModelTarget> |
findInvalidTargets(List<ModelTarget> targets, ModelTarget.ModelTargetType allowedType)
Returns a list of targets not allowed by a particular action
|
public static List<ModelTarget> addTargetIfNotPresent(List<ModelTarget> targets, ModelTarget newTarget)
targets - the list of targetsnewTarget - the target to be added if not presentpublic static List<ModelTarget> explodeTargets(EnvironmentModel model, ModelTarget target) throws FMWEnvSpecException
model - the environment modeltarget - the target to explodeFMWEnvSpecException - if an error occurspublic static List<ModelTarget> explodeTargets(EnvironmentModel model, List<ModelTarget> targets) throws FMWEnvSpecException
model - the environment modeltargets - the list of targets to explodeFMWEnvSpecException - if an error occurspublic static List<ModelTarget> filterTargets(List<ModelTarget> targets, ModelTarget.ModelTargetType allowedType)
targets - list of all targets for lifecycle operationallowedType - target type allowed by the actionpublic static List<ModelTarget> filterTargets(List<ModelTarget> targets, List<ModelTarget.ModelTargetType> allowedTypes)
targets - list of all targets for lifecycle operationallowedTypes - target types allowed by the actionpublic static List<ModelTarget> findInvalidTargets(List<ModelTarget> targets, ModelTarget.ModelTargetType allowedType)
targets - list of all targets for lifecycle operationallowedType - target type allowed by the action