Package com.esri.gpt.catalog.lucene

Examples of com.esri.gpt.catalog.lucene.LuceneConfig


    this.operations = new AsnOperations();
    AsnIndexReferences indexRefs = this.indexReferences;
    ApplicationConfiguration appCfg = ApplicationContext.getInstance().getConfiguration();
    CatalogConfiguration catCfg = appCfg.getCatalogConfiguration();
    StringAttributeMap catParams = catCfg.getParameters();
    LuceneConfig luceneCfg = catCfg.getLuceneConfig();
   
    // API operations
    AsnOperation op = new AsnOperation();
    op.setHandlerClass("com.esri.gpt.server.assertion.handler.AsnApiHandler");
    op.setSubject(new AsnSubject(AsnConstants.APP_URN_PREFIX));
    op.getSubject().setRequiresValuePart(false);
    op.setPredicate(new AsnPredicate(AsnConstants.APP_URN_PREFIX+":assertion:operations"));
    op.setAuthPolicy(new AsnAuthPolicy());
    op.getAuthPolicy().setAuthenticationRequired(false);
    op.getAuthPolicy().setQueryPrincipals(new AsnPrincipals());
    op.getAuthPolicy().getQueryPrincipals().add(AsnConstants.PRINCIPAL_ANY);
    this.operations.add(op);
   
    // root index reference
    String val = Val.chkStr(catParams.getValue("assertion.index.allowNonLocalResourceIds"));
    this.allowNonLocalResourceIds = val.equalsIgnoreCase("true");
    AsnIndexReference rootIndexRef = new AsnIndexReference();
    val = Val.chkStr(catParams.getValue("assertion.index.enabled"));
    rootIndexRef.setEnabled(!val.equalsIgnoreCase("false"));
    val = Val.chkStr(catParams.getValue("assertion.index.location"));
    rootIndexRef.setIndexLocation(val);
    rootIndexRef.setUseNativeFSLockFactory(luceneCfg.getUseNativeFSLockFactory());
    rootIndexRef.setWriteLockTimeout(luceneCfg.getWriteLockTimeout());
    if (!rootIndexRef.getEnabled()) {
      LOGGER.config("assertion.index.enabled=false");
      return;
    } else if (rootIndexRef.getIndexLocation().length() == 0) {
      String msg = "The configured assertion.index.location parameter is invalid.";
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.lucene.LuceneConfig

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.