public void init() { try { String dbName = getAttribute ( DATABASE_NAME ); } catch(Exception e) { logger.error ( "Exception while initializing recon analyzer scheduled task " + e.getMessage() ) ; } }
This will get you access to the scheduled task attribute called DATABASE_NAME.
A slightly more advanced variant of the same is to let the attribute be a reference to another OIM object. In many cases ITResources are useful places to store attributes
String dbName = getAttribute ( DATABASE_NAME ); Hashtable itResourceAttr = tcUtilXellerateOperations.getITAssetProperties (super.getDataBase(), dbName.trim());
Now you have the parameters of this ItResource in the hashtable.
You will have to import com.thortech.xl.util.adapters.tcUtilXellerateOperations which is a very useful class full of nifty static methods.
No comments:
Post a Comment