cancel
Showing results for 
Search instead for 
Did you mean: 

find SI_NAME and SI_CUID for Kind Universe or UNX from LCMBIAR file using java SDK?

0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor
0 Kudos

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();

Answers (0)