FileDocCategorySizeDatePackage
ValidationContext.javaAPI DocGlassfish v2 API5197Fri May 04 22:24:38 BST 2007com.sun.enterprise.config.serverbeans.validation

ValidationContext

public class ValidationContext extends Object

Fields Summary
public Result
result
public Object
value
public Object
classObject
public String
beanName
public com.sun.enterprise.config.ConfigContext
context
public String
name
public String
choice
public com.sun.enterprise.util.LocalStringManagerImpl
smh
public String
primaryKeyName
public ValidationDescriptor
validationDescriptor
public String
attrName
public Object
attrValue
Constructors Summary
public ValidationContext(Result result, Object value, Object classObject, String beanName, com.sun.enterprise.config.ConfigContext context, String name, String choice, String primaryKeyName, com.sun.enterprise.util.LocalStringManagerImpl smh, ValidationDescriptor validationDescriptor)

        this.result =  result;
        this.value = value;
        this.beanName = beanName;
        this.context = context;
        this.name = name;
        this.choice = choice;
        this.smh = smh;
        this.primaryKeyName = primaryKeyName;
        this.classObject = classObject;
        this.validationDescriptor = validationDescriptor;
        attrName = null;
    
Methods Summary
public NameListMgrgetNameListMgr()

        return validationDescriptor.domainMgr._nameListMgr;
    
public com.sun.enterprise.config.ConfigBeangetParentBean()

        if ((isSET()||isADD()) && (classObject instanceof ConfigBean) )
            return (ConfigBean)classObject;
        ConfigBean self = getTargetBean();
        try {
            return (ConfigBean)self.parent();
        } catch(Throwable t) {}
        return null;
    
public java.lang.StringgetPrimaryKeyName()

        return primaryKeyName;
    
public com.sun.enterprise.config.ConfigBeangetTargetBean()

        if ((isSET()||isADD()||isDELETE()||isVALIDATE()) && (value instanceof ConfigBean) )
            return (ConfigBean)value;
        if ((isUPDATE()) && (classObject instanceof ConfigBean))
            return (ConfigBean)classObject;
        return null;
    
public booleanisADD()

        return (choice != null && choice.equals(StaticTest.ADD));
    
public booleanisDELETE()

        return (choice != null && choice.equals(StaticTest.DELETE));
    
public booleanisSET()

        return (choice != null && choice.equals(StaticTest.SET) && (value instanceof ConfigBean) );
    
public booleanisUPDATE()

        return (choice != null && 
               (choice.equals(StaticTest.UPDATE) ||
                (choice.equals(StaticTest.SET) && 
                 ((value instanceof String)) || (value instanceof String[]))) );
    
public booleanisUPDATEorSET()

        return (choice != null && choice.equals(StaticTest.UPDATE) || choice.equals(StaticTest.SET));
    
public booleanisVALIDATE()

        return (choice != null && choice.equals(StaticTest.VALIDATE));
    
public voidsetAttrName(java.lang.String name)

        attrName = name;