ConfigurationManagerProxy.java :  » REST » tabulasoftmed » main » Java Open Source

Java Open Source » REST » tabulasoftmed 
tabulasoftmed » main » ConfigurationManagerProxy.java
package main;

import org.softmed.rest.admin.RESTConfigurationManager;
import org.softmed.rest.admin.file.FileManager;
import org.softmed.rest.admin.file.FileManagerProxy;

import restlet.description.convert.RESTConfigurationDescription;
import restlet.description.convert.RESTModuleDescription;


public class ConfigurationManagerProxy implements ConfigurationManager {

  RESTConfigurationManager configurationManager = new RESTConfigurationManager();

  public ConfigurationManagerProxy(FileManager fileManager) {
    configurationManager.setFileManager(fileManager);
  }

  @Override
  public RESTConfigurationDescription loadConfiguration(String path)
      throws Throwable {
    return configurationManager.loadConfigurationFile(path);
  }

  @Override
  public void saveConfiguration(RESTConfigurationDescription configuration,
      String path) throws Throwable {
    configurationManager.saveConfigurationFile(configuration, path);

  }

  @Override
  public RESTModuleDescription loadModule(String path) throws Throwable {
    return configurationManager.loadModule(path);
  }

  @Override
  public void saveModule(RESTModuleDescription module) throws Throwable {
    configurationManager.saveModule(module);

  }

  @Override
  public String getHandler(String path) throws Throwable {
    return configurationManager.loadHandler(path);
  }

  @Override
  public void saveHandler(String path, String code) throws Throwable {
    configurationManager.saveHandler(path, code);

  }

  public RESTConfigurationManager getConfigurationManager() {
    return configurationManager;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.