Package org.corrib.jonto.beans

Examples of org.corrib.jonto.beans.SmartProperties


  /**
   * Initiatiates recommendations templates
   */
  protected RecommendationTemplates() {
    String s3bConfiguration = System.getProperty("org.corrib.s3b.recommendations.configuration");
    SmartProperties prop = null;
   
    if(s3bConfiguration == null)
      prop = new SmartProperties("org.corrib.s3b.recommendations.configuration", RecommendationTemplates.class);
    else
      prop = new SmartProperties(new File(s3bConfiguration));
   
    Map<String, String>[] amConfig = prop.getAsMap("recommendation_plugin", "id", "type", "value", "property", "prefix", "query", "postprocess");
   
    for(Map<String,String> config : amConfig) {
      RecommendationPlugin plugin = new GenericRecommendationPlugin(config.get("id"), config.get("type"),
                                      config.get("value"), config.get("property"),
                                      config.get("prefix"), config.get("query"),
                                      config.get("postprocess"));
     
      plugins.put(config.get("id"), plugin);
    }
   
    plugins.put("overall", new OverallRecommendationPlugin("overall"));
   
    this.defaults = prop.getAsStringArray("recommendation_plugin.default");
    this.qsLabel = new QuerableString(prop.getProperty("recommendation_plugin.label_pattern"),
                      prop.getAsStringArray("recommendation_plugin.label_component"));
    this.qsComment = new QuerableString(prop.getProperty("recommendation_plugin.comment_pattern"),
          prop.getAsStringArray("recommendation_plugin.comment_component"));
    this.qsCover = new QuerableString(prop.getProperty("recommendation_plugin.cover_pattern"),
          prop.getAsStringArray("recommendation_plugin.cover_component"));
   
  }
View Full Code Here

TOP

Related Classes of org.corrib.jonto.beans.SmartProperties

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.