1 23 24 31 32 package com.sun.enterprise.admin.verifier.tests; 33 34 37 38 39 import java.io.File ; 40 import com.sun.enterprise.config.serverbeans.Server; 43 import com.sun.enterprise.config.serverbeans.*; 44 import com.sun.enterprise.config.serverbeans.Resources; 45 import com.sun.enterprise.config.serverbeans.Applications; 46 import com.sun.enterprise.config.ConfigContext; 47 import com.sun.enterprise.config.ConfigException; 48 import com.sun.enterprise.config.serverbeans.*; 49 import com.sun.enterprise.config.ConfigContextEvent; 50 51 import com.sun.enterprise.admin.verifier.*; 52 53 import java.util.logging.Logger ; 55 import java.util.logging.Level ; 56 import com.sun.logging.LogDomains; 57 58 public class AclTest extends ServerXmlTest implements ServerCheck { 59 60 static Logger _logger = LogDomains.getLogger(LogDomains.APPVERIFY_LOGGER); 62 63 public AclTest() { 64 } 65 66 public Result check(ConfigContext context) { 68 Result result; 69 result = super.getInitializedResult(); 70 86 return result; 87 } 88 89 public Result check(ConfigContextEvent ccce) { 91 Object value = ccce.getObject(); 92 ConfigContext context = ccce.getConfigContext(); 93 Result result = new Result(); 94 result.passed("Passed ** "); 95 String beanName = ccce.getBeanName(); 96 if(beanName!=null) { 97 String name = ccce.getName(); 98 result = testSave(name, (String )value); 99 return result; 100 } 101 120 return result; 121 } 122 123 public Result testSave(String name, String value) { 124 Result result = new Result(); 125 result.passed("Passed **"); 126 if(name.equals(ServerTags.FILE)) { 127 if(value != null) { 128 File f = new File (value); 129 if (!f.exists()) 130 result.failed("Invalid ACL File"); 131 } 132 } 133 return result; 134 } 135 136 } 137 | Popular Tags |