Check Functions
You can install a check function to control how Rogue Wave® Server object properties or relations are modified. You can then decide to accept or refuse the modification. This function can be implemented using Rogue Wave Views Script.
Example1
Suppose that you want to check assignment of the attribute name of the class Network. Do the following:
1. Attach the attribute name to a check function.
To specify such attachment, set the property ilog.server.check="true" in the XMI description.
2. Install a check function in the script file for the class Network.
Its signature should be Network_check_set_name(network, name). This function returns true if you accept the assignment, or false if you do not.
Example2
Suppose that you want to check the assignment of the n-ary relation domains of the class Network. Do the following:
1. Attach the relation domains to a check function.
To specify such attachment, set the property ilog.server.check="true" in the XMI description.
2. Install two check functions in the script file for the class Network to control addition and removal to and from the relation. Their signatures should be:
Network_check_addTo_domains(network,newDomain) and
Network_check_removeFrom_domains(network,domain).
These functions return true if you accept the addition or the removal, or false if you do not.
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.