1 23 24 package com.sun.enterprise.config.serverbeans.validation.tests; 25 26 import java.util.Locale ; 27 import java.util.logging.Level ; 28 29 import com.sun.enterprise.config.serverbeans.validation.GenericValidator; 30 import com.sun.enterprise.config.serverbeans.validation.ValidationDescriptor; 31 import com.sun.enterprise.config.serverbeans.validation.Result; 32 import com.sun.enterprise.config.serverbeans.Domain; 33 import com.sun.enterprise.config.serverbeans.Configs; 34 import com.sun.enterprise.config.serverbeans.Config; 35 import com.sun.enterprise.config.serverbeans.Servers; 36 import com.sun.enterprise.config.serverbeans.Server; 37 import com.sun.enterprise.config.serverbeans.ServerTags; 38 import com.sun.enterprise.config.serverbeans.validation.tests.StaticTest; 39 40 import com.sun.enterprise.config.ConfigBean; 41 import com.sun.enterprise.config.ConfigContextEvent; 42 import com.sun.enterprise.config.ConfigException; 43 44 50 51 public class DomainTest extends GenericValidator { 52 53 public DomainTest(ValidationDescriptor desc) { 54 super(desc); 55 } 56 57 public Result validate(ConfigContextEvent cce) { 58 Result result = super.validate(cce); 60 if(cce.getChoice().equals(StaticTest.ADD) || cce.getChoice().equals(StaticTest.VALIDATE)) { 61 Domain domain = (Domain)cce.getObject(); 62 66 71 } 75 76 if(cce.getChoice().equals(StaticTest.UPDATE)) 77 validateAttribute(cce.getName(), (String )cce.getObject(), result); 78 79 return result; 80 } 81 82 public void validateAttribute(String name, String value, Result result) { 83 84 boolean checked = false; 85 if(value == null || value.equals("")) 86 return; 87 105 106 } 107 } 108 | Popular Tags |