setValue
public void setValue(java.lang.String attributeName,
java.lang.String val,
long accessModifier)
throws MXException,
java.rmi.RemoteException
Description copied from class: Mbo
Sets a string value to an attribute identified by name within the current
object and access to the value is controlled by the access modifier.
In order to handle the condition where the passed attributeName
contains a . notation(for example, ASSET.DESCRIPTION when the current
object is WorkOrder ), this method first gets the correct object
and then assigns the string value to the attribute of the right object.
If the attributeName does not contain a ".", the current object is
assumed to be the one to set the string value to the attribute specified.
For synonym value attributes (string datatype), the value can be
passed with the "!" prefix and suffix, and this function will
substitute the appropriate translated external default value for
the attribute.
for example: "!WAPPR!" will update the field contents
with the synonym value of WAPPR.
For Async error reporting we catch the exception and persist the current value
used to set the value and also the exception generated.
- Specified by:
setValue
in interface MboRemote
- Overrides:
setValue
in class Mbo
- Parameters:
attributeName
- The attribute name within the current object.val
- The string value to set to the attribute.accessModifier
- The bitwise flags such as NOACCESSCHECK,
NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
- Throws:
MXException
- "Attribute {0} does not exist" exception will
be thrown if the attribute does not exist
in the object.
"Field is read only" exception will be thrown
if the attribute is READONLY and the
accessModifier does not specify NOACCESSCHECK.
"Invalid Data Type" exception will be thrown
for datatype mismatch. For example,
setting a string value of characters to an
attribute which has datatype of YORN.
java.rmi.RemoteException
- See Also:
Mbo.setValue(String,String,long)