Пример #1
0
  /**
   * Returns a framework object for the specified environment name and version
   *
   * @param name name of framework to setup
   * @param version version of framework to setup. if null, will use default version
   * @return framework object for this framework
   */
  public Framework getFramework(String name, String version) {

    final String lowerName = name.toLowerCase();

    AE ae = _map.get(lowerName);

    if (ae == null) {
      throw new RuntimeException("Error : specified known framework not defined : " + name);
    }

    if (version == null || version.equals("")) {
      version = ae.getDefaultVersion();
    }

    final Env env = ae.getEnvironment(version);
    final String ver = version;

    return new Framework() {
      public void install(AppContext context) throws IOException {
        _setupContext(context, env, lowerName, ver);
      }
    };
  }