Package com.britesnow.snow.web

Examples of com.britesnow.snow.web.RequestContext


    @Override
    public void execute(Environment env, Map args, TemplateModel[] arg2, TemplateDirectiveBody arg3)
                            throws TemplateException, IOException {

        String path = getParam(args,"name",String.class);
        RequestContext rc = getDataModel("_r.rc", RequestContext.class);
       
        String resourcePath = resourcePathResolver.resolve(path, rc);
       
        String templateName = templateNameResolver.resolve(resourcePath,rc);
       
View Full Code Here


    }
   
    @Override
    public Object exec(List args) throws TemplateModelException {
        // old way: resourcePath = FreemarkerUtil.getDataModel("_r.pathInfo",String.class);
        RequestContext rc = FreemarkerUtil.getDataModel("_r.rc",RequestContext.class);
        String resourcePath = rc.getResourcePath();
       
        String pathInfoMatch = FreemarkerUtil.getParamAs(args.get(0),String.class);
       
        /*--------- Get the eventual true/false values ---------*/
        String trueValue = null;
View Full Code Here

   
   
    @Override
    public Object exec(List args) throws TemplateModelException {
       
        RequestContext rc = getDataModel("_r.rc", RequestContext.class);
       
        rc.setAttribute(FREEMARKER_METHOD_ARGUMENTS,args);
        Object result = null;
        try{
            result = methodInvoker.invokeWebHandler(ref, rc);
        }catch(Exception e){
            logger.error(e.getMessage());
        }finally{
            rc.removeAttribute(FREEMARKER_METHOD_ARGUMENTS);
        }
       
        // TODO Auto-generated method stub
        return result;
    }
View Full Code Here

   
    @Override
    public void execute(Environment env, Map args, TemplateModel[] tms, TemplateDirectiveBody body)
                            throws TemplateException, IOException {

        RequestContext rc = getDataModel("_r.rc", RequestContext.class);
       
        Boolean debug_links = rc.getParamAs(WebBundleManager.DEBUG_LINK_STRING, Boolean.class, null);
        //if not null, make sure we set the cookie with the value
        if (debug_links != null){
            rc.setCookie(WebBundleManager.DEBUG_LINK_STRING, debug_links);
        }
        //if there is not debug_link param in the URL, check the cookie (set false if not found)
        else{
            debug_links = rc.getCookie(WebBundleManager.DEBUG_LINK_STRING, Boolean.class, false);
        }
       
        String contextPath = rc.getContextPath();
       
       
        // [@webBundle folder="/css/" type="js" /]
        //get the param
        String path = getParam(args,"path",String.class);
View Full Code Here

   
    @Override
    public Object exec(List args) throws TemplateModelException {
        Map result = null;
        String path = getParamAs(args.get(0), String.class);
        RequestContext rc = getDataModel("_r.rc", RequestContext.class);
       
        if (path != null) {
           
            File jsonFile = pathFileResolver.locate(path,rc);
           
View Full Code Here

TOP

Related Classes of com.britesnow.snow.web.RequestContext

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.