Package org.impalaframework.web.integration

Examples of org.impalaframework.web.integration.PrefixTreeHolder


       
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
        Assert.notNull(servletContext, "servletContext cannot be null");
        Assert.notNull(prefixMap, "prefixes cannot be null");
       
        PrefixTreeHolder holder = getPrefixHolder();
       
        if (holder != null) {
            final String name = moduleDefinition.getName();
            Set<String> prefixKeys = prefixMap.keySet();
           
            for (String prefix : prefixKeys) {
                if (logger.isDebugEnabled())
                    logger.debug("Contributing to holder: " + ObjectUtils.identityToString(holder) + ": " + name + "-" + prefix);
               
                String servletPath = prefixMap.get(prefix);
                holder.add(name, prefix, servletPath);
            }
        }
    }
View Full Code Here


        }
    }

    public void destroy() throws Exception {

        PrefixTreeHolder holder = getPrefixHolder();
       
        if (holder != null) {
            final String name = moduleDefinition.getName();
            Set<String> prefixKeys = prefixMap.keySet();
           
            for (String prefix : prefixKeys) {
                holder.remove(name, prefix);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private PrefixTreeHolder getPrefixHolder() {
        PrefixTreeHolder holder = (PrefixTreeHolder) servletContext.getAttribute(UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY);
        if (holder == null) {
            logger.warn("No " + PrefixTreeHolder.class.getSimpleName() + " instance available in servlet context under key " + UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY);
        }
        return holder;
    }
View Full Code Here

        final HashMap<String, ContextAndServletPath> prefixMap = new HashMap<String, ContextAndServletPath>();
        prefixMap.put("/p1", new ContextAndServletPath(null, null));
        prefixMap.put("/p2", new ContextAndServletPath(null, "/p2path"));
        contributor.setPrefixMap(prefixMap);
       
        holder = new PrefixTreeHolder();       
    }
View Full Code Here

       
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
        Assert.notNull(servletContext, "servletContext cannot be null");
        Assert.notNull(prefixMap, "prefixes cannot be null");
       
        PrefixTreeHolder holder = getPrefixHolder();
       
        if (holder != null) {
            final String name = moduleDefinition.getName();
            Set<String> prefixKeys = prefixMap.keySet();
           
            for (String prefix : prefixKeys) {
                if (logger.isDebugEnabled())
                    logger.debug("Contributing to holder: " + ObjectUtils.identityToString(holder) + ": " + name + "-" + prefix);
               
                final ContextAndServletPath paths = prefixMap.get(prefix);
                String servletPath = paths.getServletPath();
                String contextPath = paths.getContextPath();
                holder.add(name, prefix, contextPath, servletPath);
            }
        }
    }
View Full Code Here

        }
    }

    public void destroy() throws Exception {

        PrefixTreeHolder holder = getPrefixHolder();
       
        if (holder != null) {
            final String name = moduleDefinition.getName();
            Set<String> prefixKeys = prefixMap.keySet();
           
            for (String prefix : prefixKeys) {
                holder.remove(name, prefix);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private PrefixTreeHolder getPrefixHolder() {
        PrefixTreeHolder holder = (PrefixTreeHolder) servletContext.getAttribute(UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY);
        if (holder == null) {
            logger.warn("No " + PrefixTreeHolder.class.getSimpleName() + " instance available in servlet context under key " + UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY);
        }
        return holder;
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.web.integration.PrefixTreeHolder

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.