this.indexReferences = new AsnIndexReferences();
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");