Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.common
Class Utils

    java.lang.Object
      com.fujitsu.iflow.common.Utils

public class Utils
extends java.lang.Object

This class contains some static utility routines to handle strings for different requirements. Most importantly, this class provides routines for converting strings and XML used to define the UDA arguments of a `JavaAction`.

Constructor Summary
`Utils()`

Method Summary
`static java.lang.String` | `combineParametersToXML(java.lang.String[] params)` Returns a proper XML encoding of the expression and surrounding them with <E> tags, as necessary for the `JavaAction` UDA names setting.
`static java.lang.String[]` | `getParametersList(java.lang.String xmlString)`
`static java.lang.String` | `getTimeForDateType(java.lang.String value)`
`static java.lang.String` | `joinString(java.lang.String[] stringArray)` Takes a string array of identifiers, and packs the values into a comma- delimited list in a single string.
`static java.lang.String` | `makeETags(java.lang.String str, boolean makeItLiteral)`
`static java.lang.String[]` | `splitString(java.lang.String commaList)` Takes a string containing a comma-delimited list of identifiers, and splits it into an array of separate Strings.
`static java.lang.String[]` | `splitString(java.lang.String commaList, char delimiter)` Takes a string containing a list of values delimited by the specified character, and splits it into an array of separate Strings.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Utils

    public Utils()

Method Detail

### splitString

    public static java.lang.String[] splitString(java.lang.String commaList)

  Takes a string containing a comma-delimited list of identifiers, and splits it into an array of separate Strings. Note: the identifier values must not contain any commas, and there is no escaping mechanism to allow commas to be included in the values.

### splitString

    public static java.lang.String[] splitString(java.lang.String commaList,
                                                 char delimiter)

  Takes a string containing a list of values delimited by the specified character, and splits it into an array of separate Strings. Note: the identifier values must not contain any of the delimiter, and there is no escaping mechanism to allow delimiter characters to be included in the values.

### joinString

    public static java.lang.String joinString(java.lang.String[] stringArray)

  Takes a string array of identifiers, and packs the values into a comma- delimited list in a single string. Note: the identifier values must not contain any commas, there is no escaping mechanism to allow commas to be included in the values.

### makeETags

    public static java.lang.String makeETags(java.lang.String str,
                                             boolean makeItLiteral)

  Parameters:
    `str` -
    `makeItLiteral` -
  Returns:

### combineParametersToXML

    public static java.lang.String combineParametersToXML(java.lang.String[] params)
                                                   throws java.lang.Exception

  Returns a proper XML encoding of the expression and surrounding them with <E> tags, as necessary for the `JavaAction` UDA names setting.

  You can encode the constant values by using the method `JSConversions.quote4JS`.

  Parameters:
    `params` - The array of parameters to be encoded.
  Returns:
    The XML encoding of the supplied parameters
  Throws:
    `java.lang.Exception` - Thrown if the supplied list of params is `null` or if an element of that list is `null`. In that case the thrown exception is a `ModelException`.
  See Also:
    `JSConversions.quote4JS(String)`, `JavaAction.setArgumentsUDANames(String)`

### getParametersList

    public static java.lang.String[] getParametersList(java.lang.String xmlString)

  Parameters:
    `xmlString` -
  Returns:

### getTimeForDateType

    public static java.lang.String getTimeForDateType(java.lang.String value)
                                               throws java.lang.Exception

  Parameters:
    `value` -
  Returns:
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD