Package org.geoserver.security

Examples of org.geoserver.security.PropertyFileWatcher


   * If no user information is found, a default user will be created.
   */
  public EditableUserDAO(){
    myDetailStorage = new HashMap();
    try {
      myWatcher = new PropertyFileWatcher(getUserFile());
    } catch (Exception e){
      // TODO:log error someplace
      createDefaultUser();
    }

View Full Code Here


    PropertyFileWatcher configFile;

    long timeout = -1;

    public DefaultControlFlowConfigurator() {
        configFile = new PropertyFileWatcher(new File(GeoserverDataDirectory
                .getGeoserverDataDirectory(), "controlflow.properties"));
    }
View Full Code Here

     * Prepares the proxy's environment.
     */
    private void init()
    {
        try{
            configWatcher = new PropertyFileWatcher(ProxyConfig.getConfigFile());
            watcherWorks = true;
            LOGGER.log(Level.INFO, "Proxy init'd pretty much ok.");
        }
        catch(Exception e){
            LOGGER.log(Level.WARNING, "Proxy could not create configuration watcher.  Proxy will not be able to update its configuration when it is modified.  Exception:", e);
View Full Code Here

        if (f == null) {
            f = loader.createFile("monitoring", "monitor.properties");
            loader.copyFromClassPath("monitor.properties", f, MonitorConfig.class);
        }
       
        fw = new PropertyFileWatcher(f);
    }
View Full Code Here

                   
                    if (!layers.exists()) {
                        this.rules = new TreeSet<R>();
                    } else {
                        // ok, something is there, let's load it
                        watcher = new PropertyFileWatcher(layers);
                        loadRules(watcher.getProperties());
                    }
                }
                lastModified = System.currentTimeMillis();
            } else if (isModified()) {   
View Full Code Here

        temp.mkdir();
        try {
            dao.securityDir = temp;
            dao.storeUsers();
            File propFile = new File(temp, "users.properties");
            dao.userDefinitionsFile = new PropertyFileWatcher(propFile);
            dao.userMap.clear();
            dao.loadUserMap();
        } finally {
            temp.delete();
        }
View Full Code Here

                        while ((count = is.read(buffer)) > 0) {
                            os.write(buffer, 0, count);
                        }
                    }

                    userDefinitionsFile = new PropertyFileWatcher(propFile);
                }

                userMap = loadUsersFromProperties(userDefinitionsFile.getProperties());
            } catch (Exception e) {
                LOGGER.log(Level.SEVERE, "An error occurred loading user definitions", e);
View Full Code Here

   * If no user information is found, a default user will be created.
   */
  public EditableUserDAO(){
    myDetailStorage = new HashMap();
    try {
      myWatcher = new PropertyFileWatcher(getUserFile());
    } catch (Exception e){
      // TODO:log error someplace
      createDefaultUser();
    }

View Full Code Here

    /** Default watches controlflow.properties */
    public DefaultControlFlowConfigurator() {
        GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
        Resource controlflow = loader.get(PROPERTYFILENAME);
        configFile = new PropertyFileWatcher(controlflow);       
    }
View Full Code Here

     */
    public IpBlacklistFilter() {
        try {
            GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
            Resource resource = loader.get(PROPERTYFILENAME);
            configFile = new PropertyFileWatcher(resource);
            blackListedAddresses = reloadConfiguration(BLPROPERTY);
            whiteListedAddresses = reloadConfiguration(WLPROPERTY);
        } catch (Exception e) {
            LOGGER.log(Level.FINER, e.getMessage(), e);
            throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.geoserver.security.PropertyFileWatcher

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.