Package org.apache.roller.weblogger.ui.rendering

Examples of org.apache.roller.weblogger.ui.rendering.RequestMapper


        String userMappers = WebloggerConfig.getProperty("rendering.userRequestMappers");
       
        // instantiate user defined request mapper classes
        if(userMappers != null && userMappers.trim().length() > 0) {
           
            RequestMapper requestMapper = null;
            String[] uMappers = userMappers.split(",");
            for(int i=0; i < uMappers.length; i++) {
                try {
                    Class mapperClass = Class.forName(uMappers[i]);
                    requestMapper = (RequestMapper) mapperClass.newInstance();
                    requestMappers.add(requestMapper);
                } catch(ClassCastException cce) {
                    log.error("It appears that your mapper does not implement "+
                            "the RequestMapper interface", cce);
                } catch(Exception e) {
                    log.error("Unable to instantiate request mapper ["+uMappers[i]+"]", e);
                }
            }
        }
       
        // instantiate roller standard request mapper classes
        if(rollerMappers != null && rollerMappers.trim().length() > 0) {
           
            RequestMapper requestMapper = null;
            String[] rMappers = rollerMappers.split(",");
            for(int i=0; i < rMappers.length; i++) {
                try {
                    Class mapperClass = Class.forName(rMappers[i]);
                    requestMapper = (RequestMapper) mapperClass.newInstance();
View Full Code Here


        HttpServletResponse response = (HttpServletResponse) res;
       
        log.debug("entering");
       
        // give each mapper a chance to handle the request
        RequestMapper mapper = null;
        Iterator mappersIT = this.requestMappers.iterator();
        while(mappersIT.hasNext()) {
            mapper = (RequestMapper) mappersIT.next();
           
            log.debug("trying mapper "+mapper.getClass().getName());
           
            boolean wasHandled = mapper.handleRequest(request, response);
            if(wasHandled) {
                // if mapper has handled the request then we are done
                log.debug("request handled by "+mapper.getClass().getName());
                log.debug("exiting");
                return;
            }
        }
       
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.ui.rendering.RequestMapper

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.