TIBCO Adapter SDK C++ Reference
MProperties
Class Hierarchy | C++ Classes and Methods | Members | Methods
This class is a facility for reading name-value pairs. It is used as an interface for accessing any TIBCO Repository subtree (which can be an individual node). Applications can use the methods in this class to add and replace attribute values and can also remove the whole subtree by calling MPropertiesRegistry::removeProperties() with the desired URL as an argument.

A special node in the TIBCO Repository tree is the adapter instance description object, which stores all configuration information in one place, pointing to other locations in the TIBCO Repository for some of the object definitions. You can access this TIBCO Repository object by calling the MAppProperties::getConfigProperties() method.

 

Warning

Using settable MProperties incorrectly can cause serious problems that can cause adapters to stop functioning. TIBCO Software Inc. cannot guarantee that problem resulting form the incorrect use of MProperties class can be solved.

MProperties allows arbitrary editing of a resource whose structure is very strictly regulated. Even the slightest mistake, such as a typographical error, can render a configuration incorrect. Using settable properties is analagous to hand-editing database files and should be approached with similar caution. Use MProperties class to create/modify repository at your own risk.

Format of rsAttrPath Argument
Several of the methods in MProperties and related classes use an rsAttrPath parameter. The rsAttrPath parameter can specify an attribute at any level in the repository hierarchy. The syntax is as follows:

/Object/AssocList|x/attribute

This means:

  • Find the object with the specified name (within each instance, each object name can be used only once)

  • Take the xth association list (multiple association lists with the same name are legal within one object)

  • In that association list, retrieve the attribute named attribute.
The initial slash (/) and the “|n” part after every association list name are optional. If the |n part is omitted then the first branch (starting from zero) is assumed. This omission can be convenient when branch names don’t repeat at the same node.

For example, consider the following custom objects and attributes that are defined using the TIBCO Designer software:

 connection
    userName = username1
    password = password1
 import
    msgDefinition = msgDefinition1
    subject = subject1
    field
        tibName = tibName1
        psftName = psftName1 
    field
        tibName = tibName2

To point to the tibName attribute of the second field association list, use this syntax:

/import/field|1/tibName

For compatibility reasons, it is also legal to use the syntax object|0.

 

See Also Factory methods for creating new MProperties instances: MPropertiesRegistry::newProperties(), MPropertiesRegistry::newSettableProperties()

Declaration
class MProperties;
Class Hierarchy
MProperties
File
MProperties.h
Links
Copyright (c) 2010 TIBCO Software Inc. All rights reserved.