ariba.util.validator
Class TaxIDValidator

java.lang.Object
  extended by ariba.util.validator.TaxIDValidator

public class TaxIDValidator
extends java.lang.Object

Validation for Tax ID based on country. Currently we only do validation for Brazil CNPJ.


Nested Class Summary
static class TaxIDValidator.TaxIDFormat
          This class provides TaxID format information for different countries.
 
Constructor Summary
TaxIDValidator()
           
 
Method Summary
static java.lang.String formattedValue(TaxIDValidator.TaxIDFormat idFormat, java.lang.String orgValue)
           
static java.util.Map<java.lang.String,TaxIDValidator.TaxIDFormat> getTaxIDFormats()
           
static boolean isTaxIDValid(java.lang.String country, java.lang.String taxid)
          Checks whether the given taxid is valid for given country.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaxIDValidator

public TaxIDValidator()
Method Detail

getTaxIDFormats

public static java.util.Map<java.lang.String,TaxIDValidator.TaxIDFormat> getTaxIDFormats()

formattedValue

public static java.lang.String formattedValue(TaxIDValidator.TaxIDFormat idFormat,
                                              java.lang.String orgValue)

isTaxIDValid

public static boolean isTaxIDValid(java.lang.String country,
                                   java.lang.String taxid)
Checks whether the given taxid is valid for given country.

Parameters:
country - unique name of the country to check against
taxid - the taxid value to validate
Returns:
boolean to indicate whether the given taxid is valid


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.