AclTestpublic class AclTest extends ServerXmlTest implements ServerCheckPROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
Copyright 2001-2002 by iPlanet/Sun Microsystems, Inc.,
901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
All rights reserved. |
Fields Summary |
---|
static Logger | _logger |
Constructors Summary |
---|
public AclTest()
|
Methods Summary |
---|
public Result | check(com.sun.enterprise.config.ConfigContext context)
Result result;
result = super.getInitializedResult();
// 8.0 XML Verifier
/*try {
Server server = (Server)context.getRootConfigBean();
Acl[] acl = server.getHttpService().getAcl();
for(int i=0;i<acl.length;i++){
String file = acl[i].getFile();
File f = new File(file);
if(!f.exists())
result.failed("Acl File " + file + " is not Valid");
}
}
catch(Exception ex) {
// Logging
_logger.log(Level.FINE, "serverxmlverifier.exception", ex);
result.failed("Exception : " + ex.getMessage());
} */
return result;
| public Result | check(com.sun.enterprise.config.ConfigContextEvent ccce)
Object value = ccce.getObject();
ConfigContext context = ccce.getConfigContext();
Result result = new Result();
result.passed("Passed ** ");
String beanName = ccce.getBeanName();
if(beanName!=null) {
String name = ccce.getName();
result = testSave(name, (String)value);
return result;
}
/*
Acl acl = (Acl)value;
// check if Acl ID is valid object name Bug : 4698687 : start
String id = acl.getId();
if(StaticTest.checkObjectName(id, result))
result.passed("Valid Object Name");
else {
result.failed("Acl ID Invalid ");
return result;
}
// End Bug : 4698687
if(acl != null) {
File f = new File(acl.getFile());
if(!f.exists())
result.failed("Acl File Not Exists");
}
*/
return result;
| public Result | testSave(java.lang.String name, java.lang.String value)
Result result = new Result();
result.passed("Passed **");
if(name.equals(ServerTags.FILE)) {
if(value != null) {
File f = new File(value);
if (!f.exists())
result.failed("Invalid ACL File");
}
}
return result;
|
|