Package org.opennms.core.utils
Class WebSecurityUtils
- java.lang.Object
-
- org.opennms.core.utils.WebSecurityUtils
-
public abstract class WebSecurityUtils extends java.lang.Object
WebSecurityUtils class.
- Version:
- $Id: $
- Author:
- Jeff Gehlbach
-
-
Constructor Summary
Constructors Constructor Description WebSecurityUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
safeParseDouble(java.lang.String dirty)
safeParseDoublestatic float
safeParseFloat(java.lang.String dirty)
safeParseFloatstatic int
safeParseInt(java.lang.String dirty)
safeParseIntstatic int[]
safeParseInt(java.lang.String[] dirty)
safeParseIntstatic long
safeParseLong(java.lang.String dirty)
safeParseLongstatic java.lang.String
sanitizeDbColumnName(java.lang.String dirty)
sanitizeDbColumnNamestatic java.lang.String
sanitizeString(java.lang.String raw)
sanitizeStringstatic java.lang.String[]
sanitizeString(java.lang.String[] raw)
sanitizeStringstatic java.lang.String
sanitizeString(java.lang.String raw, boolean allowHTML)
sanitizeString
-
-
-
Method Detail
-
sanitizeString
public static java.lang.String[] sanitizeString(java.lang.String[] raw)
sanitizeString
- Parameters:
raw
- an array ofString
objects.- Returns:
- an array of
String
objects.
-
sanitizeString
public static java.lang.String sanitizeString(java.lang.String raw)
sanitizeString
- Parameters:
raw
- aString
object.- Returns:
- a
String
object.
-
sanitizeString
public static java.lang.String sanitizeString(java.lang.String raw, boolean allowHTML)
sanitizeString
- Parameters:
raw
- aString
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 ofString
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
- aString
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
- aString
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
- aString
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
- aString
object.- Returns:
- a double.
- Throws:
java.lang.NumberFormatException
- if any.
-
sanitizeDbColumnName
public static java.lang.String sanitizeDbColumnName(java.lang.String dirty)
sanitizeDbColumnName
- Parameters:
dirty
- aString
object.- Returns:
- a
String
object.
-
-