NvdmAPI
Class NvdmVariable
java.lang.Object
NvdmAPI.NvdmVariable
- public class NvdmVariable
- extends java.lang.Object
Class representing a variable (attribute) of a Radia object.
Variables are aggregated by NvdmObject
s. If
read from the Radia database, they also contain elements
of the class definition (the object template) such as maximum
size, execution flags etc. -- this information, however, is
read-only as modifying the class definition is currently not
supported.
- Version:
- 1.0, 6-Oct-2002
- Author:
- Lothar Baum
Constructor Summary |
NvdmVariable(java.lang.String name)
Creates a new variable with the specified name. |
NvdmVariable(java.lang.String name,
int relIdx,
java.lang.String value)
Creates a new variable with the specified name and the
specified string value. |
NvdmVariable(java.lang.String name,
java.lang.String value)
Creates a new variable with the specified name and the
specified string value. |
Method Summary |
void |
dump(java.io.PrintStream where)
Dumps the contents of the variable to a stream. |
java.lang.String |
getDataString()
Returns the value of the variable as a string. |
java.lang.String |
getDescription()
Returns the desciption of the variable. |
java.lang.String |
getName()
Returns the name of the variable. |
int |
getSize()
Return the maximum size of the variable. |
java.lang.String |
getType()
Returns the type of the variable. |
boolean |
isAlwaysConnection()
Checks for this variable being an always connection. |
boolean |
isClassConnection()
Checks for this variable being a class connection. |
boolean |
isClientAbsolute()
Checks for the 'client absolute' flag of this variable. |
boolean |
isClientCounter()
Checks for the 'client counter' flag of this variable. |
boolean |
isClientDefault()
Checks for the 'client default' flag of this variable. |
boolean |
isClientExecute()
Checks for the 'client execute' flag of this variable. |
boolean |
isClientGlobal()
Checks for the 'client global' flag of this variable. |
boolean |
isClientProtect()
Checks for the 'client protect' flag of this variable. |
boolean |
isClientResolve()
Checks for the 'client resolve' flag of this variable. |
boolean |
isClientSubstitute()
Checks for the 'client substitute' flag of this variable. |
boolean |
isExpression()
Checks for this variable being an expression. |
boolean |
isIncludesConnection()
Checks for this variable being an includes connection. |
boolean |
isMethod()
Checks for this variable being a method. |
boolean |
isMgrAbsolute()
Checks for the 'manager absolute' flag of this variable. |
boolean |
isMgrCounter()
Checks for the 'manager counter' flag of this variable. |
boolean |
isMgrDefault()
Checks for the 'manager default' flag of this variable. |
boolean |
isMgrExecute()
Checks for the 'manager execute' flag of this variable. |
boolean |
isMgrGlobal()
Checks for the 'manager global' flag of this variable. |
boolean |
isMgrProtect()
Checks for the 'manager protect' flag of this variable. |
boolean |
isMgrResolve()
Checks for the 'manager resolve' flag of this variable. |
boolean |
isMgrSubstitute()
Checks for the 'manager substitute' flag of this variable. |
boolean |
isRadiaInternal()
Checks if this is a Radia internal variable. |
boolean |
isRequiresConnection()
Checks for this variable being a requires connection. |
boolean |
isVariable()
Checks for this variable being a text variable. |
void |
setDataString(java.lang.String s)
Sets the variable's value to the specified text string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NvdmVariable
public NvdmVariable(java.lang.String name)
- Creates a new variable with the specified name. The
name is limited to 8 characters.
This custructor should only be
used to create variables that have a unique name within the
respective class definition. For creating variables with a name
that occurs more than once in the object (such as with
_ALWAYS_
connections, e.g.), use the constructor
that has the relIdx
argument.
- Parameters:
name
- the name of the variable
NvdmVariable
public NvdmVariable(java.lang.String name,
java.lang.String value)
- Creates a new variable with the specified name and the
specified string value. The name is limited to 8 characters;
the value string must be no longer than the variable's size
as defined in the Radia database.
This custructor should only be
used to create variables that have a unique name within the
respective class definition. For creating variables with a name
that occurs more than once in the object (such as with
_ALWAYS_
connections, e.g.), use the constructor
that has the relIdx
argument.
- Parameters:
name
- the name of the variablevalue
- the value of the variable
NvdmVariable
public NvdmVariable(java.lang.String name,
int relIdx,
java.lang.String value)
- Creates a new variable with the specified name and the
specified string value. The name is limited to 8 characters;
the value string must be no longer than the variable's size
as defined in the Radia database.
This custructor should be used to create variables with names
that occur more than once in the object (such as with
_ALWAYS_
connections, e.g.). The relIdx
here specifies the relative index of this variable (starting with 0)
in the list of variables with the same name.
- Parameters:
name
- the name of the variablerelIdx
- relative index of the variable (starting with 0) in
the list of variables having the same namevalue
- the value of the variable
getName
public java.lang.String getName()
- Returns the name of the variable. The name is limited to 8
characters; trailing spaces have been removed.
- Returns:
- the name of the variable
getDescription
public java.lang.String getDescription()
- Returns the desciption of the variable. The description refers
to the description of the variable as given in the class
definition of an object -- it is only available if this
variable has previously been read from the RCS (in the context
of reading an object from the RCS). The description is limited
to 35 characters; trainling spaces have been removed.
- Returns:
- the description of the variable
getSize
public int getSize()
- Return the maximum size of the variable. This refers
to the size of the variable as set in the class
definition of an object -- it is only available if this
variable has previously been read from the RCS (in the context
of reading an object from the RCS). The size of a variable
is limited to 255 characters.
- Returns:
- the maximum size of the variable
getType
public java.lang.String getType()
- Returns the type of the variable. This 1 character code refers
to the type of the variable as set in the class
definition of an object -- it is only available if this
variable has previously been read from the RCS (in the context
of reading an object from the RCS). The type codes are: (V)ariable,
(M)ethod, (E)xpression, (A)lways connection, (I)ncludes connection,
and (R)equires connection. In case of an unknown type, either an
empty string or '?' is returned.
- Returns:
- the 1 character type code for the variable
getDataString
public java.lang.String getDataString()
- Returns the value of the variable as a string. In case the
value has not yet been defined, an empty string is returned.
- Returns:
- the value of the variable as a string
isRadiaInternal
public boolean isRadiaInternal()
- Checks if this is a Radia internal variable. Radia internal variables
are usually not shown to users and are hidden in the Radia System
Explorer. By default, all Variables created via the public NvdmAPI
interfaces are not Radia internal variables (you can, however, create
a variable with the name of a Radia internal variable, which can then be
written via object creation / update operations).
- Returns:
true
if this is a Radia internal variable, or
false
if not (which is the default for newly created
variables)
isClientGlobal
public boolean isClientGlobal()
- Checks for the 'client global' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientDefault
public boolean isClientDefault()
- Checks for the 'client default' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientSubstitute
public boolean isClientSubstitute()
- Checks for the 'client substitute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientProtect
public boolean isClientProtect()
- Checks for the 'client protect' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientAbsolute
public boolean isClientAbsolute()
- Checks for the 'client absolute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientExecute
public boolean isClientExecute()
- Checks for the 'client execute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientResolve
public boolean isClientResolve()
- Checks for the 'client resolve' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isClientCounter
public boolean isClientCounter()
- Checks for the 'client counter' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrGlobal
public boolean isMgrGlobal()
- Checks for the 'manager global' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrDefault
public boolean isMgrDefault()
- Checks for the 'manager default' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrSubstitute
public boolean isMgrSubstitute()
- Checks for the 'manager substitute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrProtect
public boolean isMgrProtect()
- Checks for the 'manager protect' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrAbsolute
public boolean isMgrAbsolute()
- Checks for the 'manager absolute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrExecute
public boolean isMgrExecute()
- Checks for the 'manager execute' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrResolve
public boolean isMgrResolve()
- Checks for the 'manager resolve' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isMgrCounter
public boolean isMgrCounter()
- Checks for the 'manager counter' flag of this variable. This refers to
the class definition of the corresponding object and is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if the flag is set, false
if not
isVariable
public boolean isVariable()
- Checks for this variable being a text variable. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'V', false
if not
isClassConnection
public boolean isClassConnection()
- Checks for this variable being a class connection. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'C', false
if not
isAlwaysConnection
public boolean isAlwaysConnection()
- Checks for this variable being an always connection. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'A', false
if not
isIncludesConnection
public boolean isIncludesConnection()
- Checks for this variable being an includes connection. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'I', false
if not
isRequiresConnection
public boolean isRequiresConnection()
- Checks for this variable being a requires connection. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'R', false
if not
isMethod
public boolean isMethod()
- Checks for this variable being a method. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'M', false
if not
isExpression
public boolean isExpression()
- Checks for this variable being an expression. This is basically
a shortcut for identifying the variable's type via
getType
. The information is only available
if this variable has previously been read from the RCS (in the context
of reading an object from the RCS).
- Returns:
true
if type is 'E', false
if not
setDataString
public void setDataString(java.lang.String s)
- Sets the variable's value to the specified text string. This can
be used for all types of variables. The length of the text string
must not exceed the variables maximum size as defined in the
class definition for the corresponding object.
- Parameters:
s
- the new value of the variable
dump
public void dump(java.io.PrintStream where)
- Dumps the contents of the variable to a stream. May be
used for debugging purposes to see all contents of
this variable.
- Parameters:
where
- the stream where to dump the information