Package railo.runtime.type.dt

Examples of railo.runtime.type.dt.DateTimeImpl


    ApplicationContext ac=pc.getApplicationContext();
    TimeSpan timespan=(getType()==SCOPE_CLIENT)?ac.getClientTimeout():ac.getSessionTimeout();
    Cookie cookie = pc.cookieScope();
   
   
    Date exp = new DateTimeImpl(pc,System.currentTimeMillis()+timespan.getMillis(),true);
    try {
      String ser=serializer.serializeStruct(sct, ignoreSet);
      if(hasChanges()){
        cookie.setCookie(KeyImpl.init(cookieName), ser,exp, false, "/", null);
      }
View Full Code Here


       
        // last visit
        str = (String)pc.cookieScope().get(cookieName+"_LV",null);
        if(!StringUtil.isEmpty(str)) {
          l=Caster.toLongValue(str,0);
          if(l>0)sct.setEL(LASTVISIT, new DateTimeImpl(pc,l,true));
        }
       
       
        if(type==SCOPE_CLIENT){
          // hit count
          str= (String)pc.cookieScope().get(cookieName+"_HC",null);
            if(!StringUtil.isEmpty(str)) sct.setEL(HITCOUNT, Caster.toDouble(str,null));
         
          // time created
          str = (String)pc.cookieScope().get(cookieName+"_TC",null);
          if(!StringUtil.isEmpty(str)) {
            l=Caster.toLongValue(str,0);
            if(l>0)sct.setEL(TIMECREATED, new DateTimeImpl(pc,l,true));
          }
        }
               
        ScopeContext.info(log,"load data from cookie for "+strType+" scope for "+pc.getApplicationContext().getName()+"/"+pc.getCFID());
        return sct;
View Full Code Here

    ignoreSet.add(KeyConstants._urltoken);
  }

 
  protected static String now(Config config) {
    return Caster.toString(new DateTimeImpl(config).getTime());
  }
View Full Code Here

  protected static String now(Config config) {
    return Caster.toString(new DateTimeImpl(config).getTime());
  }

  protected static String createExpires(Config config,long timespan) {
    return Caster.toString(timespan+new DateTimeImpl(config).getTime());
  }
View Full Code Here

    super(other,deepCopy);
    this.datasourceName=other.datasourceName;
  }
 
  private static DateTime doNowIfNull(PageContext pc,DateTime dt) {
    if(dt==null)return new DateTimeImpl(pc.getConfig());
    return dt;
  }
View Full Code Here

   * @param name
   */
  protected StorageScopeMemory(PageContext pc,String strType, int type, Log log) {
    super(
        new StructImpl(),
        new DateTimeImpl(pc.getConfig()),
        null,
        -1,1,strType,type);
    ScopeContext.info(log,"create new memory based "+strType+" scope for "+pc.getApplicationContext().getName()+"/"+pc.getCFID());
   
  }
View Full Code Here

    this.cacheName=other.cacheName;
    this.cfid=other.cfid;
  }
 
  private static DateTime doNowIfNull(Config config,DateTime dt) {
    if(dt==null)return new DateTimeImpl(config);
    return dt;
  }
View Full Code Here

    ConfigWebImpl cwi=(ConfigWebImpl) engine.getFactory().getConfig();
    Resource dir=type==Scope.SCOPE_CLIENT?cwi.getClientScopeDir():cwi.getSessionScopeDir();
   
    // for old files only the defintion from admin can be used
    long timeout=type==Scope.SCOPE_CLIENT?cwi.getClientTimeout().getMillis():cwi.getSessionTimeout().getMillis();
    long time = new DateTimeImpl(cwi).getTime()-timeout;
   
    try {
      // delete files that has expired
      AndResourceFilter andFilter = new AndResourceFilter(new ResourceFilter[]{EXT_FILTER,new ExpiresFilter(time,true)});
      String appName,cfid2,cfid;
View Full Code Here

    if(o instanceof DumpData) {
      return ((DumpData)o);
    }
    // Date
    if(o instanceof Date) {
      return new DateTimeImpl((Date) o).toDumpData(pageContext,maxlevel,props);
    }
    // Calendar
    if(o instanceof Calendar) {
      Calendar c=(Calendar)o;
     
View Full Code Here

      //sb.append("<td><img src=\"/CFIDE/debug/images/Error_16x16.gif\" alt=\"Error type\">");
      sb.append("<td>");
      sb.append("<font color=\"orange\">");
      sb.append("<b>");
      sb.append(LogUtil.toStringType(trace.getType(),"INFO")+" - ");
      sb.append("[CFTRACE "+tf.format(new DateTimeImpl(pageContext.getConfig()), "hh:mm:ss:l")+"]");
      sb.append("["+trace.getTime()+" ms "+total+"]");
      sb.append("["+trace.getTemplate()+" @ line: "+trace.getLine()+"]");
      if(hasCat || hasText)sb.append(" -");
      if(hasCat)sb.append("  ["+trace.getCategory()+"]");
      if(hasText)sb.append(" <i>"+trace.getText()+"&nbsp;</i>");
View Full Code Here

TOP

Related Classes of railo.runtime.type.dt.DateTimeImpl

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.