DirectoryObject.getProperty()
The method returns the values of the property specified by the given name.
- 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.getProperty(name)
- Arguments
-
- name
- String representing the name of the property to return.
- Returns
- Either a String or a
DirectoryObject
. The type of object returned depends on the property obtained. If the specified property does not exist, an empty array is returned.
- Description
- This method returns the values of the property specified by the
given name. The type of object returned depends on the property obtained.
If the specified property does not exist, an empty array is returned.
The property name can be either an attribute name or a relationship name. For an attribute name, the return is a
String[]
; for a relationship name, an array ofDirectoryObjects
is returned. If an attribute and a relationship have the same name, then the attribute is returned. For example, an Account entity has both an owner attribute and an owner relationship. - Usage
- When operating on an account, for example, the user ID property
can return a String, where the owner property can return another entity
(
DirectoryObject
). The owner entity can then be operated on with thegetProperty()
member to obtain information about it.userids = directoryObject.getProperty("eruid"); if (userids.length > 0) userid = userids[0]; owner = directoryObject.getProperty("owner"); if (owner.length > 0) ownerName = owner.getProperty("name")[0];
Note: These statements assume there is at least one value returned. If no values are returned, an array indexing violation occurs.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.