Class WebSecurityUtils


  • public abstract class WebSecurityUtils
    extends java.lang.Object

    WebSecurityUtils class.

    Version:
    $Id: $
    Author:
    Jeff Gehlbach
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double safeParseDouble​(java.lang.String dirty)
      safeParseDouble
      static float safeParseFloat​(java.lang.String dirty)
      safeParseFloat
      static int safeParseInt​(java.lang.String dirty)
      safeParseInt
      static int[] safeParseInt​(java.lang.String[] dirty)
      safeParseInt
      static long safeParseLong​(java.lang.String dirty)
      safeParseLong
      static java.lang.String sanitizeDbColumnName​(java.lang.String dirty)
      sanitizeDbColumnName
      static java.lang.String sanitizeString​(java.lang.String raw)
      sanitizeString
      static java.lang.String[] sanitizeString​(java.lang.String[] raw)
      sanitizeString
      static java.lang.String sanitizeString​(java.lang.String raw, boolean allowHTML)
      sanitizeString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebSecurityUtils

        public WebSecurityUtils()
    • Method Detail

      • sanitizeString

        public static java.lang.String[] sanitizeString​(java.lang.String[] raw)

        sanitizeString

        Parameters:
        raw - an array of String objects.
        Returns:
        an array of String objects.
      • sanitizeString

        public static java.lang.String sanitizeString​(java.lang.String raw)

        sanitizeString

        Parameters:
        raw - a String object.
        Returns:
        a String object.
      • sanitizeString

        public static java.lang.String sanitizeString​(java.lang.String raw,
                                                      boolean allowHTML)

        sanitizeString

        Parameters:
        raw - a String object.
        allowHTML - a boolean.
        Returns:
        a String object.
      • safeParseInt

        public static int[] safeParseInt​(java.lang.String[] dirty)
                                  throws java.lang.NumberFormatException

        safeParseInt

        Parameters:
        dirty - an array of String objects.
        Returns:
        an array of int.
        Throws:
        java.lang.NumberFormatException - if any.
      • safeParseInt

        public static int safeParseInt​(java.lang.String dirty)
                                throws java.lang.NumberFormatException

        safeParseInt

        Parameters:
        dirty - a String object.
        Returns:
        a int.
        Throws:
        java.lang.NumberFormatException - if any.
      • safeParseLong

        public static long safeParseLong​(java.lang.String dirty)
                                  throws java.lang.NumberFormatException

        safeParseLong

        Parameters:
        dirty - a String object.
        Returns:
        a long.
        Throws:
        java.lang.NumberFormatException - if any.
      • safeParseFloat

        public static float safeParseFloat​(java.lang.String dirty)
                                    throws java.lang.NumberFormatException

        safeParseFloat

        Parameters:
        dirty - a String object.
        Returns:
        a float.
        Throws:
        java.lang.NumberFormatException - if any.
      • safeParseDouble

        public static double safeParseDouble​(java.lang.String dirty)
                                      throws java.lang.NumberFormatException

        safeParseDouble

        Parameters:
        dirty - a String object.
        Returns:
        a double.
        Throws:
        java.lang.NumberFormatException - if any.
      • sanitizeDbColumnName

        public static java.lang.String sanitizeDbColumnName​(java.lang.String dirty)

        sanitizeDbColumnName

        Parameters:
        dirty - a String object.
        Returns:
        a String object.