Package com.gentics.cr.configuration

Examples of com.gentics.cr.configuration.GenericConfiguration


    try {
      ensureTemplateManager();
      loadTemplate();
      templateManager.put("resolvables", this.resolvableColl);
      putObjectsIntoTemplateManager(this.getAdditionalDeployableObjects());
      GenericConfiguration variables = (GenericConfiguration) config.get(VARIABLES_KEY);
      if (variables != null) {
        putObjectsIntoTemplateManager(variables.getProperties());
      }
      String encoding = this.getResponseEncoding();
      templateManager.put("encoding", encoding);
      templateManager.put("tools", tools);
      String output = templateManager.render(template.getKey(), template.getSource());
View Full Code Here


    InputStream stream = PPTContentTransformerTest.class.getResourceAsStream("testdoc.ppt");
    byte[] arr = IOUtils.toByteArray(stream);
    bean.set("binarycontent", arr);

    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");
  }
View Full Code Here

    InputStream stream = PDFContentTransformerTest.class.getResourceAsStream("testdoc.pdf");
    byte[] arr = IOUtils.toByteArray(stream);
    bean.set("binarycontent", arr);

    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");
  }
View Full Code Here

   */
  @Deprecated
  private boolean useAutocompleteIndexExtension = false;

  public Autocompleter(CRConfig config) {
    GenericConfiguration srcConf = (GenericConfiguration) config.get(SOURCE_INDEX_KEY);
    GenericConfiguration autoConf = (GenericConfiguration) config.get(AUTOCOMPLETE_INDEX_KEY);
    useAutocompleteIndexExtension = config.getBoolean(
      AUTOCOMPLETE_USE_AUTCOMPLETE_INDEXER,
      useAutocompleteIndexExtension);

    source = null;
View Full Code Here

    InputStream stream = XLSXContentTransformerTest.class.getResourceAsStream("testdoc.xlsx");
    byte[] arr = IOUtils.toByteArray(stream);
    bean.set("binarycontent", arr);

    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");

  }
View Full Code Here

public class CustomPatternAnalyzerTest {
 
  @Test
  public void testLowercaseFalse() throws IOException {
    GenericConfiguration config = new GenericConfiguration();
    config.set("pattern", "\\s+");
    config.set("lowercase", "false");
    CustomPatternAnalyzer a = new CustomPatternAnalyzer(config);
   
    TokenStream tokenStream = a.tokenStream("test", "this is a Text with Whitespaces");
    CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);
View Full Code Here

   
  }
 
  @Test
  public void testLowercaseTrue() throws IOException {
    GenericConfiguration config = new GenericConfiguration();
    config.set("pattern", "\\s+");
    config.set("lowercase", "true");
    CustomPatternAnalyzer a = new CustomPatternAnalyzer(config);
   
    TokenStream tokenStream = a.tokenStream("test", "this is a Text with Whitespaces");
    CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);
View Full Code Here

   
  }
 
  @Test
  public void testDefaultLowercaseSetting() throws IOException {
    GenericConfiguration config = new GenericConfiguration();
    config.set("pattern", "\\s+");
    CustomPatternAnalyzer a = new CustomPatternAnalyzer(config);
   
    TokenStream tokenStream = a.tokenStream("test", "this is a Text with Whitespaces");
    CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);
View Full Code Here

    InputStream stream = DOCContentTransformerTest.class.getResourceAsStream("testdoc.doc");
    byte[] arr = IOUtils.toByteArray(stream);
    bean.set("binarycontent", arr);

    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");
  }
View Full Code Here

    InputStream stream = XLSContentTransformerTest.class.getResourceAsStream("testdoc.xls");
    byte[] arr = IOUtils.toByteArray(stream);
    bean.set("binarycontent", arr);

    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");

  }
View Full Code Here

TOP

Related Classes of com.gentics.cr.configuration.GenericConfiguration

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.