Package org.openrdf.http.webclient.server

Examples of org.openrdf.http.webclient.server.Server


  public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2)
    throws Exception
  {
    HttpSession session = request.getSession(true);
    NavigationModel navigationModel = (NavigationModel)session.getAttribute(NavigationModel.NAVIGATION_MODEL_KEY);
    Server server = (Server)session.getAttribute(SessionKeys.SERVER_KEY);
    RepositoryInfo repoInfo = (RepositoryInfo)session.getAttribute(SessionKeys.REPOSITORY_INFO_KEY);

    navigationModel.getGroup("server").getView("overview").setEnabled(server != null);
    navigationModel.getGroup("repository").setEnabled(server != null && repoInfo != null);
    navigationModel.getGroup("repository").getGroup("modify").setEnabled(repoInfo != null && repoInfo.isWritable());
View Full Code Here


    HTTPRepository repo = (HTTPRepository)session.getAttribute(SessionKeys.REPOSITORY_KEY);

    if (request.getRequestURI().endsWith("/repository/overview.view")) {
      String id = request.getParameter("id");
      if (id != null) {
        Server server = (Server)session.getAttribute(SessionKeys.SERVER_KEY);
        repo = (HTTPRepository)server.getRepositoryManager().getRepository(id);
        try {
          repo.initialize();
          repoInfo = server.getRepositoryManager().getRepositoryInfo(id);
        }
        catch (RepositoryException e) {
          session.setAttribute(SessionKeys.REPOSITORY_EXCEPTION_KEY, e);
        }
        session.setAttribute(SessionKeys.REPOSITORY_KEY, repo);
View Full Code Here

TOP

Related Classes of org.openrdf.http.webclient.server.Server

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.