org.kuali.rice.kew.util
Class Utilities

java.lang.Object
  extended by org.kuali.rice.kew.util.Utilities

public final class Utilities
extends Object

Various static utility methods.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
static class Utilities.PrioritySorter
          Consider moving out of this class if this bugs
static class Utilities.RouteLogActionRequestSorter
          Consider moving out of this class if this bugs
 
Method Summary
static boolean checkDateRanges(String fromDate, String toDate)
           
static
<T extends KeyValue>
Map<String,T>
getKeyValueCollectionAsLookupTable(List<T> collection)
          Helper method that takes a List of KeyValue and presents it as a Map containing KeyValue values
static
<T extends KeyValue>
Map<String,String>
getKeyValueCollectionAsMap(List<T> collection)
          Helper method that takes a List of KeyValue and presents it as a Map
static String parseGroupName(String namespaceAndNameCombo)
           
static String parseGroupNamespaceCode(String namespaceAndNameCombo)
           
static String substituteConfigParameters(String string)
          Performs variable substitution on the specified string, replacing variables specified like ${name} with the value of the corresponding config parameter obtained from the current context Config object
static String substituteConfigParameters(String applicationId, String string)
          Performs variable substitution on the specified string, replacing variables specified like ${name} with the value of the corresponding config parameter obtained from the current context Config object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

substituteConfigParameters

public static String substituteConfigParameters(String applicationId,
                                                String string)
Performs variable substitution on the specified string, replacing variables specified like ${name} with the value of the corresponding config parameter obtained from the current context Config object. This version of the method also takes an application id to qualify the parameter.

Parameters:
applicationId - the application id to use for qualifying the parameter
string - the string on which to perform variable substitution
Returns:
a string with any variables substituted with configuration parameter values

substituteConfigParameters

public static String substituteConfigParameters(String string)
Performs variable substitution on the specified string, replacing variables specified like ${name} with the value of the corresponding config parameter obtained from the current context Config object

Parameters:
string - the string on which to perform variable substitution
Returns:
a string with any variables substituted with configuration parameter values

parseGroupNamespaceCode

public static String parseGroupNamespaceCode(String namespaceAndNameCombo)

parseGroupName

public static String parseGroupName(String namespaceAndNameCombo)

checkDateRanges

public static boolean checkDateRanges(String fromDate,
                                      String toDate)

getKeyValueCollectionAsMap

public static <T extends KeyValue> Map<String,String> getKeyValueCollectionAsMap(List<T> collection)
Helper method that takes a List of KeyValue and presents it as a Map

Parameters:
collection - collection of KeyValue
Returns:
a Map representing the keys and values in the KeyValue collection

getKeyValueCollectionAsLookupTable

public static <T extends KeyValue> Map<String,T> getKeyValueCollectionAsLookupTable(List<T> collection)
Helper method that takes a List of KeyValue and presents it as a Map containing KeyValue values

Type Parameters:
T - the key type
Parameters:
collection - collection of KeyValue
Returns:
a Map where keys of the KeyValues in the collection are mapped to their respective KeyValue object


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.