org.eclnt.util.valuemgmt

## Class ValueManager

- java.lang.Object
- - org.eclnt.util.valuemgmt.ValueManager

- All Implemented Interfaces:
    CLogConstants

      public class ValueManager
      extends java.lang.Object
      implements CLogConstants

  Static methods about color management.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ValueManager.HotKeyInfo`
    `static class` | `ValueManager.ImageData`
    `static class` | `ValueManager.MyCheckParser`
    `static class` | `ValueManager.NameValue`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CHARX_COMMA`
    `static java.lang.String` | `CHARX_SEMI`

    - ### Fields inherited from interface org.eclnt.util.log.CLogConstants

      `LL_DBG, LL_ERR, LL_INF, LL_WAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueManager()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `approveFileName(java.lang.String name)`
    `static int` | `calculateScaledSize(int pixelSize)` Calculates a pixel value into a scaled pixel value.
    `static boolean` | `checkIfdAsAutocompleteIdText(java.lang.String value)`
    `static boolean` | `checkIfFormatIsBoolean(java.lang.String format)`
    `static boolean` | `checkIfFormatIsNumeric(java.lang.String format)`
    `static boolean` | `checkIfObjectsAreEqual(java.lang.Object o1, java.lang.Object o2)`
    `static boolean` | `checkIfSizeIsHintOnly(java.lang.String value)` For some components sizes can be passed as minimum hint only.
    `static boolean` | `checkIfStringContainsSearchString(java.lang.String s, java.lang.String searchString)`
    `static boolean` | `checkIfStringIsJSFExpression(java.lang.String s)`
    `static boolean` | `checkIfStringMatchesAsteriskExpression(java.lang.String value, java.lang.String asterixExpression)`
    `static boolean` | `checkIfStringMatchesRegularExpression(java.lang.String value, java.lang.String regularExpression)`
    `static boolean` | `checkIfStringsAreEqual(java.lang.String s1, java.lang.String s2)`
    `static boolean` | `checkIfStringsAreEqual(java.lang.String s1, java.lang.String s2, boolean ignoreSlashR)`
    `static boolean` | `checkIfXMLIsValid(java.lang.String m_content)`
    `static java.lang.String` | `concatenateStrings(java.util.List<java.lang.String> items)` Memory-optimized concatenation of strings.
    `static java.lang.String` | `convertFileNameToCanonical(java.lang.String fileName, boolean isDirectory)`
    `static char` | `convertHexCodeToChar(java.lang.String hexcode)`
    `static java.lang.String` | `convertObject2DisplayString(java.lang.Object value, java.lang.String format, java.lang.String formatmask, java.lang.String timezone, boolean convertHTML)` Converts value object into string following formatting rules.
    `static java.lang.String` | `convertObject2ValueString(java.lang.Object o)` Converts object into string that can be transferred to the client.
    `static java.lang.Object` | `convertStringIntoObject(java.lang.String attrValue, java.lang.Class attrClass)`
    `static javax.xml.transform.Source` | `convertStringIntoXMLSource(java.lang.String xml)`
    `static java.lang.String` | `createHotKeyString(ValueManager.HotKeyInfo hotKeyInfo)`
    `static int` | `decodeAlign(java.lang.String value)` Decodes string "left", "right", "center", "leading", "trailing" into corresponding Swing integer.
    `static boolean` | `decodeBoolean(java.lang.String value, boolean nullValue)`
    `static javax.swing.border.Border` | `decodeBorder(java.lang.String value)`
    `static java.awt.Color` | `decodeColor(java.lang.String colorCode)`
    `static java.awt.Color` | `decodeColor(java.lang.String colorCode, java.lang.String nullValue)`
    `static java.util.Map<java.lang.String,java.lang.String>` | `decodeComplexValue(java.lang.String value)`
    `static java.util.Map<java.lang.String,java.lang.String>` | `decodeComplexValue(java.lang.String value, boolean withTrimming)`
    `static java.util.List<ValueManager.NameValue>` | `decodeComplexValueIntoList(java.lang.String value)`
    `static java.lang.String[]` | `decodeCSV(java.lang.String value)` Decode complex comma separated value string.
    `static java.lang.String[]` | `decodeCSV(java.lang.String value, java.lang.String nullString)` Decode complex comma separated value string.
    `static double` | `decodeDouble(java.lang.String value, double nullValue)`
    `static float` | `decodeFloat(java.lang.String value, float nullValue)`
    `static java.awt.Font` | `decodeFont(java.lang.String value)`
    `static java.lang.String` | `decodeFromXML(java.lang.String s)`
    `static byte` | `decodeHexChars(char c16, char c1)`
    `static byte[]` | `decodeHexString(java.lang.String s)`
    `static ValueManager.HotKeyInfo` | `decodeHotKey(java.lang.String value)`
    `static ValueManager.ImageData` | `decodeImageName(java.lang.String imageName, boolean isLeftToRight)` An image name may contain more information than the "URL" to the image: "&mirrorrtl" ==> image will be mirrorred in case of right to left display "&noscale" ==> image will NOT be scaled when the user increases the size factor of the screen
    `static int` | `decodeInt(java.lang.String value, int nullValue)`
    `static int` | `decodeIntWithRounding(java.lang.String value, int nullValue)` Same as `decodeInt(String, int)` but also checks if the value that is passed is a double value.
    `static long` | `decodeLong(java.lang.String value, long nullValue)`
    `static long` | `decodeLongWithRounding(java.lang.String value, long nullValue)` Same as `decodeLong(String, long)` but also checks if the value that is passed is a double value.
    `static java.lang.String` | `decodeMethodName(java.lang.String value)`
    `static java.lang.String[]` | `decodeMethodParams(java.lang.String value)`
    `static int` | `decodeMinSize(java.lang.String value)` A size value may contain a minimum size.
    `static Padding` | `decodePadding(java.lang.String value)`
    `static java.lang.String` | `decodePropertyName(java.lang.String methodName)` Converts a getter method starting with "get" or "is" into a property name.
    `static java.awt.Rectangle` | `decodeRectangle(java.lang.String value, java.awt.Rectangle nullValue)`
    `static int` | `decodeSize(java.lang.String value)`
    `static int` | `decodeSize(java.lang.String value, int nullValue)`
    `static int` | `decodeSizeWithReference(java.lang.String value, int reference)` This is a special size calculation which allows to pass a combination of percentage and absolute sizing within the value.
    `static int[]` | `decodeStraighIntCSV(java.lang.String value)` Decode semicolon separated strings of integer values.
    `static int[]` | `decodeStraighSizeCSV(java.lang.String value)` Decode semicolon separated strings of integer values.
    `static java.lang.String[]` | `decodeStraightCSV(java.lang.String value)` Same functions as `decodeCSV(String)`.
    `static java.util.List<java.lang.String>` | `decodeStringListXML(java.lang.String s)`
    `static TextSelectionInfo` | `decodeTextSelectionInfo(java.lang.String s)`
    `static int` | `decodeValign(java.lang.String value)`
    `static java.lang.String` | `encodeAutocompleteIdText(java.lang.String id, java.lang.String text)`
    `static java.lang.String` | `encodeColor(java.awt.Color c)`
    `static java.lang.String` | `encodeComplexValue(java.util.Map<java.lang.String,java.lang.String> values)` Encodes a complex value string of the format: "name=value;name=value;name=value"
    `static java.lang.String` | `encodeComplexValue(java.util.Map<java.lang.String,java.lang.String> values, boolean ignoreNullValues)`
    `static java.lang.String` | `encodeCSV(java.util.List<java.lang.String> values)` Same as `encodeCSV(String[])`, just with different way of passing strings.
    `static java.lang.String` | `encodeCSV(java.util.List<java.lang.String> values, java.lang.String nullString)` Encoding of CSV, null-values are transferred into a defined string that is passed via parameter nullString.
    `static java.lang.String` | `encodeCSV(java.lang.String[] values)` Best way to encode comma separated strings.
    `static java.lang.String` | `encodeCSVWithQuotes(java.util.List<java.lang.String> values)` Encodes list of values into CSV string, each string is embedded into quotes
    `static java.lang.String` | `encodeHexString(byte[] bytes)`
    `static java.lang.String` | `encodeIntoEscapedString(java.lang.String s)`
    `static java.lang.String` | `encodeIntoEscapedValueString(java.lang.String s)`
    `static java.lang.String` | `encodeIntoValidFileName(java.lang.String s, boolean isDirectory)`
    `static java.lang.String` | `encodeIntoValidURL(java.lang.String s)`
    `static java.lang.String` | `encodeIntoValidWebResourcePath(java.lang.String s, boolean isDirectory)`
    `static java.lang.String` | `encodeIntoValidXMLString(java.lang.String s)`
    `static java.lang.String` | `encodeIntoValidXMLValueString(java.lang.String s)`
    `static java.lang.String` | `encodeMethod(java.lang.String methodName, java.lang.String[] params)` Encodes a method call strings, formed in the way: method(param1,param2).
    `static java.lang.String` | `encodeMethodParams(java.util.List<java.lang.String> params)` Encode the method parameters as comma separated string with converting contained "," to "\x2C".
    `static java.lang.String` | `encodeMethodParamsArray(java.lang.String[] params)` Encode the method parameters as comma separated string with converting contained "," to "\x2C".
    `static java.lang.String` | `encodeRectangle(java.awt.Rectangle value)`
    `static java.lang.String` | `encodeRectangle(java.awt.Rectangle value, boolean scaleToLoxels)`
    `static java.lang.String` | `encodeSize(int value)`
    `static java.lang.String` | `encodeStraightIntCSV(int[] values)` Transfer array of integer values into semicolon separated list of integer values.
    `static java.lang.String` | `encodeStraightSizeCSV(int[] values)` Transfer array of integer values into semicolon separated list of integer values.
    `static java.lang.String` | `encodeStringListXML(java.util.List<java.lang.String> l)`
    `static java.lang.String` | `encodeTextSelectionInfo(TextSelectionInfo value)`
    `static java.lang.String` | `encodeURL(java.lang.String url)`
    `static java.lang.String` | `escapeXMLString(java.lang.String s)`
    `static java.text.Format` | `findFormatter(java.lang.String format, java.lang.String formatmask, java.lang.String timezone, java.lang.String language, java.lang.String country)`
    `static java.util.Calendar` | `getCalendar(java.lang.String timezone)` Get the default calendar.
    `static java.awt.Font` | `getDefaultFont()`
    `static java.awt.Font` | `getDefaultScaledFont()`
    `static int` | `getNumberOfDecimals(java.lang.String formatmask)`
    `static java.lang.String` | `getStackstraceString(java.lang.Throwable t)`
    `static void` | `initialize()` Initialization is only required when working with fonts.
    `static java.lang.String` | `removeAllHtmlTagsIfHtmlString(java.lang.String html)`
    `static java.lang.String` | `removeDoubleSpacesAndTrim(java.lang.String s)`
    `static java.lang.String` | `removeLeadingXMLDeclaration(java.lang.String xml)` Removes the XML declaration which may be the start of an XML document.
    `static java.lang.String` | `replaceSystemProperties(java.lang.String s, boolean encodeToXml)` Replaces place holders for system and environment variables in the text by corresponding values.
    `static java.math.BigDecimal` | `rightScale(java.math.BigDecimal value, int numberOfFractionDigits)` Converts a big decimal according to formatmask.
    `static java.lang.String` | `rightSizeLineBreaks(java.lang.String text)` Ensure that all carriage returns are "\r\n" definitions.
    `static java.lang.String[]` | `tokenize(java.lang.String inputs, java.lang.String separator)` Internal method for splitting one string into its contained parts, separated by a separator.
    `static java.lang.String` | `toLowerCaseId(java.lang.String s)`
    `static java.lang.String` | `toLowerCaseText(java.lang.String s)`
    `static java.lang.String` | `toUpperCaseId(java.lang.String s)`
    `static java.lang.String` | `toUpperCaseText(java.lang.String s)`
    `static java.lang.String` | `truncateString(java.lang.String s, int limit)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CHARX_SEMI

          public static final java.lang.String CHARX_SEMI

      See Also:
        Constant Field Values

    - #### CHARX_COMMA

          public static final java.lang.String CHARX_COMMA

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ValueManager

          public ValueManager()

  - ### Method Detail

    - #### checkIfdAsAutocompleteIdText

          public static boolean checkIfdAsAutocompleteIdText(java.lang.String value)

    - #### encodeAutocompleteIdText

          public static java.lang.String encodeAutocompleteIdText(java.lang.String id,
                                                                  java.lang.String text)

    - #### decodeStringListXML

          public static java.util.List<java.lang.String> decodeStringListXML(java.lang.String s)

    - #### encodeStringListXML

          public static java.lang.String encodeStringListXML(java.util.List<java.lang.String> l)

    - #### decodeRectangle

          public static java.awt.Rectangle decodeRectangle(java.lang.String value,
                                                           java.awt.Rectangle nullValue)

    - #### encodeRectangle

          public static java.lang.String encodeRectangle(java.awt.Rectangle value)

    - #### encodeRectangle

          public static java.lang.String encodeRectangle(java.awt.Rectangle value,
                                                         boolean scaleToLoxels)

    - #### decodeHotKey

          public static ValueManager.HotKeyInfo decodeHotKey(java.lang.String value)

    - #### createHotKeyString

          public static java.lang.String createHotKeyString(ValueManager.HotKeyInfo hotKeyInfo)

      Returns:
        Readable String for the hot key that can be appended to an existing text. Example: " (ctrl-alt-F1)".

    - #### decodeImageName

          public static ValueManager.ImageData decodeImageName(java.lang.String imageName,
                                                               boolean isLeftToRight)

      An image name may contain more information than the "URL" to the image:
      "&mirrorrtl" ==> image will be mirrorred in case of right to left display
      "&noscale" ==> image will NOT be scaled when the user increases the size factor of the screen

    - #### decodeAlign

          public static int decodeAlign(java.lang.String value)

      Decodes string "left", "right", "center", "leading", "trailing" into corresponding Swing integer.

    - #### decodeValign

          public static int decodeValign(java.lang.String value)

    - #### decodeCSV

          public static java.lang.String[] decodeCSV(java.lang.String value)

      Decode complex comma separated value string. Each value may internally hold ";" strings, which are represented as "\x3B".

    - #### decodeCSV

          public static java.lang.String[] decodeCSV(java.lang.String value,
                                                     java.lang.String nullString)

      Decode complex comma separated value string. A certain string is interpreted as null-string.

    - #### decodeStraightCSV

          public static java.lang.String[] decodeStraightCSV(java.lang.String value)

      Same functions as `decodeCSV(String)`. There is no separation between "straigh" and "normal" CSV value anymore.
      Returns:

    - #### decodeStraighIntCSV

          public static int[] decodeStraighIntCSV(java.lang.String value)

      Decode semicolon separated strings of integer values.

    - #### decodeStraighSizeCSV

          public static int[] decodeStraighSizeCSV(java.lang.String value)

      Decode semicolon separated strings of integer values.

    - #### encodeCSV

          public static java.lang.String encodeCSV(java.lang.String[] values)

      Best way to encode comma separated strings. Passing an array of strings. The logic of the method automatically transfers contained characters into a "\x3B" representations.

    - #### encodeCSVWithQuotes

          public static java.lang.String encodeCSVWithQuotes(java.util.List<java.lang.String> values)

      Encodes list of values into CSV string, each string is embedded into quotes

    - #### encodeCSV

          public static java.lang.String encodeCSV(java.util.List<java.lang.String> values)

      Same as `encodeCSV(String[])`, just with different way of passing strings.

    - #### encodeCSV

          public static java.lang.String encodeCSV(java.util.List<java.lang.String> values,
                                                   java.lang.String nullString)

      Encoding of CSV, null-values are transferred into a defined string that is passed via parameter nullString.

    - #### encodeStraightIntCSV

          public static java.lang.String encodeStraightIntCSV(int[] values)

      Transfer array of integer values into semicolon separated list of integer values.

    - #### encodeStraightSizeCSV

          public static java.lang.String encodeStraightSizeCSV(int[] values)

      Transfer array of integer values into semicolon separated list of integer values.

    - #### decodeBoolean

          public static boolean decodeBoolean(java.lang.String value,
                                              boolean nullValue)

    - #### encodeColor

          public static java.lang.String encodeColor(java.awt.Color c)

    - #### decodeColor

          public static java.awt.Color decodeColor(java.lang.String colorCode)

      Parameters:
        `colorCode` - Color as "#RRGGBB" value.
      Returns:
        Color as awt-color. Null in case of error.

    - #### decodeColor

          public static java.awt.Color decodeColor(java.lang.String colorCode,
                                                   java.lang.String nullValue)

      Parameters:
        `colorCode` - Color as "#RRGGBB" value.
      Returns:
        Color as awt-color. Null in case of error.

    - #### decodeSize

          public static int decodeSize(java.lang.String value)

      Parameters:
        `value` - Either pixel value "100" or percentage value "50%" or percentage definition with minimum "50%;100"
      Returns:
        Integer representation: "100" or "-50".

    - #### decodeMinSize

          public static int decodeMinSize(java.lang.String value)

      A size value may contain a minimum size. This minimum size must be a pixel value.
      Returns:
        pixel size of minimum size; -1 if nothing is defined

    - #### encodeSize

          public static java.lang.String encodeSize(int value)

    - #### calculateScaledSize

          public static int calculateScaledSize(int pixelSize)

      Calculates a pixel value into a scaled pixel value.

    - #### decodeSizeWithReference

          public static int decodeSizeWithReference(java.lang.String value,
                                                    int reference)

      This is a special size calculation which allows to pass a combination of percentage and absolute sizing within the value. Example: value="100%-20" ==> the result is calulcated from the reference accordingly.
      Currently only "-" is allowed as parameter. If a minus exists then the fist parameter is expected to be a percentage value. If no "-" is part of the value then the normal decodeSize(value) method is called.
      There is no other purpose (currently) of this method than calculating a percentage size with some absolute padding. It is typically used for width or height definitions.
      Returns:
        Size as integer.

    - #### decodeSize

          public static int decodeSize(java.lang.String value,
                                       int nullValue)

    - #### checkIfSizeIsHintOnly

          public static boolean checkIfSizeIsHintOnly(java.lang.String value)

      For some components sizes can be passed as minimum hint only. E.g. button has a size of "100" but if the text inside exceeds the button then the button will not be cut. In this case the size value is passed with "+" at the end.

    - #### decodeComplexValue

          public static java.util.Map<java.lang.String,java.lang.String> decodeComplexValue(java.lang.String value)

      Parameters:
        `value` - String in the format "name=value;name=value;name=value"
      Returns:
        Map that represented the value, key=name, value=value

    - #### decodeComplexValue

          public static java.util.Map<java.lang.String,java.lang.String> decodeComplexValue(java.lang.String value,
                                                                                            boolean withTrimming)

    - #### decodeComplexValueIntoList

          public static java.util.List<ValueManager.NameValue> decodeComplexValueIntoList(java.lang.String value)

      Parameters:
        `value` - String in the format "name=value;name=value;name=value"
      Returns:
        List of contained name/value pairs. Important: the sequence of the name/value pairs is the same as in the value passed as parameter.

    - #### encodeComplexValue

          public static java.lang.String encodeComplexValue(java.util.Map<java.lang.String,java.lang.String> values)

      Encodes a complex value string of the format: "name=value;name=value;name=value"

    - #### encodeComplexValue

          public static java.lang.String encodeComplexValue(java.util.Map<java.lang.String,java.lang.String> values,
                                                            boolean ignoreNullValues)

    - #### initialize

          public static void initialize()

      Initialization is only required when working with fonts.

    - #### getDefaultFont

          public static java.awt.Font getDefaultFont()

    - #### getDefaultScaledFont

          public static java.awt.Font getDefaultScaledFont()

    - #### decodeFont

          public static java.awt.Font decodeFont(java.lang.String value)

      Parameters:
        `value` -
      Returns:

    - #### decodePadding

          public static Padding decodePadding(java.lang.String value)

    - #### decodeBorder

          public static javax.swing.border.Border decodeBorder(java.lang.String value)

    - #### decodeInt

          public static int decodeInt(java.lang.String value,
                                      int nullValue)

      Parameters:
        `value` - String value of integer.
        `nullValue` - Default value that is returned either if the value-parameter is null, or if any error occurs when decoding the integer value.
      Returns:

    - #### decodeIntWithRounding

          public static int decodeIntWithRounding(java.lang.String value,
                                                  int nullValue)

      Same as `decodeInt(String, int)` but also checks if the value that is passed is a double value. If so then it is rounded to int.

    - #### decodeFloat

          public static float decodeFloat(java.lang.String value,
                                          float nullValue)

    - #### decodeDouble

          public static double decodeDouble(java.lang.String value,
                                            double nullValue)

    - #### decodeLong

          public static long decodeLong(java.lang.String value,
                                        long nullValue)

    - #### decodeLongWithRounding

          public static long decodeLongWithRounding(java.lang.String value,
                                                    long nullValue)

      Same as `decodeLong(String, long)` but also checks if the value that is passed is a double value. If so then it is rounded to int.

    - #### decodeMethodParams

          public static java.lang.String[] decodeMethodParams(java.lang.String value)

      Parameters:
        `value` - String value representing a method call e.g. onSave(firstName,lastName).
      Returns:
        Array of parameters e.g. [firstName,lastName].

    - #### encodeMethod

          public static java.lang.String encodeMethod(java.lang.String methodName,
                                                      java.lang.String[] params)

      Encodes a method call strings, formed in the way: method(param1,param2). If parameters contain "," on their owns these are converted to "\x2C" as part of the encoding process.

    - #### encodeMethodParams

          public static java.lang.String encodeMethodParams(java.util.List<java.lang.String> params)

      Encode the method parameters as comma separated string with converting contained "," to "\x2C".

    - #### encodeMethodParamsArray

          public static java.lang.String encodeMethodParamsArray(java.lang.String[] params)

      Encode the method parameters as comma separated string with converting contained "," to "\x2C".

    - #### tokenize

          public static java.lang.String[] tokenize(java.lang.String inputs,
                                                    java.lang.String separator)

      Internal method for splitting one string into its contained parts, separated by a separator.

    - #### decodeMethodName

          public static java.lang.String decodeMethodName(java.lang.String value)

      Parameters:
        `value` - String value representing a method call e.g. onSave(firstName,lastName).
      Returns:
        Name of method, in the example: "onSave"

    - #### escapeXMLString

          public static java.lang.String escapeXMLString(java.lang.String s)

    - #### encodeIntoValidXMLString

          public static java.lang.String encodeIntoValidXMLString(java.lang.String s)

    - #### encodeIntoEscapedString

          public static java.lang.String encodeIntoEscapedString(java.lang.String s)

    - #### encodeIntoValidXMLValueString

          public static java.lang.String encodeIntoValidXMLValueString(java.lang.String s)

    - #### encodeIntoEscapedValueString

          public static java.lang.String encodeIntoEscapedValueString(java.lang.String s)

    - #### decodeFromXML

          public static java.lang.String decodeFromXML(java.lang.String s)

    - #### encodeIntoValidFileName

          public static java.lang.String encodeIntoValidFileName(java.lang.String s,
                                                                 boolean isDirectory)

    - #### encodeIntoValidURL

          public static java.lang.String encodeIntoValidURL(java.lang.String s)

    - #### encodeIntoValidWebResourcePath

          public static java.lang.String encodeIntoValidWebResourcePath(java.lang.String s,
                                                                        boolean isDirectory)

    - #### getStackstraceString

          public static java.lang.String getStackstraceString(java.lang.Throwable t)

    - #### decodeHexChars

          public static byte decodeHexChars(char c16,
                                            char c1)

    - #### decodeHexString

          public static byte[] decodeHexString(java.lang.String s)

    - #### encodeHexString

          public static java.lang.String encodeHexString(byte[] bytes)

    - #### getCalendar

          public static java.util.Calendar getCalendar(java.lang.String timezone)

      Get the default calendar. The timezone is derived from the static member that is set by `#setTimezone(String)`.

    - #### decodePropertyName

          public static java.lang.String decodePropertyName(java.lang.String methodName)

      Converts a getter method starting with "get" or "is" into a property name. Otherwise returns null.

    - #### checkIfObjectsAreEqual

          public static boolean checkIfObjectsAreEqual(java.lang.Object o1,
                                                       java.lang.Object o2)

    - #### checkIfStringContainsSearchString

          public static boolean checkIfStringContainsSearchString(java.lang.String s,
                                                                  java.lang.String searchString)

    - #### checkIfStringsAreEqual

          public static boolean checkIfStringsAreEqual(java.lang.String s1,
                                                       java.lang.String s2)

    - #### checkIfStringsAreEqual

          public static boolean checkIfStringsAreEqual(java.lang.String s1,
                                                       java.lang.String s2,
                                                       boolean ignoreSlashR)

    - #### checkIfStringMatchesRegularExpression

          public static boolean checkIfStringMatchesRegularExpression(java.lang.String value,
                                                                      java.lang.String regularExpression)

    - #### checkIfStringMatchesAsteriskExpression

          public static boolean checkIfStringMatchesAsteriskExpression(java.lang.String value,
                                                                       java.lang.String asterixExpression)

    - #### convertStringIntoObject

          public static java.lang.Object convertStringIntoObject(java.lang.String attrValue,
                                                                 java.lang.Class attrClass)

    - #### convertObject2DisplayString

          public static java.lang.String convertObject2DisplayString(java.lang.Object value,
                                                                     java.lang.String format,
                                                                     java.lang.String formatmask,
                                                                     java.lang.String timezone,
                                                                     boolean convertHTML)

      Converts value object into string following formatting rules.

    - #### convertObject2ValueString

          public static java.lang.String convertObject2ValueString(java.lang.Object o)

      Converts object into string that can be transferred to the client.

    - #### rightScale

          public static java.math.BigDecimal rightScale(java.math.BigDecimal value,
                                                        int numberOfFractionDigits)

      Converts a big decimal according to formatmask.

    - #### checkIfStringIsJSFExpression

          public static boolean checkIfStringIsJSFExpression(java.lang.String s)

    - #### decodeTextSelectionInfo

          public static TextSelectionInfo decodeTextSelectionInfo(java.lang.String s)

    - #### encodeTextSelectionInfo

          public static java.lang.String encodeTextSelectionInfo(TextSelectionInfo value)

    - #### truncateString

          public static java.lang.String truncateString(java.lang.String s,
                                                        int limit)

    - #### concatenateStrings

          public static java.lang.String concatenateStrings(java.util.List<java.lang.String> items)

      Memory-optimized concatenation of strings.

    - #### removeAllHtmlTagsIfHtmlString

          public static java.lang.String removeAllHtmlTagsIfHtmlString(java.lang.String html)

    - #### removeDoubleSpacesAndTrim

          public static java.lang.String removeDoubleSpacesAndTrim(java.lang.String s)

    - #### toLowerCaseId

          public static java.lang.String toLowerCaseId(java.lang.String s)

    - #### toUpperCaseId

          public static java.lang.String toUpperCaseId(java.lang.String s)

    - #### toLowerCaseText

          public static java.lang.String toLowerCaseText(java.lang.String s)

    - #### toUpperCaseText

          public static java.lang.String toUpperCaseText(java.lang.String s)

    - #### findFormatter

          public static java.text.Format findFormatter(java.lang.String format,
                                                       java.lang.String formatmask,
                                                       java.lang.String timezone,
                                                       java.lang.String language,
                                                       java.lang.String country)

    - #### getNumberOfDecimals

          public static int getNumberOfDecimals(java.lang.String formatmask)

    - #### checkIfFormatIsNumeric

          public static boolean checkIfFormatIsNumeric(java.lang.String format)

    - #### checkIfFormatIsBoolean

          public static boolean checkIfFormatIsBoolean(java.lang.String format)

    - #### convertHexCodeToChar

          public static char convertHexCodeToChar(java.lang.String hexcode)

    - #### checkIfXMLIsValid

          public static boolean checkIfXMLIsValid(java.lang.String m_content)

    - #### encodeURL

          public static java.lang.String encodeURL(java.lang.String url)

    - #### rightSizeLineBreaks

          public static java.lang.String rightSizeLineBreaks(java.lang.String text)

      Ensure that all carriage returns are "\r\n" definitions.

    - #### approveFileName

          public static java.lang.String approveFileName(java.lang.String name)

    - #### convertFileNameToCanonical

          public static java.lang.String convertFileNameToCanonical(java.lang.String fileName,
                                                                    boolean isDirectory)

    - #### replaceSystemProperties

          public static java.lang.String replaceSystemProperties(java.lang.String s,
                                                                 boolean encodeToXml)

      Replaces place holders for system and environment variables in the text by corresponding values.
      The place holders are following the convention "${env.xxxxx}" for environment variables (which are resolved using `System.getenv(String)`) and "${sys.xxxxx}" for system variables (which are resolved using `System.getProperty(String)`.
      There are some dedicated place holders in addition which are replaced:
      "${webappName}" - this is the name of the current application. The name is derived from the application's context path. The context path is usually staring with "/" - which is cut. In case the context path is "/" then "root" is returned.
      Parameters:
        `encodeToXml` - If set to true then the result is encode to proper XML values - so that the XML string will not be invalid (e.g. characters like " and ' are correctly managed.
      Returns:
        String with replaced place holders. If a place holder cannot be resolved then the place holder is left untouched.

    - #### removeLeadingXMLDeclaration

          public static java.lang.String removeLeadingXMLDeclaration(java.lang.String xml)

      Removes the XML declaration which may be the start of an XML document. This may be required if concatenating several XMLs into one XML.

    - #### convertStringIntoXMLSource

          public static javax.xml.transform.Source convertStringIntoXMLSource(java.lang.String xml)

Copyright © CaptainCasa Gmbh. All Rights Reserved.