vars.put("global", global); // TODO: DEPRECATE
vars.put("pathToRoot", requestContext.getPathToRoot()); // TODO: DEPRECATE
String layout = DEFAULT_LAYOUT;
Explorer explorer = null;
final boolean hasExplorerName = !requestContext.getExplorerName().isEmpty();
try {
if (hasExplorerName) {
explorer = manager.getExplorer(requestContext.getExplorerName());
}
}
catch (Exception e) {
LOG.warn(e.getMessage());
}
if (explorer == null) {
if (hasExplorerName) {
throw new WebApplicationException(new RuntimeException("Invalid explorer"), Response.Status.NOT_FOUND);
} else {
explorer = EmptyExplorer.getInstance();
}
}
layout = explorer.getLayoutName();
vars.put("Explorer", explorer);
if (vars.containsKey("layout")) {
layout = (String) vars.get("layout");
}