[Bedework-commit] bwcalfacade r51 -
releases/bedework-3.8/src/org/bedework/calfacade
svnadmin at bedework.org
svnadmin at bedework.org
Fri Apr 27 15:55:25 EDT 2012
Author: douglm
Date: 2012-04-27 15:55:24 -0400 (Fri, 27 Apr 2012)
New Revision: 51
Modified:
releases/bedework-3.8/src/org/bedework/calfacade/BwSystem.java
Log:
Allow enabling of solr as public events indexer.
Requires the jboss data directory to be set up correctly and an appropriately configured solr to be deployed.
Modified: releases/bedework-3.8/src/org/bedework/calfacade/BwSystem.java
===================================================================
--- releases/bedework-3.8/src/org/bedework/calfacade/BwSystem.java 2012-04-27 19:55:22 UTC (rev 50)
+++ releases/bedework-3.8/src/org/bedework/calfacade/BwSystem.java 2012-04-27 19:55:24 UTC (rev 51)
@@ -94,6 +94,14 @@
private String rootUsers;
+ private static final QName useSolrPname = new QName(null, "use-solr");
+
+ private static final String solrURLPname = "solr-url";
+
+ private static final String solrCoreAdminPname = "solr-core-admin";
+
+ private static final String solrDefaultCorePname = "solr-default-core";
+
private Set<BwProperty> properties;
/** Set the system's name
@@ -903,6 +911,74 @@
return getIntProperty(BedeworkServerTags.maxAttendees, 100);
}
+ /** Set the use solr flag
+ *
+ * @param val
+ */
+ public void setUseSolr(final Boolean val) {
+ setBooleanProperty(useSolrPname, val);
+ }
+
+ /** Get the use solr flag
+ *
+ * @return flag
+ */
+ @NoDump
+ public boolean getUseSolr() {
+ return getBooleanProperty(useSolrPname, false);
+ }
+
+ /** Set the solr url
+ *
+ * @param val
+ */
+ public void setSolrURL(final String val) {
+ setProperty(solrURLPname, val);
+ }
+
+ /** Get the solr url
+ *
+ * @return flag
+ */
+ @NoDump
+ public String getSolrURL() {
+ return getProperty(solrURLPname);
+ }
+
+ /** Set the solr root
+ *
+ * @param val
+ */
+ public void setSolrCoreAdmin(final String val) {
+ setProperty(solrCoreAdminPname, val);
+ }
+
+ /** Get the solr Root
+ *
+ * @return Root
+ */
+ @NoDump
+ public String getSolrCoreAdmin() {
+ return getProperty(solrCoreAdminPname);
+ }
+
+ /** Set the solr DefaultCore
+ *
+ * @param val
+ */
+ public void setSolrDefaultCore(final String val) {
+ setProperty(solrDefaultCorePname, val);
+ }
+
+ /** Get the solr DefaultCore
+ *
+ * @return DefaultCore
+ */
+ @NoDump
+ public String getSolrDefaultCore() {
+ return getProperty(solrDefaultCorePname);
+ }
+
/* ====================================================================
* Object methods
* ==================================================================== */
@@ -1057,6 +1133,25 @@
return clone;
}
+ private void setBooleanProperty(final QName pname, final boolean val) {
+ setProperty(pname.getLocalPart(),
+ String.valueOf(val));
+ }
+
+ private boolean getBooleanProperty(final QName pname,
+ final Boolean defaultVal) {
+ String val = getProperty(pname.getLocalPart());
+
+ if (val == null) {
+ if (defaultVal == null) {
+ return false;
+ }
+ return defaultVal;
+ }
+
+ return Boolean.valueOf(val);
+ }
+
private void setIntProperty(final QName pname, final int val) {
setProperty(pname.getLocalPart(),
String.valueOf(val));
More information about the Bedework-commit
mailing list