Examples of StructImpl


Examples of railo.runtime.type.StructImpl

    hasChanges=false;
    setTimeSpan(pc);
   
   
    //lastvisit=System.currentTimeMillis();
    if(sct==null) sct=new StructImpl();
    sct.setEL(KeyConstants._cfid, pc.getCFID());
    sct.setEL(KeyConstants._cftoken, pc.getCFToken());
    sct.setEL(URLTOKEN, pc.getURLToken());
    sct.setEL(LASTVISIT, _lastvisit);
    _lastvisit=new DateTimeImpl(pc.getConfig());
View Full Code Here

Examples of railo.runtime.type.StructImpl

 
 
 
 
  public Struct getSummaryInfo() {
        Struct infostruct = new StructImpl();
       
        int sheets = workbook.getNumberOfSheets();
        infostruct.setEL("SHEETS", new Double(sheets));
        if(sheets>0) {
          StringBuilder sb=new StringBuilder();
            for(int i=0; i<sheets; i++){
              if(i>0)sb.append(',');
              sb.append(workbook.getSheetName(i));
            }
            infostruct.setEL("SHEETNAMES", sb.toString());
        }
     
        if(xmlFormat==FORMAT_HSSF) {
          infostruct.setEL("SPREADSHEETTYPE", "Excel");
         
          HSSFWorkbook hssfworkbook = (HSSFWorkbook)workbook;
            info(infostruct,hssfworkbook.getSummaryInformation());
            info(infostruct,hssfworkbook.getDocumentSummaryInformation());
        }
        else if(xmlFormat==FORMAT_XSSF)  {
          infostruct.put("SPREADSHEETTYPE", "Excel (2007)");
           
          XSSFWorkbook xssfworkbook = (XSSFWorkbook)workbook;
            POIXMLProperties props = xssfworkbook.getProperties();
            info(infostruct,props.getCoreProperties().getUnderlyingProperties());
            info(infostruct,props.getExtendedProperties().getUnderlyingProperties());
View Full Code Here

Examples of railo.runtime.type.StructImpl

   * @throws PageException
   */
  public static Client getInstance(String cacheName, String appName, PageContext pc, Log log) throws PageException {
      Struct _sct = _loadData(pc, cacheName, appName,"client",log);
      //structOk=true;
      if(_sct==null) _sct=new StructImpl();
     
    return new ClientCache(pc,cacheName,appName,_sct);
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

   * @throws PageException
   */
  public static Client getInstance(String datasourceName, PageContext pc, Log log) throws PageException {
     
      Struct _sct = _loadData(pc, datasourceName,"client",SCOPE_CLIENT,log, false);
      if(_sct==null) _sct=new StructImpl();
     
    return new ClientDatasource(pc,datasourceName,_sct);
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

   * @param sct
   * @return
   */
  public static Struct duplicate(Struct sct,boolean deepCopy) {

    Struct rtn=new StructImpl();
    //railo.runtime.type.Collection.Key[] keys=sct.keys();
    //railo.runtime.type.Collection.Key key;
    Iterator<Entry<Key, Object>> it = sct.entryIterator();
      Entry<Key, Object> e;
        while(it.hasNext()) {
          e=it.next();
      rtn.setEL(e.getKey(),Duplicator.duplicate(e.getValue(),deepCopy));
    }
    return rtn;
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

    }
    return arr;
  }

  public static Struct copyToStruct(Map map) throws PageException {
        Struct sct = new StructImpl();
        Iterator it=map.entrySet().iterator();
        Map.Entry entry;
        while(it.hasNext()) {
            entry=(Entry) it.next();
            sct.setEL(Caster.toString(entry.getKey()),entry.getValue());
        }
        return sct;
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

    }
  }

 
    public static Struct merge(Struct[] scts) {
    Struct sct=new StructImpl();
   
    for(int i=scts.length-1;i>=0;i--){
      Iterator<Entry<Key, Object>> it = scts[i].entryIterator();
      Entry<Key, Object> e;
      while(it.hasNext()){
        e = it.next();
        sct.setEL(e.getKey(), e.getValue());
      }
    }
    return sct;
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

       
      }
    }
    ScopeContext.info(log,"create new "+strType+" scope for "+pc.getApplicationContext().getName()+"/"+pc.getCFID());
   
    return new StructImpl();
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

   
    if(outNames.size()<=1) return AxisCaster.toRailoType(null,ret);
        //getParamData((org.apache.axis.client.Call)call,parameters.returnParam,ret);
    Map outputs = call.getOutputParams();
   
    Struct sct = new StructImpl();
    for(int pos = 0; pos < outNames.size(); pos++) {
      String name = outNames.get(pos);
            //print.ln(name);
      Object value = outputs.get(name);
      if(value == null && pos == 0) {
        sct.setEL(name, AxisCaster.toRailoType(null,ret));
      }
      else {
        sct.setEL(name, AxisCaster.toRailoType(null,value));
      }
    }
    return sct;
  }
View Full Code Here

Examples of railo.runtime.type.StructImpl

    return psi.loadPage(pc);
  }

  public static Struct getPropertiesAsStruct(ComponentAccess ca, boolean onlyPersistent) {
    Property[] props = ca.getProperties(onlyPersistent);
    Struct sct=new StructImpl();
    if(props!=null)for(int i=0;i<props.length;i++){
      sct.setEL(KeyImpl.getInstance(props[i].getName()), props[i]);
    }
    return sct;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.