DirectoryObject.setProperty()
The method sets the value of the specified property.
- Availability
-
IBM® Tivoli® Identity Manager 4.x
IBM Tivoli Identity Manager 5.x
IBM Security Identity Manager 6.x
IBM Security Identity Manager 7.0.
- Synopsis
directoryObject.setProperty(name, value)
- Arguments
-
- name
- String representing the name of the property to be created or modified.
- value
- The value to set the property to.
- Description
- This method changes the value of the specified property, or adds the specified property if it
does not exist. This change is made locally to the script environment, not to the data store. The
value can be a single value object or an array of objects. The value type (syntax) of object must be
compatible with the syntax of the specified property. This method is available for the following
data types:
void setProperty(String name, Collection value);
void setProperty(String name, Date value);
void setProperty(String name, Map value);
void setProperty(String name, boolean value);
void setProperty(String name, byte value);
void setProperty(String name, String value);
void setProperty(String name, number value);
void setProperty(String name, char value);
- Usage
directoryObject.setProperty("eruid", "jdoe");
The
getProperty
method returns a Java™ array of objects that is stored in a JavaScriptJavaArray
object. Unlike a standard JavaScript array,JavaArray
objects are used to access members of a Java array. Since Java arrays cannot be resized, the size of aJavaArray
object cannot be changed. Also,JavaArray
objects are typed. Setting aJavaArray
element to the wrong type throws a JavaScript error.In IBM Verify Identity Governance, aJavaArray
object cannot be passed directly back into asetProperty
method. TheJavaArray
array into a standard JavaScript array as follows:jsAliases = new Array(); myPerson = person.get(); aliases = myPerson.getProperty("eraliases"); for (i=0; i < aliases.length; i++) { jsAliases[i] = aliases[i]; } jsAliases[aliases.length] = "myNewAlias"; myPerson.setProperty("eraliases", jsAliases); person.set(myPerson);