Package railo.runtime

Examples of railo.runtime.PageContext


 
  public void run()  {
    execute(null);
  }
  public PageException execute(Config config)   {
    PageContext oldPc = ThreadLocalPageContext.get();
   
    Page p=page;
   
    if(parent!=null){
      pc=parent;
View Full Code Here


    FTPResourceClient client=null;
    try {
      provider.lock(this);
      client=provider.getClient(data);
     
      PageContext pc = ThreadLocalPageContext.get();
      Calendar c=JREDateTimeUtil.getThreadCalendar();
      if(pc!=null)c.setTimeZone(pc.getTimeZone());
      c.setTimeInMillis(time);
      FTPFile file = client.getFTPFile(this);
      if(file==null) return false;
      file.setTimestamp(c);
      client.unregisterFTPFile(this);
View Full Code Here

    Resource file = toResource(path);//resources.getResource(path);
    return new CompressResource(this,getCompress(file),"/",caseSensitive);
  }
 
  private Resource toResource(String path) {
    PageContext pc = ThreadLocalPageContext.get();
    if(pc!=null) {
      return ResourceUtil.toResourceNotExisting(ThreadLocalPageContext.get(), path,true);
    }
    return resources.getResource(path);
  }
View Full Code Here

    return provider.callbooleanRTE(null,cfc,"isFile",ZERO_ARGS);
  }

  @Override
  public long lastModified() {
    PageContext pc = ThreadLocalPageContext.get();
    try{
      DateTime date = Caster.toDate(provider.call(pc,cfc,"lastModified",ZERO_ARGS), true, pc.getTimeZone());
      return date.getTime();
    }
    catch(PageException pe){
      throw new PageRuntimeException(pe);
    }
View Full Code Here

    return provider.callResourceArrayRTE(null, cfc, "listResources", ZERO_ARGS);
  }

  @Override
  public boolean setLastModified(long time) {
    PageContext pc = ThreadLocalPageContext.get();
    return provider.callbooleanRTE(pc,cfc,"setLastModified",new Object[]{new DateTimeImpl(pc, time, false)});
  }
View Full Code Here

    return new S3Resource(s3,storage.toInt(),this,path,true);
  }

 
  public static String loadWithNewPattern(S3 s3,RefInteger storage, String path) {
    PageContext pc = ThreadLocalPageContext.get();
    Properties prop=null;
    if(pc!=null){
      prop=pc.getApplicationContext().getS3();
    }
    if(prop==null) prop=new PropertiesImpl();
   
    int defaultLocation = prop.getDefaultLocation();
    storage.setValue(defaultLocation);
View Full Code Here

    throw new PageRuntimeException(new ServiceException("method [setQueryCache] is not supported for datasource service"));
  }

  @Override
  public void purgeQueryCache() throws IOException {
    PageContext pc = pc();
    if(pc!=null)pc.getQueryCache().clearUnused(pc);

  }
View Full Code Here


  public boolean verifyDatasource(String name) throws SQLException, SecurityException {
    checkReadAccess();
    railo.runtime.db.DataSource d = _getDatasource(name);
    PageContext pc = pc();
    DataSourceManager manager = pc.getDataSourceManager();
      try {
      manager.releaseConnection(pc,manager.getConnection(pc,name, d.getUsername(), d.getPassword()));
      return true;
    } catch (PageException e) {
      return false;
View Full Code Here

        return v;
    }

    private static Object toPojo(TypeMapping tm,Component comp, Class targetClass, Set<Object> done) throws PageException {

      PageContext pc = ThreadLocalPageContext.get();
     
      try {
        return _toPojo(pc, tm, comp,targetClass,done);
     
    }
View Full Code Here

  }

  public Connection getConnection(String user, String pass)
      throws SQLException {
    try {
      PageContext pc = ThreadLocalPageContext.get();
      return pc.getDataSourceManager().getConnection(pc,ds.getName(),user, pass).getConnection();
    } catch (PageException e) {
      throw new SQLException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of railo.runtime.PageContext

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.