public String[] getLockTokens() { List<String> allTokens = new ArrayList<String>(tokens); for (Session session : sessions.values()) { String[] tokens = session.getLockTokens(); for (String token : tokens) { if (!allTokens.contains(token)) { allTokens.add(token); } } } return allTokens.toArray(new String[allTokens.size()]); }
private Privilege[] getPrivilegesLegacy(String absPath) throws PathNotFoundException, RepositoryException { List<Privilege> l = new ArrayList<Privilege>(); for (String s : getPrivilegesNamesLegacy(absPath)) { Privilege privilege = registry.getPrivilege(s, null); if (privilege != null) { l.add(privilege); } } return l.toArray(new Privilege[l.size()]); }