com.ca.jcs.validator.meta
Class SingleValuedClassPropertiesValidator

java.lang.Object
  extended by com.ca.jcs.cfg.Vetoable
      extended by com.ca.jcs.validator.meta.ContextAwareClassValidator
          extended by com.ca.jcs.validator.meta.SingleValuedClassPropertiesValidator

public class SingleValuedClassPropertiesValidator
extends ContextAwareClassValidator

Validates that all properties with MetaDataDefs.MD_IS_MULTI_VALUED set to false for a class don't recieve more then one value. It needs to be implemented as a class validator to handle the case where a single-valued attribute is updated with an MODIFY ADD-ing a value, and a subsequent MODIFY REMOVE-ing a value, so that the entrire modification item array needs to be passed in together rather then one item at a time.


Field Summary
static String SINGLE_VALUED_MSG
           
 
Constructor Summary
SingleValuedClassPropertiesValidator(MetaObjectClassMapping classMap)
           
 
Method Summary
 ErrorMessages validate(AddOpContext ctx)
          Create/add case.
 ErrorMessages validate(ValidatorModifyOpContext ctx)
          Update/modify case.
 
Methods inherited from class com.ca.jcs.cfg.Vetoable
isVetoed, setVetoed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLE_VALUED_MSG

public static final String SINGLE_VALUED_MSG
See Also:
Constant Field Values
Constructor Detail

SingleValuedClassPropertiesValidator

public SingleValuedClassPropertiesValidator(MetaObjectClassMapping classMap)
Method Detail

validate

public ErrorMessages validate(AddOpContext ctx)
                       throws NamingException
Description copied from class: ContextAwareClassValidator
Create/add case.

Specified by:
validate in class ContextAwareClassValidator
Throws:
NamingException

validate

public ErrorMessages validate(ValidatorModifyOpContext ctx)
                       throws NamingException
Description copied from class: ContextAwareClassValidator
Update/modify case.

Specified by:
validate in class ContextAwareClassValidator
Throws:
NamingException


Created 2011-07-14 13:27 EST