Package org.vfny.geoserver.config.validation

Examples of org.vfny.geoserver.config.validation.TestSuiteConfig


        String edit = messages.getMessage(locale, "label.edit");
        String delete = messages.getMessage(locale, "label.delete");
       
        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
       
        if (edit.equals(buttonAction)) {
            TestConfig testConfig = (TestConfig) suiteConfig.getTests().get(selectedTest);
            request.getSession().setAttribute(TestConfig.CURRENTLY_SELECTED_KEY, testConfig);
           
            return mapping.findForward("validationTestEditor");           
        } else if (delete.equals(buttonAction)) {
           
            Map tests = suiteConfig.getTests();
            tests.remove(selectedTest);
            suiteConfig.setTests(tests);
            getApplicationState().notifyConfigChanged();
           
            request.getSession().removeAttribute(TestConfig.CURRENTLY_SELECTED_KEY);
           
            return mapping.findForward("validationTest");
View Full Code Here


        TestConfig testConfig = new TestConfig();
        testConfig.setName(newName);
        testConfig.setPlugIn(plugIn);
        testConfig.setArgs(new HashMap());
       
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        suiteConfig.addTest(testConfig);
        getApplicationState().notifyConfigChanged();
       
        request.getSession().setAttribute(TestConfig.CURRENTLY_SELECTED_KEY, testConfig);
       
        return mapping.findForward("validationTestEditor");           
View Full Code Here

        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
       
        if (edit.equals(buttonAction)) {
            TestSuiteConfig suiteConfig = (TestSuiteConfig) validationConfig.getTestSuites().get(selectedTestSuite);

            request.getSession().setAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY, suiteConfig);
           
            return mapping.findForward("validationTest");           
        } else if (delete.equals(buttonAction)) {
View Full Code Here

    }
   
    public SortedSet getTests() {
        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        return new TreeSet(suiteConfig.getTests().keySet());
    }
View Full Code Here

        }
    } else {
     
        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        Map plugins = new HashMap();
        Map testSuites = new HashMap();
        validationConfig.toDTO(plugins,testSuites); // return by ref.
        TestValidationResults results = new TestValidationResults();
        try {
View Full Code Here

       
        ValidationTestSuiteNewForm form = (ValidationTestSuiteNewForm) incomingForm;
       
        String newName = form.getNewName();
       
        TestSuiteConfig suiteConfig = new TestSuiteConfig();
        suiteConfig.setName(newName);

        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        validationConfig.addTestSuite(suiteConfig);
       
View Full Code Here

        List attributeKeys = form.getAttributeKeys();
        List attributeValues = form.getAttributeValues();
      
        ServletContext context = getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        TestConfig testConfig = (TestConfig) request.getSession().getAttribute(TestConfig.CURRENTLY_SELECTED_KEY);
       
        //this allows renaming. If they change the test's name, we just remove it add a new one
        suiteConfig.removeTest(testConfig.getName());
       
        testConfig.setName(name);
        testConfig.setDescription(description);
       
        for (int i = 0; i < attributeKeys.size(); i++) {
            System.out.println((String) attributeKeys.get(i)+"="+ (String) attributeValues.get(i));
            System.out.println(testConfig.getArgs());
            String val = (String) attributeValues.get(i);
            if(val != null && val != "")
              testConfig.setArgStringValue((String) attributeKeys.get(i), val);
        }
      
        suiteConfig.addTest(testConfig);
        getApplicationState().notifyConfigChanged();
       
        request.getSession().removeAttribute(TestConfig.CURRENTLY_SELECTED_KEY);
       
        return mapping.findForward("validationTest");
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.config.validation.TestSuiteConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.