Class ValidationUtils


  • public class ValidationUtils
    extends Object
    Validates a MondrianGuiDef. Class contains invalid method formerly from mondrian.gui.SchemaTreeCellRenderer.
    Author:
    mlowery
    • Field Detail

      • DEF_LEVEL

        static String[] DEF_LEVEL
    • Constructor Detail

      • ValidationUtils

        public ValidationUtils()
    • Method Detail

      • invalid

        public static String invalid​(Messages messages,
                                     JdbcValidator jdbcValidator,
                                     TreeModel treeModel,
                                     TreeModelPath tpath,
                                     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​(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​(Object[] arr)
        Returns whether an array is null or empty
        Parameters:
        arr - array
        Returns:
        whether the array is null or empty