public List<Repository> getRepositories(CMISServer server) { if (server == null) { throw new IllegalArgumentException("Server must be set!"); } return sessionFactory.getRepositories(new HashMap<String, String>(server.getParameters())); }
protected Session createSession(Map<String, String> parameters) { if (parameters.containsKey(SessionParameter.REPOSITORY_ID)) { return sessionFactory.createSession(new HashMap<String, String>(parameters)); } else { return sessionFactory .getRepositories(new HashMap<String, String>(parameters)) .get(0) .createSession(); } }