Package com.gentics.cr

Examples of com.gentics.cr.CRConfigFileLoader


  @Override
  public void init(final ServletConfig config) throws ServletException {

    super.init(config);
    String servletName = config.getServletName();
    crConf = new CRConfigFileLoader(servletName, null);
    vtl = crConf.getTemplateManager();

    String templatepath = crConf.getString(VELOCITY_TEMPLATE_KEY);
    if (templatepath != null) {
      File f = new File(templatepath);
View Full Code Here


  protected void setUp() throws MalformedURLException, URISyntaxException, CRException {
    String confpath = new File(this.getClass().getResource("nodelog.properties").toURI()).getParentFile().toURI()
        .toURL().toString();
    System.setProperty(CRUtil.PORTALNODE_CONFPATH, confpath);
    config = new CRConfigFileLoader("json", this.getClass().getResource(".").toString());
    requestProcessor = config.getNewRequestProcessorInstance(1);
    request = new CRRequest();
  }
View Full Code Here

    requestProcessor = config.getNewRequestProcessorInstance(1);
    request = new CRRequest();
  }

  public void testObjectsFile() throws CRException {
    config = new CRConfigFileLoader("jsonfile", this.getClass().getResource(".").toString());
    requestProcessor = config.getNewRequestProcessorInstance(1);
    testGetObjects();
  }
View Full Code Here

    this.conf = config;
    String cxname = this.conf.getString(INDEXER_CONFIG_FILE_KEY);
    if (cxname == null) {
      cxname = "indexer";
    }
    CRConfigUtil idxConfig = new CRConfigFileLoader(cxname, null);

    String csname = this.conf.getString(SEARCH_CONFIG_FILE_KEY);
    if (csname == null) {
      csname = "searcher";
    }
    CRConfigUtil srcConfig = new CRConfigFileLoader(csname, null);

    idx = new IndexController(idxConfig);
    try {
      rp = srcConfig.getNewRequestProcessorInstance(1);
    } catch (CRException e) {
      log.error("Could not initialize searcher request processor." + "Check your searcher config.", e);
    }
  }
View Full Code Here

   * @return Configuration as <code>CRConfigFileLoader</code>
   */
  public static CRConfigFileLoader getConfig(final String key, final String webapproot, final String subdir) {
    assertStaticAttributesInitialized();

    CRConfigFileLoader config = configmap.get(key);
    if (config == null) {
      log.debug("Config not found, will create new config instance.");
      CRConfigFileLoader newConfig
        = new CRConfigFileLoader(key, webapproot, subdir);
      if (newConfig != null) {
        config = configmap.putIfAbsent(key, newConfig);
        if (config == null) {
          config = newConfig;
        }
View Full Code Here

   * Create new instance of IndexController.
   * This constructor will read the config file with this name
   * @param name of the config file
   */
  private IndexController(final String name) {
    crconfig = new CRConfigFileLoader(name, null);
    MonitorFactory.init(crconfig);
    this.indextable = buildIndexTable();
  }
View Full Code Here

TOP

Related Classes of com.gentics.cr.CRConfigFileLoader

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.