edu.internet2.middleware.grouperClient.util
Class GrouperClientUtils

java.lang.Object
  extended by edu.internet2.middleware.grouperClient.util.GrouperClientCommonUtils
      extended by edu.internet2.middleware.grouperClient.util.GrouperClientUtils

public class GrouperClientUtils
extends GrouperClientCommonUtils

utility methods specific to grouper client


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.internet2.middleware.grouperClient.util.GrouperClientCommonUtils
GrouperClientCommonUtils.CommandResult
 
Field Summary
 
Fields inherited from class edu.internet2.middleware.grouperClient.util.GrouperClientCommonUtils
DATE_FORMAT, DATE_MINUTES_SECONDS_FORMAT, DATE_MINUTES_SECONDS_NO_SLASH_FORMAT, DEFAULT_BUFFER_SIZE, EMPTY, EMPTY_OBJECT_ARRAY, EMPTY_STRING_ARRAY, INDEX_NOT_FOUND, LOG_ERROR, NOT_FOUND, ONE_GB, ONE_KB, ONE_MB, TIMESTAMP_FORMAT, TIMESTAMP_NO_SLASH_FORMAT
 
Constructor Summary
GrouperClientUtils()
           
 
Method Summary
static java.lang.String cacheDirectoryName()
          name of the cache directory without trailing slash
static java.lang.String encryptKey()
           
static java.util.Map<java.lang.String,java.lang.String> grouperClientOverrideMap()
          Deprecated. use GrouperClientConfig.retrieveConfig().propertiesOverrideMap() instead
static java.util.Properties grouperClientProperties()
          Deprecated. use GrouperClientConfig.retrieveConfig().properties() instead
static java.lang.String propertiesValue(java.lang.String key, boolean required)
          Deprecated. use GrouperClientConfig.retrieveConfig().propertyValueString instead
static boolean propertiesValueBoolean(java.lang.String key, boolean defaultValue, boolean required)
          Deprecated. use GrouperClientConfig.retrieveConfig().propertyValueBoolean instead
static int propertiesValueInt(java.lang.String key, int defaultValue, boolean required)
          Deprecated. GrouperClientConfig.retrieveConfig().propertyValueInt
static Log retrieveLog(java.lang.Class<?> theClass)
           
static java.lang.String subjectAttributeValue(WsSubject wsSubject, java.lang.String[] attributeNames, java.lang.String attributeName)
          get the attribute value of an attribute name of a subject
static java.lang.String substituteExpressionLanguage(java.lang.String stringToParse, java.util.Map<java.lang.String,java.lang.Object> variableMap)
          substitute an EL for objects.
static java.lang.String substituteExpressionLanguage(java.lang.String stringToParse, java.util.Map<java.lang.String,java.lang.Object> variableMap, boolean allowStaticClasses, boolean silent, boolean lenient, boolean logOnNull)
          substitute an EL for objects
 
Methods inherited from class edu.internet2.middleware.grouperClient.util.GrouperClientCommonUtils
abbreviate, abbreviate, absolutePath, addIfNotThere, append, argAfter, argKey, argMap, argMapBoolean, argMapBoolean, argMapFileList, argMapInteger, argMapList, argMapSet, argMapString, argMapTimestamp, argValue, assertion, assignField, assignField, assignField, assignField, assignField, assignSetter, batchList, batchNumberOfBatches, batchNumberOfBatches, bigDecimalObjectValue, booleanObjectValue, booleanValue, booleanValue, byteCountToDisplaySize, byteObjectValue, byteValue, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, capitalize, charObjectValue, charValue, classesString, classLoader, className, classNameCollection, clone, cloneFields, cloneValue, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, compareObjectFields, computeUrl, construct, contains, contains, contains, convertLongToChar, convertLongToCharSmall, convertLongToString, convertLongToStringSmall, convertToRuntimeException, copy, copy, copy, copy, copy, copyLarge, createParentDirectories, dateToString, dateValue, defaultIfBlank, defaultIfEmpty, defaultIfNull, defaultString, defaultString, deleteCreateFile, deleteFile, deleteRecursiveDirectory, doubleObjectValue, doubleValue, doubleValueNoError, enumValueOfIgnoreCase, equals, equals, equalsIgnoreCase, escapeUrlDecode, escapeUrlEncode, execCommand, execCommand, execCommand, extensionFromName, field, fieldNames, fieldNames, fieldNames, fieldNames, fields, fields, fieldValue, fieldValue, fieldValue, fieldValue, fileCanonicalPath, fileFromResourceName, fileOrClasspathInputstream, floatObjectValue, floatValue, floatValueNoError, forName, get, getCause, getCause, getFullStackTrace, getter, getterHelper, getterNameFromPropertyName, getters, getThrowables, hasOption, hostname, incrementChar, incrementStringInt, indent, indexOf, indexOf, injectInException, intObjectValue, intValue, intValue, intValueNoError, invokeMethod, invokeMethod, isAscii, isBlank, isBlank, isEmpty, isGetter, isNestedThrowable, isNotBlank, isScalar, isSetter, isThrowableNested, iterator, jarFile, join, join, join, join, join, leftPad, leftPad, leftPad, length, lengthAscii, longObjectValue, longValue, longValue, longValueNoError, mapDifferences, mapEquals, mapToString, MapToString, method, methodNames, methodsHelper, mkdirs, monthInt, newFileUniqueName, newInstance, newInstance, next, nonNull, nonNull, nonNull, nonNull, nullOrBlank, oracleStandardNameFromJava, packInts, parentStemNameFromName, prefixOrSuffix, propertiesCacheClear, propertiesFromFile, propertiesFromResourceName, propertiesFromResourceName, propertiesThreadLocalOverrideMap, propertiesValue, propertiesValue, propertiesValue, propertiesValue, propertiesValueBoolean, propertiesValueBoolean, propertiesValueBoolean, propertiesValueBoolean, propertiesValueInt, propertiesValueInt, propertiesValueInt, propertyName, propertyType, propertyValidateValueBoolean, propertyValidateValueClass, propertyValidateValueInt, propertyValidateValueRequired, propertyValue, readFileIntoString, readFileToString, readFromFileIfFile, readResourceIntoString, readResourceIntoString, remove, remove, renameTo, repeat, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceWhitespaceWithSpace, responseBodyAsString, retrieveExecutorService, retrievePasswordFromStdin, retrievePasswordFromStdin, rightPad, rightPad, rightPad, rollbackQuietly, saveStringIntoFile, saveStringIntoFile, serializeObjectToFile, setter, setterHelper, setterNameFromPropertyName, setters, setToString, shortObjectValue, shortValue, sleep, split, split, split, split, splitByWholeSeparator, splitByWholeSeparator, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitTrim, splitTrim, splitTrimToList, stringToDate, stringToDate2, stringToTimestamp, stringValue, stringValue, stripEnd, stripLastSlashIfExists, stripStart, substituteCommonVars, substringAfter, substringAfterLast, substringBefore, substringBeforeLast, suffixAfterChar, timestampToString, toArray, toArray, toList, toListClasses, toSet, toSqlDate, toString, toStringForLog, toStringForLog, toStringSafe, toTimestamp, trim, trimToEmpty, truncateAscii, typeCast, typeCast, uniqueId, unpackInt, unserializeObjectFromFile, writeStringToFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrouperClientUtils

