public static UserList getUserList() throws SearchLibException { usersLock.r.lock(); try { if (userList == null) { File userFile = new File(StartStopListener.OPENSEARCHSERVER_DATA_FILE, "users.xml"); if (userFile.exists()) { XPathParser xpp = new XPathParser(userFile); userList = UserList.fromXml(xpp, xpp.getNode("/" + UserList.usersElement)); } else userList = new UserList(); } return userList; } catch (ParserConfigurationException e) { throw new SearchLibException(e); } catch (SAXException e) { throw new SearchLibException(e); } catch (IOException e) { throw new SearchLibException(e); } catch (XPathExpressionException e) { throw new SearchLibException(e); } finally { usersLock.r.unlock(); } }
public Boolean evalBoolean(String expression) { return xpathParser.evalBoolean(node, expression); }
public String evalString(String expression) { return xpathParser.evalString(node, expression); }
public XNode evalNode(String expression) { return xpathParser.evalNode(node, expression); }
public List<XNode> evalNodes(String expression) { return xpathParser.evalNodes(node, expression); }
public Double evalDouble(String expression) { return xpathParser.evalDouble(node, expression); }