public interface Substitutions
Substitution
s can be defined or aquired via
the service parameter aquisition path (see the SSC documentation for more detail re. the aquisition path).
It has two purposes: the first is to provide views of the Substititutions aquired from this object and above this object in
the aquisition path (via the getFixedVariables
,
getDefaultedVariables
, and getFreeVariables
methods); the second is to provide a means of manipulating
the Substitutions defined in this object (via the remaining methods).
The free variables returned by the getFreeVariables
method do not have values; they need to appear on
the left side of some Substitution.
The fixed and defaulted variables returned by the getFixedVariables
and
getDefaultedVariables
methods are variables that are known to have values; they can be used on the right side of a
Substitution.
Modifier and Type | Method and Description |
---|---|
Substitution |
delSubstitution(java.lang.String varName)
Deletes the
Substitution for the named variable. |
java.util.List |
getDefaultedVariables()
Returns a List of
Substitution s defining the defaulted
variables, in the context of this object. |
java.util.List |
getFixedVariables()
Returns a List of
Substitution s defining the fixed variables, in the
context of this object. |
java.util.List |
getFreeVariables()
Returns a List of
Substitution s defining the 'free' variables,
in the context of this object. |
Substitution |
getSubstitution(java.lang.String varName)
Returns the
Substitution for the named variable, or null if none exists. |
java.util.Iterator |
getSubstitutionVariableNames()
Returns an iterator over the variables names for which a
Substitution exists in
this Substitutions object. |
boolean |
hasSubstitution(java.lang.String varName)
Returns true if there is a
Substitution object defined in this Substitutions object
for the named variable. |
Substitution |
putSubstitution(Substitution subst)
Defines a
Substitution for this object. |
java.util.List getFixedVariables() throws CommunicationException, AccessControlException, SubstitutionFormatException
Substitution
s defining the fixed variables, in the
context of this object. These are the variables that
have at least one fixed Substitution in the aquisition path. If a fixed Substitution exists for a variable,
the value bound to that variable is the value provided by the fixed Substitution, or, if it does not provide a value, by
next most specific Substitution for that variable that does provide a value. If no such Substitution exists, the
variable will not have any value.
These variables that can be safely used in the right side of Substitutions for the object, since they have values.Substitution
objects.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have access to all the Substitutions in the acquistion pathSubstitutionFormatException
- thrown if the list of substitutions results in using variables with inconsistent types,
for instance, variable x with [x:port, X:network] fails because x is used as both a port and a network type variablejava.util.List getDefaultedVariables() throws CommunicationException, AccessControlException, SubstitutionFormatException
Substitution
s defining the defaulted
variables, in the context of this object. These are the variables that
that have at least one Substitution in the aquisition path that defines a value, and no fixed Substitutions
in the acquistion path.
These variables that can be safely used in the right side of Substitutions for the object, since they have values.Substitution
objects.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have access to all the Substitutions in the acquistion path.SubstitutionFormatException
- thrown if the list of substitutions results in using variables with inconsistent types,
for instance, variable x with [x:port, X:network] fails because x is used as both a port and a network type variablejava.util.List getFreeVariables() throws CommunicationException, AccessControlException, SubstitutionFormatException
Substitution
s defining the 'free' variables,
in the context of this object. These are the variables that
that have at least one Substitution in the aquisition path, but have no substitutions that define a value.
These variables
must be given values in order to be used.Substitution
objects.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have access to all the Substitutions in the acquistion path.SubstitutionFormatException
- thrown if the list of substitutions results in using variables with inconsistent types,
for instance, variable x with [x:port, X:network] fails because x is used as both a port and a network type variableboolean hasSubstitution(java.lang.String varName) throws AccessControlException, CommunicationException
Substitution
object defined in this Substitutions object
for the named variable.varName
- The name of the variable.AccessControlException
- Thrown if the currently bound Manager
doesn't have permission to read Substitutions.CommunicationException
- Thrown if there is a problem communicating with the directory.java.util.Iterator getSubstitutionVariableNames() throws AccessControlException, CommunicationException
Substitution
exists in
this Substitutions object.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have permission to read Substitutions.Substitution getSubstitution(java.lang.String varName) throws AccessControlException, CommunicationException
Substitution
for the named variable, or null if none exists.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have permission to read Substitutions.Substitution putSubstitution(Substitution subst) throws CommunicationException, AccessControlException
Substitution
for this object. If there is already a Substitution for the variable
named in subst
, it is replaced.subst
- The Substitution to add to this object.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the currently bound Manager
doesn't have permission to change Substitutions.Substitution delSubstitution(java.lang.String varName) throws CommunicationException, AccessControlException
Substitution
for the named variable. Returns the Substitution that was deleted, or null
if there was no Substitution for the named variable.varName
- The name of the variable whose Substitution is to be deleted.CommunicationException
- Thrown if there is a problem communicating with the directory.AccessControlException
- Thrown if the bound Manager
does not have permission to change Substitutions.