public abstract class ModelTargetImpl extends Object implements ModelTarget
ModelTarget.ModelTargetType
ALL_NAMES_WILDCARD, ID_PREFIX, NAME_PREFIX, VALIDATE_MODEL_PROPERTY
Constructor and Description |
---|
ModelTargetImpl() |
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
getContainerFromModel(EnvironmentModel model)
Return the model object of the target container.
|
abstract String |
getContainerName()
Return the name (or id) of the target's container.
|
abstract ModelTarget.ModelTargetType |
getContainerType()
Return the type of the target's container.
|
protected Domain |
getDomainById(String name, EnvironmentModel model)
Retrieve the named Domain object from the passed model.
|
protected Domain |
getDomainByName(String name, EnvironmentModel model)
Returns a model Domain matching the name passed.
|
protected NodeManager |
getNodeManagerByName(String name, EnvironmentModel model)
Return the node manager object matching the passed name.
|
<T> T |
getSingleTargetFromModel(EnvironmentModel model)
Return a single model object which should be targeted.
|
abstract String |
getTargetName()
Return the name (or id) of the target object.
|
abstract <T> List<T> |
getTargetsFromModel(EnvironmentModel model)
Return a list of model objects which should be targeted.
|
abstract ModelTarget.ModelTargetType |
getTargetType()
Return the type of the target.
|
boolean |
isAllNamesWildcard(String name)
Examine the passed name and determine if it is a wildcard representing all names for the type.
|
protected boolean |
isTargetId(String name)
Determines if a target name is an explicit ID reference.
|
protected boolean |
isTargetName(String name)
Determine if the name passed is explicitly a name reference.
|
protected String |
stripNamePrefix(String name)
Remove any (optional) prefix on a target name returning just the name.
|
String |
toCompactString()
Returns a compact string representation of the object in JSON format.
|
static String |
toCompactString(List<ModelTarget> targets)
Returns a compact string representation of the objects in JSON format.
|
void |
validate(oracle.fmwplatform.util.validation.Validate validate)
Children may override this to provide type specific validation
|
public void validate(oracle.fmwplatform.util.validation.Validate validate)
validate
in interface oracle.fmwplatform.util.validation.ValidationParticipant
validate
- the validate object containing configuration and a list of messages to be appendedpublic abstract String getTargetName()
getTargetName
in interface ModelTarget
public abstract String getContainerName()
getContainerName
in interface ModelTarget
public abstract ModelTarget.ModelTargetType getTargetType()
getTargetType
in interface ModelTarget
public abstract ModelTarget.ModelTargetType getContainerType()
getContainerType
in interface ModelTarget
public boolean isAllNamesWildcard(String name)
ModelTarget
isAllNamesWildcard
in interface ModelTarget
name
- the name to be examined.public abstract <T> List<T> getTargetsFromModel(EnvironmentModel model) throws FMWEnvSpecException
getTargetsFromModel
in interface ModelTarget
T
- type derived by compiler from the assignment statement.model
- the environment model.FMWEnvSpecException
- if an error occurs.public abstract <T> T getContainerFromModel(EnvironmentModel model) throws FMWEnvSpecException
getContainerFromModel
in interface ModelTarget
T
- type derived by compiler from the assignment statement.model
- the environment model.FMWEnvSpecException
- if an error occurs.public <T> T getSingleTargetFromModel(EnvironmentModel model) throws FMWEnvSpecException
ModelTarget
getSingleTargetFromModel
in interface ModelTarget
T
- type derived by compiler from the assignment statement.model
- the environment model.FMWEnvSpecException
- if an error occurs.public String toCompactString()
toCompactString
in interface ModelTarget
public static String toCompactString(List<ModelTarget> targets)
targets
- a List of ModelTarget objects to convertprotected boolean isTargetId(String name)
name
- the target nameprotected boolean isTargetName(String name)
name
- the target nameprotected String stripNamePrefix(String name)
name
- target nameprotected Domain getDomainById(String name, EnvironmentModel model)
name
- the domain IDmodel
- the environment modelprotected Domain getDomainByName(String name, EnvironmentModel model) throws FMWEnvSpecException
name
- the domain namemodel
- the environment modelFMWEnvSpecException
- if an error occursprotected NodeManager getNodeManagerByName(String name, EnvironmentModel model) throws FMWEnvSpecException
name
- the node manager namemodel
- the environment modelFMWEnvSpecException
- if an error occurs