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

ApplicationsTest

public class ApplicationsTest 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 ApplicationsTest()

    
      
    
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();
                Applications app = server.getApplications();
                String pollInterval = app.getDynamicReloadPollIntervalInSeconds();
                try {
                    if(Integer.parseInt(pollInterval) < 0) 
                        //result.failed("Reload Poll Interval cannot be negative number");
                        result.failed(smh.getLocalString(getClass().getName() + ".reloadNegative","Reload Poll Interval cannot be negative number"));
                    else
                        result.passed("Passed *** ");
                } catch(NumberFormatException e) {
                    //result.failed("Reload Poll Interval : invalid number");
                    result.failed(smh.getLocalString(getClass().getName()+".reloadInvalid","Reload Poll Interval : invalid number"));
                }
            }
            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();
                    if(name != null && value != null)
                        result = validateAttribute(name, (String)value);
                    return result;
                }
                
                return result;
    
public ResultvalidateAttribute(java.lang.String name, java.lang.String value)

            boolean failed = false;
            Result result = new Result();
            result.passed("Passed **");
            if(name.equals(ServerTags.DYNAMIC_RELOAD_POLL_INTERVAL_IN_SECONDS)) {
                try {
                    if(Integer.parseInt(value) < 0) {
                        //result.failed("Reload poll Interval cannot be negative number");
                        result.failed(smh.getLocalString(getClass().getName()+ ".reloadNegative","Reload Poll Interval cannot be negative number"));
                        failed = true;
                    }
                    else
                        result.passed("passed ***");
                } catch(NumberFormatException e) {
                    //result.failed("Reload Poll Interval : invalid number");
                    result.failed(smh.getLocalString(getClass().getName()+".reloadInvalid","Reload Poll Interval : invalid number"));
                    failed = true;
                } 
            }
            if(failed)
                result.setStatus(Result.FAILED);
            return result;