Class Utilities

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

public final class Utilities extends Object
Various static utility methods.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • 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 org.kuali.rice.core.api.util.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 Mapinvalid input: '<'String, String> representing the keys and values in the KeyValue collection
    • getKeyValueCollectionAsLookupTable

      public static <T extends org.kuali.rice.core.api.util.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 Mapinvalid input: '<'T,Z> where keys of the KeyValues in the collection are mapped to their respective KeyValue object