Package info.aduna.webapp.navigation

Examples of info.aduna.webapp.navigation.NavigationModel


  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());
    navigationModel.getGroup("repository").getGroup("query").setEnabled(repoInfo != null && repoInfo.isReadable());
    navigationModel.getGroup("repository").getGroup("explore").setEnabled(repoInfo != null && repoInfo.isReadable());
    navigationModel.getGroup("repository").getGroup("extract").setEnabled(repoInfo != null && repoInfo.isReadable());

    return true;
  }
View Full Code Here

TOP

Related Classes of info.aduna.webapp.navigation.NavigationModel

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.