Package mondrian.gui.validate
Class ValidationUtils
- java.lang.Object
-
- mondrian.gui.validate.ValidationUtils
-
public class ValidationUtils extends java.lang.Object
Validates aMondrianGuiDef
. Class containsinvalid
method formerly frommondrian.gui.SchemaTreeCellRenderer
.- Author:
- mlowery
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String[]
DEF_LEVEL
-
Constructor Summary
Constructors Constructor Description ValidationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
invalid(Messages messages, JdbcValidator jdbcValidator, TreeModel treeModel, TreeModelPath tpath, java.lang.Object value, MondrianGuiDef.Cube cube, MondrianGuiDef.Dimension parentDimension, MondrianGuiDef.Hierarchy parentHierarchy, MondrianGuiDef.Level parentLevel, boolean isSchemaRequired)
Validate a schema model and returns the first error message if it is invalid.static boolean
isEmpty(java.lang.Object[] arr)
Returns whether an array is null or emptystatic boolean
isEmpty(java.lang.String v)
Returns whether an object is null or the empty string.
-
-
-
Method Detail
-
invalid
public static java.lang.String invalid(Messages messages, JdbcValidator jdbcValidator, TreeModel treeModel, TreeModelPath tpath, java.lang.Object value, MondrianGuiDef.Cube cube, MondrianGuiDef.Dimension parentDimension, MondrianGuiDef.Hierarchy parentHierarchy, MondrianGuiDef.Level parentLevel, boolean isSchemaRequired)
Validate a schema model and returns the first error message if it is invalid.- Parameters:
messages
- Message providerjdbcValidator
- ValidatortreeModel
- Tree modeltpath
- Pathvalue
- Valuecube
- CubeparentDimension
- Parent dimensionparentHierarchy
- Parent hierarchyparentLevel
- Parent levelisSchemaRequired
- Whether schema is required- Returns:
- Error message if element is invalid, null if it is valid
-
isEmpty
public static boolean isEmpty(java.lang.String v)
Returns whether an object is null or the empty string.- Parameters:
v
- Object- Returns:
- Whether object is null or the empty string
-
isEmpty
public static boolean isEmpty(java.lang.Object[] arr)
Returns whether an array is null or empty- Parameters:
arr
- array- Returns:
- whether the array is null or empty
-
-