Examples of CRConfigUtil


Examples of com.gentics.cr.CRConfigUtil

   * Create new Instance.
   * @param config
   */
  public LinkToPlinkTransformer(final GenericConfiguration config) {
    super(config);
    this.config = new CRConfigUtil(config, "link_to_plinktransformer");
    String attString = config.getString(ATTRIBUTE_KEY);
    if (attString != null) {
      this.attribute = attString;
    }
    staticprefix = this.config.getString(STATIC_PREFIX_KEY);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

  File directory;
 
  @Before
  public void prepare() throws IOException, URISyntaxException {
    prepareDirectory();
    CRConfigUtil config = new CRConfigUtil();
    config.set("directory", directory.getPath());
    //TODO add test for ignorePubDir false
    config.set("ignorePubDir", "false");
    //This is important if you delete the filter the test may delete your .class files.
    config.set("filter", ".*\\.file");
    config = prepareConfig(config);
    checker = new FileSystemUpdateChecker(config);
  }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

 

  @Test
  public void testUpdateFiles() throws CRException, FileNotFoundException, URISyntaxException {
    directory = new File(FileSystemUpdateJobTest.class.getResource("flatdirectory" + File.separator +  "outdated.file").toURI()).getParentFile();
    CRConfigUtil updateJobConfig = new CRConfigUtil();
    updateJobConfig.set("directory", directory.getPath());
    //TODO add test for ignorePubDir false
    updateJobConfig.set("ignorePubDir", "true");
    updateJobConfig.set("filter", ".*\\.file");
    config.setSubConfig("updatejob", updateJobConfig);
    CRConfigUtil requestProcessorConfig = new CRConfigUtil();
    requestProcessorConfig.set("rpclass", StaticObjectHolderRequestProcessor.class.getName());
    requestProcessorConfig.set("plinkcache", "false");
    requestProcessorConfig.set("crcontentcache", "false");
    CRConfigUtil requestProcessorsConfig = new CRConfigUtil();
    requestProcessorsConfig.setSubConfig("1", requestProcessorConfig);
    config.setSubConfig("rp", requestProcessorsConfig);
    config.set("updateattribute", "timestamp");
    configMap.put("test", config);
   
    indexLocation = DummyIndexLocationFactory.getDummyIndexLocation(config);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

  }

  @Test
  public void testUpdateFilesWithPubDir() throws URISyntaxException, FileNotFoundException, CRException {
    directory = new File(FileSystemUpdateJobTest.class.getResource("structureddirectory" + File.separator +  "outdated.file").toURI()).getParentFile();
    CRConfigUtil updateJobConfig = new CRConfigUtil();
    updateJobConfig.set("directory", directory.getPath());
    //TODO add test for ignorePubDir false
    updateJobConfig.set("ignorePubDir", "false");
    updateJobConfig.set("filter", ".*\\.file");
    config.setSubConfig("updatejob", updateJobConfig);
    CRConfigUtil requestProcessorConfig = new CRConfigUtil();
    requestProcessorConfig.set("rpclass", StaticObjectHolderRequestProcessor.class.getName());
    requestProcessorConfig.set("plinkcache", "false");
    requestProcessorConfig.set("crcontentcache", "false");
    CRConfigUtil requestProcessorsConfig = new CRConfigUtil();
    requestProcessorsConfig.setSubConfig("1", requestProcessorConfig);
    config.setSubConfig("rp", requestProcessorsConfig);
    config.set("updateattribute", "timestamp");
    configMap.put("test", config);
   
    indexLocation = DummyIndexLocationFactory.getDummyIndexLocation(config);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

    useDidyomeanIndexExtension = config.getBoolean(DIDYOUMEAN_USE_INDEX_EXTENSION, useDidyomeanIndexExtension);

    if (!useDidyomeanIndexExtension) {
      GenericConfiguration srcConf = (GenericConfiguration) config.get(SOURCE_INDEX_KEY);
      source = LuceneIndexLocation.createDirectory(new CRConfigUtil(srcConf, "SOURCE_INDEX_KEY"));
    }

    GenericConfiguration autoConf = (GenericConfiguration) config.get(DIDYOUMEAN_INDEX_KEY);
    CRConfigUtil dymConfUtil = new CRConfigUtil(autoConf, config.getName() + "." + DIDYOUMEAN_INDEX_KEY);
    didyoumeanLocation = LuceneIndexLocation.getIndexLocation(dymConfUtil);
    if (!useDidyomeanIndexExtension) {
      didyoumeanLocation.registerDirectoriesSpecial();
    }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

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

    GenericConfiguration srcConf = (GenericConfiguration) config.get(SOURCE_INDEX_KEY);
    CRConfigUtil srcConfUtil = new CRConfigUtil(srcConf, "SOURCE_INDEX_KEY");
    if (srcConfUtil.getPropertySize() > 0) {
      sourceLocation = LuceneIndexLocation.getIndexLocation(srcConfUtil);
    }
    if (sourceLocation == null) {
      sourceLocation = (LuceneIndexLocation) callingLocation;
    }

    GenericConfiguration didyouConf = (GenericConfiguration) config.get(DIDYOUMEAN_INDEX_KEY);
    didyoumeanLocation = LuceneIndexLocation.getIndexLocation(new CRConfigUtil(didyouConf, DIDYOUMEAN_INDEX_KEY));
    didyoumeanLocation.registerDirectoriesSpecial();

    didyoumeanfield = config.getString(DIDYOUMEAN_FIELD_KEY, didyoumeanfield);
    minDScore = config.getFloat(DIDYOUMEAN_MIN_DISTANCESCORE, (float) 0.0);
    minDFreq = config.getInteger(DIDYOUMEAN_MIN_DOCFREQ, 0);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

            String cr = request.getParameter("cr");
            if ("all".equalsIgnoreCase(cr)) {
              loc.createAllCRIndexJobs();
            } else {
              if (cr != null) {
                CRConfigUtil crc = map.get(cr);
                loc.createCRIndexJob(crc, map);
              }
            }
          }
          if ("addExtensionJob".equalsIgnoreCase(action)) {
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

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

    GenericConfiguration synonymConf = (GenericConfiguration) config.get(SYNONYM_INDEX_KEY);
    synonymLocation = LuceneIndexLocation.getIndexLocation(new CRConfigUtil(synonymConf, SYNONYM_INDEX_KEY));
    synonymLocation.registerDirectoriesSpecial();

    reindexStrategy = initReindexStrategy(config);

    subscribeToIndexFinished = config.getBoolean(SYNONYM_SUBSCRIBE_TO_INDEX_FINISHED, subscribeToIndexFinished);
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

      final String[] searchedAttributes, Analyzer analyzer, CRRequest crRequest) {
    super(version, searchedAttributes, analyzer, crRequest);
    this.config = pconfig;
    this.searchedAttributes = searchedAttributes;
    //get SubqueryParser if available
    this.childQueryParser = CRQueryParserFactory.getConfiguredParser(searchedAttributes, analyzer, crRequest, new CRConfigUtil(pconfig, "Subconfig"));
  }
View Full Code Here

Examples of com.gentics.cr.CRConfigUtil

   */
  public final String includeSynonyms(String query) throws IOException {
   
    GenericConfiguration autoConf = (GenericConfiguration) config.get("synonymlocation");
    LuceneIndexLocation synonymLocation = LuceneIndexLocation
        .getIndexLocation(new CRConfigUtil(autoConf, "synonymlocation"));
   
   
    IndexAccessor ia = synonymLocation.getAccessor();
    Searcher synonymSearcher = ia.getPrioritizedSearcher();
    IndexReader synonymReader = ia.getReader(false);
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.