FileDocCategorySizeDatePackage
WebServiceEndpointTest.javaAPI DocGlassfish v2 API4013Fri May 04 22:24:38 BST 2007com.sun.enterprise.config.serverbeans.validation.tests

WebServiceEndpointTest

public class WebServiceEndpointTest extends com.sun.enterprise.config.serverbeans.validation.GenericValidator

Fields Summary
Constructors Summary
public WebServiceEndpointTest(com.sun.enterprise.config.serverbeans.validation.ValidationDescriptor desc)

        super(desc);
    
Methods Summary
public com.sun.enterprise.config.serverbeans.validation.Resultvalidate(com.sun.enterprise.config.ConfigContextEvent cce)

        return super.validate(cce); 
    
public voidvalidateAttribute(com.sun.enterprise.config.ConfigBean ownerBean, com.sun.enterprise.config.serverbeans.validation.AttrType attr, java.lang.Object value, com.sun.enterprise.config.serverbeans.validation.ValidationContext valCtx)

        if (attr.getName().equals(ServerTags.NAME) && 
            attr instanceof AttrString)
        {
            ConfigBean parent =  valCtx.getParentBean();
            if(parent instanceof J2eeApplication)
            {
                ((AttrString)attr).setRegExpression(
                   "[\\p{L}\\p{N}_][\\p{L}\\p{N}\\-_./;]*#[\\p{L}\\p{N}_][\\p{L}\\p{N}\\-_./;]*");
            }
            else
            {
                ((AttrString)attr).setRegExpression(
                   "[\\p{L}\\p{N}_][\\p{L}\\p{N}\\-_./;]*");
            }
            super.validateAttribute(ownerBean, attr, value, valCtx);
            ((AttrString)attr).setRegExpression(null);
        }
        else
           super.validateAttribute(ownerBean, attr, value, valCtx);