PDA

View Full Version : getSoftwareObjectTree is deprecated



gmorreal
04-02-2003, 11:37 AM
I'm doing a migration from ISMP 4.x to 5.0.
I have the following piece of code:

...
ProductService prdsvcs = (ProductService) wizardsvcs.getService(ProductService.NAME);
ProductTree pt = prdsvcs.getSoftwareObjectTree(prdsvcs.PRODUCT_TREE);
SoftwareVersion installingVersion = ((SoftwareObject) pt.getBean(beanID)).getKey().getVersion();
...

The compiler tells me that getSoftwareObjectTree(String source) is deprecated and suggest to use getSoftwareObjectTree(String source, String[] returnProperties) instead.
Could someone explain what to put in the second parameter?
What I need is to get the SoftwareVersion of the product bean beanID.

gmorreal
04-04-2003, 09:39 AM
Any suggestions?
please it is urgent.

gmorreal
04-18-2003, 11:16 AM
I still need an answer.

Thanks.

William
04-18-2003, 02:06 PM
You put the properties that you want to have copied to the return tree. If you're looking for the version, that is kept in the software object's key, so you give a "returnProperties" property of "new String[] { "key" }". You should be able to call "getKey()" of the software object you are looking for to get its SoftwareObjectKey property and call "getVersion()" on that to get the SoftwareVersion.