public GrouperClientUtils()
Method Detail

retrieveLog

public static Log retrieveLog(java.lang.Class<?> theClass)
Parameters:
theClass -
Returns:
the log

grouperClientOverrideMap

@Deprecated
public static java.util.Map<java.lang.String,java.lang.String> grouperClientOverrideMap()
Deprecated. use GrouperClientConfig.retrieveConfig().propertiesOverrideMap() instead

override map for properties for testing

Returns:
the override map

grouperClientProperties

@Deprecated
public static java.util.Properties grouperClientProperties()
Deprecated. use GrouperClientConfig.retrieveConfig().properties() instead

grouper client properties

Returns:
the properties

propertiesValue

@Deprecated
public static java.lang.String propertiesValue(java.lang.String key,
                                                          boolean required)
Deprecated. use GrouperClientConfig.retrieveConfig().propertyValueString instead

get a property and validate required from grouper.client.properties

Parameters:
key -
required -
Returns:
the value

propertiesValueBoolean

@Deprecated
public static boolean propertiesValueBoolean(java.lang.String key,
                                                        boolean defaultValue,
                                                        boolean required)
Deprecated. use GrouperClientConfig.retrieveConfig().propertyValueBoolean instead

get a boolean and validate from grouper.client.properties

Parameters:
key -
defaultValue -
required -
Returns:
the string

propertiesValueInt

@Deprecated
public static int propertiesValueInt(java.lang.String key,
                                                int defaultValue,
                                                boolean required)
Deprecated. GrouperClientConfig.retrieveConfig().propertyValueInt

get a boolean and validate from grouper.client.properties

Parameters:
key -
defaultValue -
required -
Returns:
the string

substituteExpressionLanguage

public static java.lang.String substituteExpressionLanguage(java.lang.String stringToParse,
                                                            java.util.Map<java.lang.String,java.lang.Object> variableMap)
substitute an EL for objects. Dont worry if something returns null

Parameters:
stringToParse -
variableMap -
Returns:
the string

substituteExpressionLanguage

public static java.lang.String substituteExpressionLanguage(java.lang.String stringToParse,
                                                            java.util.Map<java.lang.String,java.lang.Object> variableMap,
                                                            boolean allowStaticClasses,
                                                            boolean silent,
                                                            boolean lenient,
                                                            boolean logOnNull)
substitute an EL for objects

Parameters:
stringToParse -
variableMap -
allowStaticClasses - if true allow static classes not registered with context
silent - if silent mode, swallow exceptions (warn), and dont warn when variable not found
lenient - false if undefined variables should throw an exception. if lenient is true (default) then undefined variables are null
logOnNull - if null output of substitution should be logged
Returns:
the string

subjectAttributeValue

public static java.lang.String subjectAttributeValue(WsSubject wsSubject,
                                                     java.lang.String[] attributeNames,
                                                     java.lang.String attributeName)
get the attribute value of an attribute name of a subject

Parameters:
wsSubject - subject
attributeNames - list of attribute names in the subject
attributeName - to query
Returns:
the value or null

encryptKey

public static java.lang.String encryptKey()
Returns:
the encrypt key

cacheDirectoryName

public static java.lang.String cacheDirectoryName()
name of the cache directory without trailing slash

Returns:
the name of the cache directory