return SUCCESS;
}
private synchronized OpenSearchDirectory getOpenSearchDirectory() {
if (openSearchDirectory == null) {
GnizrConfiguration c = getGnizrConfiguration();
if (c == null) {
logger.error("Missing GnizrConfiguration");
throw new RuntimeException("Missing GnizrConfiguration");
}
if (c.getOpenSearchServices() == null
|| !(c.getOpenSearchServices() instanceof List)) {
final String m = "OpenSearchServices variable is undefined in the GnizrConfiguraiton";
logger.error(m);
throw new RuntimeException(m);
}
openSearchDirectory = new OpenSearchDirectory(c
.getOpenSearchServices());
if (openSearchDirectory.getWebApplicationUrl() == null) {
String prefixUrl = getGnizrConfiguration()
.getWebApplicationUrl();
openSearchDirectory.setWebApplicationUrl(prefixUrl);