Accept a logger argument
@@ -124,6 +124,17 @@ public class SearchBuilder {
return importString(str, null, new BaseDeployLogger());
}
+ /**
+ * Import search definition.
+ *
+ * @param str the string to parse.
+ * @return the name of the imported object.
+ * @throws ParseException thrown if the file does not contain a valid search definition.
+ */
+ public String importString(String str, DeployLogger logger) throws ParseException {
+ return importString(str, null, logger);
+ }
+
private String importString(String str, String searchDefDir, DeployLogger deployLogger) throws ParseException {
Search search;
SimpleCharStream stream = new SimpleCharStream(str);
@@ -205,6 +216,10 @@ public class SearchBuilder {
build(new BaseDeployLogger(), new QueryProfiles());
}
+ public void build(DeployLogger logger) {
+ build(logger, new QueryProfiles());
+ }
+
/**
* Processes and finalizes the imported search definitions so that they become available through the {@link
* #getSearch(String)} method.
