com.ibm.itim.script
Class ScriptUtils

java.lang.Object
  extended by com.ibm.itim.script.ScriptUtils

public class ScriptUtils
extends java.lang.Object

Small set of static utilities used throughout script framework.

Since:
ITIM 5.0

Field Summary
static java.lang.String ATTR_DUMP_KEYS
          Key to look up in scriptframework.properties file to decide if we should print the keys contained in the attributes map out to the trace log.
 
Constructor Summary
ScriptUtils()
           
 
Method Summary
static java.util.Properties getFESIScriptProperties()
          Get all the properties for the FESI script engine from fesiextensions.properties.
static java.lang.String getGUID()
          Generate a globally unique id.
static java.util.Properties getScriptProperties()
          Get all the properties for the scripting framework.
static java.lang.String getScriptProperty(java.lang.String property)
          Gets the value of the specified property from a configuration file.
static void updateLogicalContext(ModelScriptInterface si, ContextItem item, java.util.List<ContextItem> beans)
          Update the ContextItem, item, with the logical context and add item to the beans List but only if si.getLogicalContext(); returns a non-null value.
static void updateRootDN(ModelScriptInterface si, ContextItem item, java.util.List<ContextItem> beans)
          Update the ContextItem, item, with the root DN and add item to the beans List but only if si.getRootDN(); returns a non-null value.
static void updateServiceProfile(ModelScriptInterface si, ContextItem item, java.util.List<ContextItem> beans)
          Update the ContextItem, item, with the service profile context and add item to the beans List but only if si.getServiceProfileContext(); returns a non-null value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_DUMP_KEYS

public static final java.lang.String ATTR_DUMP_KEYS
Key to look up in scriptframework.properties file to decide if we should print the keys contained in the attributes map out to the trace log.

See Also:
Constant Field Values
Constructor Detail

ScriptUtils

public ScriptUtils()
Method Detail

getScriptProperties

public static java.util.Properties getScriptProperties()
Get all the properties for the scripting framework. If anything goes wrong while loading the properties file (like the file cannot be found), a note is made in the trace log and an empty Properties file is returned instead.

Returns:
Properties object containing all of the script framework configuration details.

getFESIScriptProperties

public static java.util.Properties getFESIScriptProperties()
Get all the properties for the FESI script engine from fesiextensions.properties. If anything goes wrong while loading the properties file (like the file cannot be found), a note is made in the trace log and an empty Properties file is returned instead.

Returns:
Properties object containing all of the script framework configuration details.

getScriptProperty

public static java.lang.String getScriptProperty(java.lang.String property)
Gets the value of the specified property from a configuration file. First, this method looks in the generic scriptframework.properties file. If the property does not exist there then this method will look in the fesiextensions.properties file. If an error occurs (like the file is not found) a note is made in the trace log and then null is returned.

Parameters:
property - The name of the property to lookup.
Returns:
The value of the property or null if any error occurs.

getGUID

public static java.lang.String getGUID()
Generate a globally unique id. This method is just a wrapper around a real GUID generator.

Returns:
A String that is a GUID.

updateRootDN

public static void updateRootDN(ModelScriptInterface si,
                                ContextItem item,
                                java.util.List<ContextItem> beans)
Update the ContextItem, item, with the root DN and add item to the beans List but only if si.getRootDN(); returns a non-null value. This is a helper method for model extensions which may or may not implement each part of the ModelScriptInterface.

Parameters:
si - The ModelScriptInterface to query.
item - The ContextItem to update.
beans - The List to add item to.

updateLogicalContext

public static void updateLogicalContext(ModelScriptInterface si,
                                        ContextItem item,
                                        java.util.List<ContextItem> beans)
Update the ContextItem, item, with the logical context and add item to the beans List but only if si.getLogicalContext(); returns a non-null value. This is a helper method for model extensions which may or may not implement each part of the ModelScriptInterface.

Parameters:
si - The ModelScriptInterface to query.
item - The ContextItem to update.
beans - The List to add item to.

updateServiceProfile

public static void updateServiceProfile(ModelScriptInterface si,
                                        ContextItem item,
                                        java.util.List<ContextItem> beans)
Update the ContextItem, item, with the service profile context and add item to the beans List but only if si.getServiceProfileContext(); returns a non-null value. This is a helper method for model extensions which may or may not implement each part of the ModelScriptInterface.

Parameters:
si - The ModelScriptInterface to query.
item - The ContextItem to update.
beans - The List to add item to.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.