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.";
msg += " Assertions will be disabled.";
LOGGER.warning(msg);
return;
}
this.areAssertionsEnabled = true;
// ratings
AsnIndexReference ratingIndexRef = this.makeIndexRef(catCfg,rootIndexRef,"rating");
if (ratingIndexRef.getEnabled()) {
indexRefs.add(ratingIndexRef);
this.configureRatings(catCfg,ratingIndexRef,ratingIndexRef.getName());
}
// comments
AsnIndexReference commentIndexRef = this.makeIndexRef(catCfg,rootIndexRef,"comment");
if (commentIndexRef.getEnabled()) {
indexRefs.add(commentIndexRef);
this.configureComments(catCfg,commentIndexRef,commentIndexRef.getName());
}
}