Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Reference > Program model > Control DataObject
ChangeControl DataObject
The ChangeControl data object provides a client application with the ability to query federated repositories for changed entities, such as new, modified, and deleted entities, from a specified checkpoint onwards.
A client application can use the ChangeControl data object to synchronize its internal cache or other repositories, with the user registry, and provide a secure environment using the latest information in its cache or repositories.
The structure of the ChangeControl data is described next.
checkPoint
defines the checkpoint for repositories configured in virtual member manager.
It is a list that contains the repositoryId and the repositoryCheckPoint. In the following example for IBM Tivoli Directory Server, TDS_LDAP is the repository ID for IBM Tivoli Directory Server and 21 is the checkpoint number for the configured LDAP.
<wim:checkPoint> <wim:repositoryId>TDS_LDAP </wim:repositoryId> <wim:repositoryCheckPoint>21 </wim:repositoryCheckPoint> </wim:checkPoint>
There could be one or more instances of checkPoint in a ChangeControl data object, depending on the number of repositories involved in a search.
changeTypes
represents the type of changes to return. It is a list of valid change types. For example, the list could have the values add and modify to indicate that only entities that have been added or modified must be returned. To get all types of changes, pass the asterisk (*).
The valid values and string constants of the changeTypes property are add (for CHANGETYPE_ADD), delete (for CHANGETYPE_DELETE), modify (for CHANGETYPE_MODIFY), rename (for CHANGETYPE_RENAME), and * (for CHANGETYPE_ALL to retrieve all types of changes). Also, passing a null value retrieves all types of changes. As the ChangeControl data object is derived from the SearchControl data object, all of the other parameters applicable to a normal search, such as size and time limits, properties to return, whether or not to include sub-types, filter expression, and search bases are also applied to a search for changed entities.
XML schema definition
The XML schema definition for the ChangeControl data object is shown here:
<xsd:complexType name="ChangeControl"> <xsd:complexContent> <xsd:extension base="SearchControl"> <xsd:sequence> <xsd:element name="checkPoint" type="CheckPointType" minOccurs="0" maxOccurs="unbounded"> </xsd:element> <xsd:element name="changeTypes" type="xsd:token" maxOccurs="unbounded" minOccurs="0"> </xsd:element> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType>
Sample data objects
The following example shows a ChangeControl data object without any checkpoint, used in the search API, during the first search for changed entities, to retrieve the checkpoint.
<wim:controls xsi:type="wim:ChangeControl" changeTypes="*"/>The following example shows a ChangeControl data object with a saved checkpoint from a previous search, used in the search API during a subsequent search.
<wim:controls xsi:type="wim:ChangeControl" > <wim:changeTypes>* </wim:changeTypes> <wim:checkPoint> <wim:repositoryId>TDS_LDAP </wim:repositoryId> <wim:repositoryCheckPoint>21 </wim:repositoryCheckPoint> </wim:checkPoint> <wim:checkPoint> <wim:repositoryId>AD_LDAP </wim:repositoryId> <wim:repositoryCheckPoint>41 </wim:repositoryCheckPoint> </wim:checkPoint> </wim:controls>
Parent topic: Control DataObject