com.metamatrix.query.function.metadata
Class FunctionMetadataValidator

java.lang.Object
  extended by com.metamatrix.query.function.metadata.FunctionMetadataValidator

public class FunctionMetadataValidator
extends java.lang.Object

The validator encodes business logic with respect to what a valid function description is. These methods call each other from the most complex components (FunctionMethod) to the simplest pieces (function name). Certain users of the validator may only need to call lower level methods.


Field Summary
static int MAX_LENGTH
          Maximum length for function names, parameter names, categories, and descriptions.
 
Method Summary
static void validateCategory(java.lang.String category)
          Determine whether a category is valid.
static void validateDescription(java.lang.String description)
          Determine whether a description is valid.
static void validateFunctionMethod(FunctionMethod method, ActivityReport report)
          Determine whether a FunctionMethod is valid.
static void validateFunctionMethods(java.util.Collection methods, ActivityReport report)
          Validate a collection of FunctionMethod objects.
static void validateFunctionParameter(FunctionParameter param)
          Determine whether a FunctionParameter is valid.
static void validateInvocationMethod(java.lang.String invocationClass, java.lang.String invocationMethod, int pushdown)
          Determine whether an invocation class and method are valid.
static void validateName(java.lang.String name)
          Determine whether a function or parameter name is valid.
static void validateType(java.lang.String type)
          Determine whether a parameter type is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LENGTH

public static final int MAX_LENGTH
Maximum length for function names, parameter names, categories, and descriptions.

See Also:
Constant Field Values
Method Detail

validateFunctionMethods

public static final void validateFunctionMethods(java.util.Collection methods,
                                                 ActivityReport report)
Validate a collection of FunctionMethod objects.

Parameters:
methods - Collection of FunctionMethod objects
report - Report to store validation errors

validateFunctionMethod

public static final void validateFunctionMethod(FunctionMethod method,
                                                ActivityReport report)
Determine whether a FunctionMethod is valid. The following items are validated:

Parameters:
method - The method to validate
report - The report to update during validation

validateFunctionParameter

public static final void validateFunctionParameter(FunctionParameter param)
                                            throws FunctionMetadataException
Determine whether a FunctionParameter is valid. The following items are validated:

Parameters:
param - The parameter to validate
Throws:
FunctionMetadataException - Thrown if function parameter is not valid in some way

validateName

public static final void validateName(java.lang.String name)
                               throws FunctionMetadataException
Determine whether a function or parameter name is valid. The following items are validated:

Parameters:
name - Name to validate
Throws:
FunctionMetadataException - Thrown if function or parameter name is not valid in some way

validateType

public static final void validateType(java.lang.String type)
                               throws FunctionMetadataException
Determine whether a parameter type is valid. The following items are validated:

Parameters:
type - Type to validate
Throws:
FunctionMetadataException - Thrown if parameter type is not valid in some way

validateDescription

public static final void validateDescription(java.lang.String description)
                                      throws FunctionMetadataException
Determine whether a description is valid. The following items are validated:

Parameters:
description - Description to validate
Throws:
FunctionMetadataException - Thrown if description is not valid in some way

validateCategory

public static final void validateCategory(java.lang.String category)
                                   throws FunctionMetadataException
Determine whether a category is valid. The following items are validated:

Parameters:
category - Category to validate
Throws:
FunctionMetadataException - Thrown if category is not valid in some way

validateInvocationMethod

public static final void validateInvocationMethod(java.lang.String invocationClass,
                                                  java.lang.String invocationMethod,
                                                  int pushdown)
                                           throws FunctionMetadataException
Determine whether an invocation class and method are valid. The following items are validated:

Parameters:
invocationClass - Invocation class to validate
invocationMethod - Invocation method to validate
Throws:
FunctionMetadataException - Thrown if invocation method is not valid in some way


Copyright © 2009. All Rights Reserved.