FileDocCategorySizeDatePackage
AclTest.javaAPI DocGlassfish v2 API5821Fri May 04 22:34:10 BST 2007com.sun.enterprise.admin.verifier.tests

AclTest

public class AclTest extends ServerXmlTest implements ServerCheck
PROPRIETARY/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 Resultcheck(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 Resultcheck(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 ResulttestSave(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;