Package org.fao.geonet

Examples of org.fao.geonet.NodeInfo


        this.webappDir = webappDir;
        if (_applicationContext == null) {
            this.nodeId = "srv";
            this.isDefaultNode = true;
        } else {
            final NodeInfo nodeInfo = _applicationContext.getBean(NodeInfo.class);
            this.isDefaultNode = nodeInfo.isDefaultNode();
            this.nodeId = nodeInfo.getId();
        }
    setDataDirectory(jeevesServlet, webappName, webappDir, handlerConfig);
  }
View Full Code Here


    @Override
    public void sendRedirect(HttpServletRequest request, HttpServletResponse response, String url) throws IOException {
        final ConfigurableApplicationContext applicationContext = getApplicationContextFromServletContext(context);

        NodeInfo nodeInfo = applicationContext.getBean(NodeInfo.class);

        String newUrl = url.replace("@@nodeId@@", nodeInfo.getId());

        super.sendRedirect(request, response, newUrl);
    }
View Full Code Here

    @Override
    protected String buildRedirectUrlToLoginPage(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {
        final ConfigurableApplicationContext applicationContext = getApplicationContextFromServletContext(context);

        NodeInfo nodeInfo = applicationContext.getBean(NodeInfo.class);

        final String baseUrl = super.buildRedirectUrlToLoginPage(request, response, authException);
        String newUrl = baseUrl.replace("@@nodeId@@", nodeInfo.getId());

        return newUrl;
    }
View Full Code Here

    @Override
    protected String determineTargetUrl(HttpServletRequest request, HttpServletResponse response) {
        final ConfigurableApplicationContext applicationContext = getApplicationContextFromServletContext(context);

        NodeInfo nodeInfo = applicationContext.getBean(NodeInfo.class);

        String urlPattern = super.determineTargetUrl(request, response);

        return urlPattern.replace("@@nodeId@@", nodeInfo.getId());
    }
View Full Code Here

            jeevesAppContext.getBeansOfType(JpaRepository.class, false, true);

            servletContext.setAttribute(User.NODE_APPLICATION_CONTEXT_KEY + nodeId, jeevesAppContext);

            // check if the context is the default context
            NodeInfo nodeInfo = jeevesAppContext.getBean(NodeInfo.class);
            nodeInfo.setId(nodeId);

            boolean isDefault = nodeInfo.isDefaultNode();

            if (isDefault) {
                if (defaultContext != null) {
                    throw new IllegalArgumentException("Two nodes where defined as the default.  This is not acceptable.");
                }
View Full Code Here

TOP

Related Classes of org.fao.geonet.NodeInfo

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.