Policy Management API objects (such as PolicyMgtRealm) provide a number of get/set methods that let you view and modify individual properties of objects in the policy store. You use these get/set methods to view and edit an object's properties just as you would use the property fields in the Administrative UI.
The following script modifies the resource filter property:
use Netegrity::PolicyMgtAPI;
$policyapi = Netegrity::PolicyMgtAPI‑>New();
$session = $policyapi‑>CreateSession("adminid", "adminpwd");
$domain=$session‑>GetDomain("engineering");
$realm=$domain‑>GetRealm("documentation");
if($realm‑>ResourceFilter() eq "/mysite/docs/*") {
$filter=$realm‑>ResourceFilter("/mysite/docs/*.doc");
}
if ($filter eq undef) {
print "Error changing resource filter.\n";
}
else {
print "Resource filter changed to: " . $filter . "\n";
}
Note the following general rules:
$realm‑>ResourceFilter("/mysite/docs/*.doc");
$filter=$realm‑>ResourceFilter();
| Copyright © 2010 CA. All rights reserved. | Email CA about this topic |