SDK Full Policy Store Backup and Restore Issue and Fix for Application Model
Please note when using the Export and Import methods in the Java SDK - application objects will not be properly reimported into the policy store and will not be visible on the adminUI. I do believe this needs to be submitted as a bug but here is the fix for not losing that object on the adminUI that I found.
O/S - Red Hat Linux 6 - 64 bit
Policy Server Version: 220.127.116.110
Policy Store: CA Directory r12.18
Issue: Using the Java SDK Export / Import classes to create full backups of the policy store causes issue with Application objects on re-import.
SmExportAttr objExportAttr = new SmExportAttr ();
result = policyapi.doExport(objExportAttr);
SmImport myImp = new SmImport();
SmImportAttr myimport = new SmImportAttr();
result = policyapi.doImport(myimport);
Upon reimport of the policy store backup the application objects are not visible on the AdminUI.
The object is present in the .smdif export file that is created during the backup method as seen below:
Further inspection in XPSExplorer shows the application object is re-imported in the Domain Objects screen. Please see the object below and notice the flag IsAnApplication is no longer set to true. Also IsDLP is no longer set to false.
FIX: From XPSExplorer get a writeable copy of the object.
The IsAnApplication flag will now be set properly to true.
Enter: 04 (to select the IsDLP attribute)
The IsDLP attribute flag is now properly set to false.
Enter: U (to update the attribute)
Enter Q , Q, Q, P (to synchronize the changes with the Policy Server)
Restart the Policy Server and the AdminUI (My environment was very particular about needing a reboot of Policy Server and AdminUI even though I synchronized changes on XPSExplorer)
TestApplication has been restored and is useable on AdminUI.
Hope this helps!