When you create a session, a number of session initialization flags are set to their default values. The following table lists the initialization methods in the PolicyMgtAPI object and their default values:
Method |
Default |
Description |
---|---|---|
DisableAudit() |
0 (Auditing enabled) |
Enables or disables:
|
DisableManagement |
0 (Watchdog enabled) |
Enables or disables the SiteMinder management watchdog. The watchdog is used internally and should not be disabled. |
Disable |
0 (Validation enabled) |
Enables or disables validation of policy store objects. |
LoadAgentType |
0 (Pre-load |
Enables or disables the pre-loading of the agent type dictionary. |
PreLoadCache() |
0 (Pre-load cache disabled) |
Enables or disables the pre-loading of SiteMinder caches. |
Note: These methods have no effect if called after CreateSession().
Example: Initialize session operations
The following example enables all the session initialization operations that are not enabled by default. If the session is successfully initialized, the script displays the initialization flags:
use Netegrity::PolicyMgtAPI; $username = "adminid"; $password = "adminpwd"; print "\nInitializing and connecting to PolicyMgtAPI...\n"; $policyapi = Netegrity::PolicyMgtAPI‑>New(); $policyapi‑>PreLoadCache(1); $policyapi‑>LoadAgentTypeDictionary(1); die "ERROR: Couldn't create session\n" unless ($session != undef); print "Initialization settings:\n"; print " Preload cache flag: ".$policyapi‑>PreLoadCache()."\n"; print " Disable validation flag: " . $policyapi‑>DisableValidation()."\n"; print " Load agent type dictionary flag: " . $policyapi‑>LoadAgentTypeDictionary()."\n"; print " Disable audit flag: ".$policyapi‑>DisableAudit()."\n"; print " Disable watchdog flag: " . $policyapi‑>DisableManagementWatchDog()."\n";
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |