Retrieves a specified child property for the hierarchical connector configuration property at any level of the property hierarchy.
Syntax
public CWProperty getHierProp(String propName);
Parameters
Return values
A CWProperty object that contains the retrieved property from the hierarchy. If the specified property does not exist in the current hierarchical connector property, the method returns null.
Exceptions
None.
Notes
The getHierProp() method retrieves the child property whose name matches propName from the hierarchical connector configuration property. You can retrieve a child property at any level of the current property hierarchical; you can specify a grandchild, great-grandchild, and so on. The propName of the retrieved child property has the form:
child/grandchild/great-grandchild/....
For example, suppose you have the property hierarchy shown in Figure 75. To obtain the name of the port for Listener1, you must first retrieve the top-level connector-object for ProtocolListener (for example, into topLevelProp). You can then use the following call to retrieve the port name of Listener1:
CWProperty listenerPort = topLevelProp.getHierProp("Listener1/Port");
Before a call to getHierProp(), you can use the hasChildren() method to verify that the hierarchical connector property has child properties. To retrieve a specified child property at the top level of the property hierarchy, use the getHierChildProp() method. To retrieve all child properties at the top level of the hierarchy, you can use the getHierChildProps() method.
See also