Package railo.runtime

Examples of railo.runtime.PageSourceImpl


  public static long getCompileTime(PageContext pc, PageSource ps) throws PageException {
    return getPage(pc,ps).getCompileTime();
  }

  public static Page getPage(PageContext pc, PageSource ps) throws PageException {
    PageSourceImpl psi = (PageSourceImpl)ps;
   
    Page p = psi.getPage();
    if(p!=null){
      //print.o("getPage(existing):"+ps.getDisplayPath()+":"+psi.hashCode()+":"+p.hashCode());
      return p;
    }
    pc=ThreadLocalPageContext.get(pc);
    return psi.loadPage(pc);
  }
View Full Code Here


                    //print.ln(files[i]+" - "+p);
                    doCompileFile(mapping,files[i],p,errors);
                }
            }
            else if(file.isFile()) {
                PageSourceImpl ps=(PageSourceImpl) mapping.getPageSource(path);
               
               
                try {
                 
                    ps.clear();
                    ps.loadPage(pageContext);
                    //pageContext.compile(ps);
                } catch (PageException pe) {
                  //PageException pe = pse.getPageException();
                   
                    String template=ps.getDisplayPath();
                    StringBuilder msg=new StringBuilder(pe.getMessage());
                    msg.append(", Error Occurred in File [");
                    msg.append(template);
                    if(pe instanceof PageExceptionImpl) {
                      try{
View Full Code Here

    String key=isweb?name.getString()+config.getId():name.getString();
      UDF udf=config.getFromFunctionCache(key);
    if(udf!=null) return udf;
   
    Mapping mapping=isweb?config.getFunctionMapping():config.getServerFunctionMapping();
      PageSourceImpl ps = (PageSourceImpl) mapping.getPageSource(filename);
      Page p = ps.loadPage(pc)
   
     
      // execute page
      Variables old = pc.variablesScope();
      pc.setVariablesScope(VAR);
View Full Code Here

  }

  private static Array toArray(Array arr, PageSourcePool psp) throws PageException {
    Object[] keys = psp.keys();
   
    PageSourceImpl ps;
    for(int y=0;y<keys.length;y++)  {
      ps = (PageSourceImpl) psp.getPageSource(keys[y], false);
      if(ps.isLoad())
        arr.append(ps.getDisplayPath());
    }
    return arr;
  }
View Full Code Here

  private static long[] templateCacheElements(Mapping[] mappings) {
    long elements=0,size=0;
   
    PageSourcePool psp;
    Object[] keys;
    PageSourceImpl ps;
    Resource res;
    MappingImpl mapping;
    for(int i=0;i<mappings.length;i++){
      mapping=(MappingImpl)mappings[i];
      psp = mapping.getPageSourcePool();
      keys = psp.keys();
      for(int y=0;y<keys.length;y++)  {
        ps = (PageSourceImpl) psp.getPageSource(keys[y], false);
        if(ps.isLoad()) {
          elements++;
          res=mapping.getClassRootDirectory().getRealResource(ps.getJavaName()+".class");
          size+=res.length();
        }
      }
    }
    return new long[]{elements,size};
View Full Code Here

TOP

Related Classes of railo.runtime.PageSourceImpl

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.