Table 71 summarizes the methods of the AgentProperty
class.
Table 71. Member methods of the AgentProperty class
Creates an
agent-property object.
Syntax
public AgentProperty(String name);
public AgentProperty(String name, int type, boolean isReqd, boolean isHid,
boolean isRdOnly, String desc, boolean isMult, String cardinality,
Object[] validValues, Object[] defaultValues);
public AgentProperty(String name, int type, String desc, boolean isReqd,
boolean isMult, String cardinality, Object[] validValues,
Object[] defaultValues);
Parameters
- cardinality
- Specifies whether the property can hold multiple values; the value of
this parameter initializes the cardinality member variable of the
agent-property object (cardinality).
- defaultValues
- Specifies default values for the property; the value of this
parameter initializes the allDefaultValues member variable of the
agent-property object (allDefaultValues).
- desc
- Provides a description of the property; the value of this parameter
initializes the description member variable of the agent-property
object (description).
- isHid
- Specifies whether the value of the property must be encrypted; the
value of this parameter initializes the isHidden member variable of
the agent-property object (isHidden).
- isMult
- Specifies whether the property can provide multiple values from which the
user can choose; the value of this parameter initializes the
isMultiple member variable of the agent-property object (isMultiple).
- isRdOnly
- Specifies whether a user can enter or can only view the value for the
property; the value of this parameter initializes the
isReadOnly member variable of the agent-property object (isReadOnly).
- isReqd
- Specifies whether a value is required for the property; the value of
this parameter initializes the isRequired member variable of the
agent-property object (isRequired).
- name
- Specifies the name of the property; the value of this parameter
initializes the propName member variable of the agent-property
object (propName).
- type
- Specifies the type of the property; the value of this parameter
initializes the type member variable of the agent-property object (type).
- validValues
- Specifies the valid values for the property; the value of this
parameter initializes the allValidValues member variable of the
agent-property object (allValidValues).
Return values
A newly instantiated AgentProperty object.
Exceptions
- IllegalArgumentException
- Thrown if the value of the name parameter is
null or if the type parameter is not a valid
property-type constant (see Table 69).
Notes
The AgentProperty() method provides the following forms for
instantiating a new agent-property object:
- The first form defines a new agent-property object and initializes it with
only a property name. The type of this agent property
defaults to String. The property is a single-cardinality
property that does not display multiple values to the user.
- The second form defines a new agent-property object and initializes it
with all member variables. You can customize the
property's metadata by specifying the appropriate values for its member
variables.
- The third form defines a new agent-property object and initializes it with
all member variables except isHidden and
isReadOnly. In this case, the isHidden and
isReadOnly variables default to false.
Copies the specified property into the current AgentProperty object.
Syntax
public void copy(AgentProperty prop);
Parameters
- prop
- Specifies the name of the property to be copied.
