on 06-24-2019 10:17 PM
I want to replicate the use case of old code for BIAR files to find SI_NAME and SI_CUID of Universe for LCMBIAR file as well. Here is how it works for BIAR files
BIARFactory biarFactory = BIARFactory.getFactory();
IObjectManager objectManager;
IImportOptions importOptions =biarFactory.createImportOptions();
importOptions.setIncludeSecurity(true);
importOptions.setFailUnresolvedCUIDs(false);
sessionManager = CrystalEnterprise.getSessionMgr();
mySession = sessionManager.logon("user", "pwd", "cms", "authentication");
objectManager = biarFactory.createOM(mySession);
objectManager.commit();
objectManager.importArchive("Absolute path of Biar file", importOptions);
IManagedObjectIterator managedObjectIter =objectManager.readAllKind("Universe");
while (managedObjectIter.hasNext()){
IInfoObject infoObject = managedObjectIter.next();
System.out.println("SI_CUID:" +infoObject.getCUID()+ ", SI_NAME:" + infoObject.getTitle()+ ",SI_KIND:"+infoObject.getKind()+ ", SI_GUID:" +infoObject.getGUID()); }
managedObjectIter.close();
objectManager.clear();
objectManager.dispose();
mySession.logoff();
In case of BIAR files I do get an option selecting Kind Universe for Object Manager but using the same code for LCMBIAR file, the only SI_NAME and SI_KIND available are as follows
SI_NAME:Root Folder,SI_KIND:Folder
SI_NAME:LCM,SI_KIND:Folder
SI_NAME:Promotion Jobs,SI_KIND:Folder
SI_NAME:”LCMJobname”,SI_KIND:LCMJob
Is there any way to replicate the functionality of above code for LCMBIAR files? How do I retrieve Universe/UNX name and CUID from LCMBIAR files?
Hi Sulabha,
for UNX, you would need the Promotion Managment SDK.
Its functionality follows the scenarios in the Promotion Managment Wizard shipped with BI4.2 SP5 and Higher.
When importing an LCMBiar with the SDK, you may need to do a "dryRun" in order to be able to access the contents of the file:
ie:
RunResult result = myScenario.dryRun();
Set<BIResource> resources = result.getResources();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.