com.ibm.dse.tools.workbench.base
Class DomainValidator

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.DomainValidator

public class DomainValidator
extends java.lang.Object

This class is used to propose and validate allowed values for a domain


Constructor Summary
DomainValidator()
          This constructor creates a DomainValidator object
 
Method Summary
static java.lang.String[] getAllowedValues(Repository repository, java.lang.String domainName)
          Returns the list of allowed values for a domain
static java.lang.String[] getAllowedValues(TableRow domain)
          Returns the list of allowed values for a domain row
static TableRow getDomainByName(Repository repository, java.lang.String domainName)
          Returns the row representing a domain in a repository
static TableRow getRowByValue(TableRow domain, java.lang.String value)
          Returns the row representing a value in a domain
static TableRow[] getRows(Repository repository, java.lang.String domainName)
          Returns the rows representing the allowed values for a domain in a repository
static TableRow[] getRows(TableRow domain)
          Returns the rows representing the allowed values for a domain
static boolean isAllowed(Repository repository, java.lang.String domainName, java.lang.String value)
          Checks if a value is allowed for a domain in a repository
static boolean isAllowed(TableRow domain, java.lang.String value)
          Checks if a value is allowed for a domain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainValidator

public DomainValidator()
This constructor creates a DomainValidator object
Method Detail

getAllowedValues

public static java.lang.String[] getAllowedValues(Repository repository,
                                                  java.lang.String domainName)
                                           throws WorkbenchException
Returns the list of allowed values for a domain
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository The repository where to search
domainName - java.lang.String The name of the domain
Returns:
java.lang.String[]
Throws:
WorkbenchException -  

getAllowedValues

public static java.lang.String[] getAllowedValues(TableRow domain)
                                           throws WorkbenchException
Returns the list of allowed values for a domain row
Parameters:
domain - com.ibm.dse.tools.workbench.base.TableRow The row that represents the domain
Returns:
java.lang.String[]
Throws:
WorkbenchException -  

getDomainByName

public static TableRow getDomainByName(Repository repository,
                                       java.lang.String domainName)
                                throws WorkbenchException
Returns the row representing a domain in a repository
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository The repository where to search
domainName - java.lang.String The name of the domain
Returns:
com.ibm.dse.tools.workbench.base.TableRow
Throws:
WorkbenchException -  

getRowByValue

public static TableRow getRowByValue(TableRow domain,
                                     java.lang.String value)
                              throws WorkbenchException
Returns the row representing a value in a domain
Parameters:
domain - com.ibm.dse.tools.workbench.base.TableRow
value - java.lang.String
Returns:
com.ibm.dse.tools.workbench.base.TableRow
Throws:
WorkbenchException -  

getRows

public static TableRow[] getRows(Repository repository,
                                 java.lang.String domainName)
                          throws WorkbenchException
Returns the rows representing the allowed values for a domain in a repository
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository The repository where to search
domainName - java.lang.String The name of the domain
Returns:
com.ibm.dse.tools.workbench.base.TableRow[]
Throws:
WorkbenchException -  

getRows

public static TableRow[] getRows(TableRow domain)
                          throws WorkbenchException
Returns the rows representing the allowed values for a domain
Parameters:
domain - com.ibm.dse.tools.workbench.base.TableRow The row representing the domain
Returns:
com.ibm.dse.tools.workbench.base.TableRow[] the allowed values for the domain
Throws:
WorkbenchException -  

isAllowed

public static boolean isAllowed(Repository repository,
                                java.lang.String domainName,
                                java.lang.String value)
                         throws WorkbenchException
Checks if a value is allowed for a domain in a repository
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository The repository where to search
domainName - java.lang.String The name of the domain
value - java.lang.String The value to check
Returns:
boolean
Throws:
WorkbenchException -  

isAllowed

public static boolean isAllowed(TableRow domain,
                                java.lang.String value)
                         throws WorkbenchException
Checks if a value is allowed for a domain
Parameters:
domain - com.ibm.dse.tools.workbench.base.TableRow The row representing the domain
value - java.lang.String The value to check
Returns:
boolean
Throws:
WorkbenchException -