com.wm.app.tn.profile
Class ValidationWrapper

java.lang.Object
  extended by com.wm.app.tn.profile.ValidationWrapper

public class ValidationWrapper
extends java.lang.Object

Wrapper class for Validator. All validations should call at least one of the sendXXX methods from this class so that either standard fields, standard fields only profile, and/or extended fields are sent to the server as a PROFVAL_* document. Corresponding wm.tn.profile.validation services are fired when bizdocs are recognized. Validation errors are passed back as String arrays. Each element of the String array stands for one validation error found. Null is returned if no validation error found.


Field Summary
static java.lang.String DOC_CONTENT_DOCTYPE
           
static java.lang.String DOC_CONTENT_EXTFLDS
           
static java.lang.String DOC_CONTENT_STDFLDS
           
static java.lang.String DOC_CONTENT_STDPROF
           
static java.lang.String DOCTYPE_EXTFLDS
           
static java.lang.String DOCTYPE_ID_EXTFLDS
           
static java.lang.String DOCTYPE_ID_STDFLDS
           
static java.lang.String DOCTYPE_ID_STDPROF
           
static java.lang.String DOCTYPE_STDFLDS
           
static java.lang.String DOCTYPE_STDPROF
           
 
Constructor Summary
ValidationWrapper()
           
 
Method Summary
static java.lang.String checkCorpNameUniqueness(Profile profile)
           
static java.lang.String checkCorpNameUniqueness(java.lang.String newName)
          Helper method to check if newly added/updated Corporation display name is unique on this server.
static int getRequiredIDCount(java.lang.String partnerID, java.util.Vector newIDs)
          Deprecated. This will return default id count now
static boolean isDeletedProfile(Profile profile)
           
static boolean isDeletedProfile(java.lang.String newName)
           
static java.lang.String[] sendExtendedFields(java.util.Vector vFlds)
          Validates a vector of extended profile fields.
static java.lang.String[] sendStandardFields(java.util.Vector vFlds)
          Validates a vector of standard profile fields.
static java.lang.String[] sendStandardProfile(Profile profile)
          Validates a profile containing only standard profile fields.
static java.lang.String[] validateProfile(java.lang.String partnerID)
          For internal use only
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOC_CONTENT_DOCTYPE

public static final java.lang.String DOC_CONTENT_DOCTYPE
See Also:
Constant Field Values

DOCTYPE_STDFLDS

public static final java.lang.String DOCTYPE_STDFLDS
See Also:
Constant Field Values

DOCTYPE_STDPROF

public static final java.lang.String DOCTYPE_STDPROF
See Also:
Constant Field Values

DOCTYPE_EXTFLDS

public static final java.lang.String DOCTYPE_EXTFLDS
See Also:
Constant Field Values

DOCTYPE_ID_STDFLDS

public static final java.lang.String DOCTYPE_ID_STDFLDS
See Also:
Constant Field Values

DOCTYPE_ID_STDPROF

public static final java.lang.String DOCTYPE_ID_STDPROF
See Also:
Constant Field Values

DOCTYPE_ID_EXTFLDS

public static final java.lang.String DOCTYPE_ID_EXTFLDS
See Also:
Constant Field Values

DOC_CONTENT_STDFLDS

public static final java.lang.String DOC_CONTENT_STDFLDS
See Also:
Constant Field Values

DOC_CONTENT_STDPROF

public static final java.lang.String DOC_CONTENT_STDPROF
See Also:
Constant Field Values

DOC_CONTENT_EXTFLDS

public static final java.lang.String DOC_CONTENT_EXTFLDS
See Also:
Constant Field Values
Constructor Detail

ValidationWrapper

public ValidationWrapper()
Method Detail

sendStandardFields

public static java.lang.String[] sendStandardFields(java.util.Vector vFlds)
Validates a vector of standard profile fields.

Parameters:
vFlds - Vector of profile standard fields to be validated
Returns:
validation errors as a String array, null if no errors found

sendStandardProfile

public static java.lang.String[] sendStandardProfile(Profile profile)
Validates a profile containing only standard profile fields. If the profile contains extended fields, they will not be validated.

Parameters:
profile - partner profile containing only standard fields
Returns:
validation errors as a String array, null if no errors found

sendExtendedFields

public static java.lang.String[] sendExtendedFields(java.util.Vector vFlds)
Validates a vector of extended profile fields.

Parameters:
vFlds - Vector of profile extended fields to be validated
Returns:
validation errors as a String array, null if no errors found

checkCorpNameUniqueness

public static java.lang.String checkCorpNameUniqueness(java.lang.String newName)
Helper method to check if newly added/updated Corporation display name is unique on this server.

Parameters:
newName - corporation display name, in the format corpName (unitName)
Returns:
error message if duplicate name found, null if no error found

isDeletedProfile

public static boolean isDeletedProfile(java.lang.String newName)
Returns:
true if a deleted profile with a name matching newName exists

isDeletedProfile

public static boolean isDeletedProfile(Profile profile)

checkCorpNameUniqueness

public static java.lang.String checkCorpNameUniqueness(Profile profile)

getRequiredIDCount

public static int getRequiredIDCount(java.lang.String partnerID,
                                     java.util.Vector newIDs)
                              throws ProfileStoreException
Deprecated. This will return default id count now

Throws:
ProfileStoreException

validateProfile

public static java.lang.String[] validateProfile(java.lang.String partnerID)
                                          throws ProfileStoreException
For internal use only

Throws:
ProfileStoreException