Package org.vfny.geoserver.config

Examples of org.vfny.geoserver.config.GlobalConfig


  private String logLocation;
  
    public void reset(ActionMapping arg0, HttpServletRequest request) {
        super.reset(arg0, request);
      
        GlobalConfig globalConfig = (GlobalConfig) getServlet().getServletContext().getAttribute(GlobalConfig.CONFIG_KEY);

        maxFeatures = globalConfig.getMaxFeatures();
        verbose = globalConfig.isVerbose();
        verboseExceptions = globalConfig.isVerboseExceptions();
        verboseChecked = false;
        verboseExceptionsChecked = false;
        numDecimals = globalConfig.getNumDecimals();
        charset = globalConfig.getCharSet().name();
        baseURL = globalConfig.getBaseUrl();
        schemaBaseURL = globalConfig.getSchemaBaseUrl();
        adminUserName = globalConfig.getAdminUserName();
    adminPassword = globalConfig.getAdminPassword();
        if (globalConfig.getLoggingLevel() == null) {
            //@TODO - shouldn't have to do this.. should never return null
          loggingLevel = Level.OFF.getName();  
        } else {
          loggingLevel = globalConfig.getLoggingLevel().getName();
        }
        loggingToFile = globalConfig.getLoggingToFile();
        loggingToFileChecked = false;
        logLocation = globalConfig.getLogLocation();
       
        ContactConfig contactConfig = globalConfig.getContact();
        contactPerson = contactConfig.getContactPerson();
        contactOrganization = contactConfig.getContactOrganization();
        contactPosition = contactConfig.getContactPosition();
       
        addressType = contactConfig.getAddressType();
View Full Code Here


          saveErrors(request, errors);
          return mapping.findForward("config.server");
      }
    }
   
    GlobalConfig globalConfig = getGlobalConfig();
        globalConfig.setMaxFeatures(maxFeatures);
        globalConfig.setVerbose(verbose);
        globalConfig.setNumDecimals(numDecimals);
        globalConfig.setBaseUrl(baseURL);
        globalConfig.setSchemaBaseUrl(schemaBaseURL);
        globalConfig.setCharSet(charset);
        globalConfig.setAdminUserName(adminUserName);
        globalConfig.setAdminPassword(adminPassword);
        globalConfig.setLoggingLevel(loggingLevel);
        globalConfig.setLoggingToFile(loggingToFile);
        globalConfig.setLogLocation(logLocation);
        globalConfig.setVerboseExceptions(verboseExceptions);
       
        ContactConfig contactConfig = globalConfig.getContact();
        contactConfig.setContactPerson( form.getContactPerson() );
        contactConfig.setContactOrganization( form.getContactOrganization() );
        contactConfig.setContactPosition( form.getContactPosition() );
        contactConfig.setAddressType( form.getAddressType() );
        contactConfig.setAddress( form.getAddress() );
        contactConfig.setAddressCity( form.getAddressCity() );
        contactConfig.setAddressCountry( form.getAddressCountry() );
        contactConfig.setAddressPostalCode( form.getAddressPostalCode() );
        contactConfig.setAddressState( form.getAddressState() );
        contactConfig.setContactVoice( form.getContactVoice() );
        contactConfig.setContactFacsimile( form.getContactFacsimile() );
        contactConfig.setContactEmail( form.getContactEmail() );
        globalConfig.setContact(contactConfig);
        getApplicationState().notifyConfigChanged();
       
       
        getServlet().getServletContext().setAttribute(GlobalConfig.CONFIG_KEY, globalConfig);
       
View Full Code Here

        LoginForm loginForm = (LoginForm) form;
        String username = loginForm.getUsername();
        String password = loginForm.getPassword();
        String confirm = loginForm.getConfirm();

        GlobalConfig global = (GlobalConfig) getServlet().getServletContext()
                                                 .getAttribute(GlobalConfig.CONFIG_KEY);
        //Failed experiment, this stuff should really go in a validate method,
        //I think this is showing the weakness of both edit and non using Login
  //Form, instead of a LoginEditForm.
  /*if (confirm == null || !confirm.equals(password)){
      ActionErrors errors = new ActionErrors();
      errors.add(ActionErrors.GLOBAL_ERROR,
           new ActionError("error.password.mismatch"));
      saveErrors(request, errors);
      return mapping.getInputForward();//findForward("config.loginEditSubmit");
      }*/
        global.setAdminUserName(username);
        global.setAdminPassword(password);
    getApplicationState().notifyConfigChanged();
    getServlet().getServletContext().setAttribute(GlobalConfig.CONFIG_KEY, global);
        String forward = (String) request.getAttribute("forward");

        if (forward == null) {
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.config.GlobalConfig

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.