Examples of CRConfigUtil


Examples of com.gentics.cr.CRConfigUtil

    super(config, callingLocation);
    this.config = config;
    this.callingIndexLocation = callingLocation;

    GenericConfiguration src_conf = (GenericConfiguration) config.get(SOURCE_INDEX_KEY);
    CRConfigUtil src_conf_util = new CRConfigUtil(src_conf, "SOURCE_INDEX_KEY");
    if (src_conf_util.getPropertySize() > 0) {
      source = LuceneIndexLocation.getIndexLocation(src_conf_util);
    }
    if (source == null) {
      source = (LuceneIndexLocation) callingLocation;
    }

    GenericConfiguration autoConf = (GenericConfiguration) config.get(AUTOCOMPLETE_INDEX_KEY);
    autocompleteLocation = LuceneIndexLocation
        .getIndexLocation(new CRConfigUtil(autoConf, AUTOCOMPLETE_INDEX_KEY));
    autocompleteLocation.registerDirectoriesSpecial();

    String s_autofield = config.getString(AUTOCOMPLETE_FIELD_KEY);
    reindexStrategy = initReindexStrategy(config);
    if (s_autofield != null)
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

  @Before
  public void setUp() throws Exception {
    URL confPath = new File(this.getClass().getResource("/config/nodelog.properties").toURI()).getParentFile().toURI().toURL();
    System.setProperty(CRUtil.PORTALNODE_CONFPATH, confPath.getPath());
    config = new CRConfigUtil();
    config.set("attribute", CONTENT_ATTRIBUTE);
  }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

      URL confPath2 = new File(this.getClass().getResource("testOrder.properties").toURI()).getParentFile().toURI().toURL();
      GenericConfigurationFileLoader.load(genericConf, confPath2.getPath()+"/testOrder.properties");
    } catch (IOException e) {
      e.printStackTrace();
    }
    CRConfigUtil config = new CRConfigUtil(genericConf, "Test");
 
    indexLocation = new DummyIndexLocation2(config);
    indexLocation.createAllCRIndexJobs();
    assertEquals(outContent.toString(),"Create Job: Test.AFILESBRANCHENKAERNTEN Create Job: Test.AFILESBRANCHENWIEN Create Job: Test.APAGESBRANCHENKAERNTEN Create Job: Test.APAGESBRANCHENWIEN Create Job: Test.FILES Create Job: Test.PAGES ");
  }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

   * {@inheritDoc}
   */
  public final String getProperty(final Matcher m) {
    String propertyFileName = m.group(1);
    String propertyName = m.group(2);
    CRConfigUtil config;
    try {
      config = getConfig(propertyFileName);
      return config.getString(propertyName);
    } catch (CRException e) {
      logger.error("Erro while getting configuration. Maybe you got" + " recursive property definitions.", e);
    }
    return null;
  }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

   * @return configuration with the specified name
   * @throws CRException if there was a recursion while loading the
   * configuration.
   */
  private CRConfigUtil getConfig(final String configName) throws CRException {
    CRConfigUtil config;
    if (configs.containsKey(configName)) {
      config = configs.get(configName);
    } else if (!initConfigs.contains(configName)) {
      initConfigs.add(configName);
      config = StaticConfigurationContainer.getConfig(configName, "");
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

      AUTOCOMPLETE_USE_AUTCOMPLETE_INDEXER,
      useAutocompleteIndexExtension);

    source = null;
    if (!useAutocompleteIndexExtension) {
      source = LuceneIndexLocation.getIndexLocation(new CRConfigUtil(srcConf, "SOURCE_INDEX_KEY"));
    }
    autocompleteLocation = LuceneIndexLocation
        .getIndexLocation(new CRConfigUtil(autoConf, AUTOCOMPLETE_INDEX_KEY));
    autocompleteLocation.registerDirectoriesSpecial();
    String s_autofield = config.getString(AUTOCOMPLETE_FIELD_KEY);

    if (!useAutocompleteIndexExtension) {
      reindexStrategy = initReindexStrategy(config);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

public class HTMLContentTransformerTest {

  @Test
  public void testContentAttribute() throws URISyntaxException, IOException, CRException {
    CRConfigUtil config = new CRConfigUtil();
    config.set(HTMLContentTransformer.TRANSFORMER_ATTRIBUTE_KEY, "content");

    CRResolvableBean bean = new CRResolvableBean();
    bean.set("contentid", "10007.1");
    bean.set("content", readFile("test.html").toString());
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

    assertEquals(readFile("testresult.html").toString(), bean.get("content"));
  }

  @Test
  public void testNameAttribute() throws CRException {
    CRConfigUtil config = new CRConfigUtil();
    config.set(HTMLContentTransformer.TRANSFORMER_ATTRIBUTE_KEY, "name");
    HTMLContentTransformer transformer = new HTMLContentTransformer(config);

    CRResolvableBean bean1 = new CRResolvableBean();
    bean1.set("contentid", "10007.1");
    bean1.set("name", "Fußball");
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

    assertEquals("das ist eine test überschrift", bean3.get("name"));
  }

  @Test
  public void testStrings() throws CRException {
    CRConfigUtil config = new CRConfigUtil();
    config.set(HTMLContentTransformer.TRANSFORMER_ATTRIBUTE_KEY, "name");
    HTMLContentTransformer transformer = new HTMLContentTransformer(config);

    CRResolvableBean bean = new CRResolvableBean();
    bean.set("name", "ASDF-lexikon\n\t\n\t\t\t<br class=\"aloha-end-br\"/>");
    transformer.processBean(bean);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.