mondrian.gui.validate
Class ValidationUtils

java.lang.Object
  extended by mondrian.gui.validate.ValidationUtils

public class ValidationUtils
extends java.lang.Object

Validates a MondrianGuiDef. Class contains invalid method formerly from mondrian.gui.SchemaTreeCellRenderer.

Author:
mlowery

Field Summary
(package private) static java.lang.String[] DEF_LEVEL
           
 
Constructor Summary
ValidationUtils()
           
 
Method Summary
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 empty
static boolean isEmpty(java.lang.String v)
          Returns whether an object is null or the empty string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEF_LEVEL

static java.lang.String[] DEF_LEVEL
Constructor Detail

ValidationUtils

public ValidationUtils()
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 provider
jdbcValidator - Validator
treeModel - Tree model
tpath - Path
value - Value
cube - Cube
parentDimension - Parent dimension
parentHierarchy - Parent hierarchy
parentLevel - Parent level
isSchemaRequired - 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

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads