Getting Administrative Object Names from Symbolic Names

This section describes how to use Java and Tcl to retrieve the administrative object names based on symbolic names.

The following topics are discussed:

Java

The method described below can be used to get administrative object names in JSPs, JavaBeans, and JPOs.

To get the name of an administrative object from the cache based on the name stored in the symbolic name administrative property, use this method:

PropertyUtil.getSchemaProperty("Symbolic  name"); 

For example, to get the actual administrative name for the type whose symbolic name property is type_Part, use this code:

String partAdminName = 
PropertyUtil.getSchemaProperty("type_Part");

The code would return the actual type name "Part" from the cache.

After getting the name of an administrative object, you would typically get the internationalized version of the name. For instructions, see the Internationalizing Business Process Services Products.

For more information on symbolic names for administrative objects, see How the System Identifies Administrative Objects: Symbolic Name Properties.

Tcl

This section describes how to get administrative object names when writing a Tcl program, although Java is the preferred method for writing programs. You should use a JPO instead of Tcl for triggers.

The program eServiceSchemaVariableMapping.tcl contains the procedure eServiceGetCurrentSchemaName that gets the current name for an administrative object. The signature for using the procedure is:

proc eServiceGetCurrentSchemaName { sItemName sProgramName 
sPropertyName {sStateName ""}} 

where:


  • sItemName is the administrative object type, such as attribute, type, relationship
  • sProgramProg is the name of the program on which all the administrative object's properties are registered
  • sPropertyName is the administrative object's symbolic name

For example, to get the name of the administrative object whose symbolic name property is attribute_Originator:

set sAttrOriginator [eServiceGetCurrentSchemaName attribute 
eServiceSchemaVariableMapping.tcl attribute_Originator] 

For example, to get a policy state name:

set sAttrOriginator [eServiceGetCurrentSchemaName state 
eServiceSchemaVariableMapping.tcl state_Active 
policy_eServiceTriggerProgramPolicy]