Package railo.commons.lang.types

Examples of railo.commons.lang.types.RefBooleanImpl


    }
   
    checkSemiColonLineFeed(data,true,true);
    if(!StringUtil.isEmpty(tlt.getTteClassName()))data.ep.add(tlt, tag, data.flibs, data.cfml);
   
    if(!StringUtil.isEmpty(attrName))validateAttributeName(attrName, data.cfml, new ArrayList<String>(), tlt, new RefBooleanImpl(false), new StringBuffer(), allowTwiceAttr);
    tag.setEnd(data.cfml.getPosition());
    eval(tlt,data,tag);
    return tag;
  }
View Full Code Here


    return false;
  }

  private final Attribute attribute(TagLibTag tlt, ExprData data, ArrayList<String> args, Expression defaultValue,Object oAllowExpression, boolean allowTwiceAttr) throws TemplateException {
    StringBuffer sbType=new StringBuffer();
      RefBoolean dynamic=new RefBooleanImpl(false);
     
    // Name
      String name=attributeName(data.cfml,args,tlt,dynamic,sbType, allowTwiceAttr);
      boolean allowExpression=false;
      if(oAllowExpression instanceof Boolean)allowExpression=((Boolean)oAllowExpression).booleanValue();
      else if(oAllowExpression instanceof String)allowExpression=((String)oAllowExpression).equalsIgnoreCase(name);

          Expression value=null;
     
      CFMLTransformer.comment(data.cfml,true);
     
      // value
      if(data.cfml.forwardIfCurrent('='))  {
        CFMLTransformer.comment(data.cfml,true);
        value=attributeValue(data,allowExpression)
      }
      else {
        value=defaultValue;
      }   
      CFMLTransformer.comment(data.cfml,true);
     
     
      // Type
      TagLibTagAttr tlta=null;
    if(tlt!=null){
      tlta = tlt.getAttribute(name);
    }
    return new Attribute(dynamic.toBooleanValue(),name,tlta!=null?CastOther.toExpression(value, tlta.getType()):value,sbType.toString());
    }
View Full Code Here

     * up the "proxy" RPC service surrounding it as the MessageContext's
     * active service.
     *
     */
    protected void setupService(MessageContext msgContext) throws Exception {
        RefBoolean isnew=new RefBooleanImpl(false);
        Component cfc=(Component) msgContext.getProperty(Constants.COMPONENT);
        Class clazz=cfc.getJavaAccessClass(isnew);
        String clazzName=clazz.getName();
       
        ClassLoader classLoader=clazz.getClassLoader();
        Pair pair;
        SOAPService rpc=null;
        if(!isnew.toBooleanValue() && (pair = (Pair)soapServices.get(clazzName))!=null) {
          if(classLoader==pair.classloader)
            rpc=pair.rpc;
        }
        //else classLoader = clazz.getClassLoader();
       
View Full Code Here

        if(object instanceof Numberreturn object;
        if(object instanceof Stringreturn object;
        if(object instanceof Date)    return ((Date)object).clone();
        if(object instanceof Booleanreturn object;
   
        RefBoolean before=new RefBooleanImpl();
    try{
      Object copy = ThreadLocalDuplication.get(object,before);
      if(copy!=null){
          return copy;
        }
       
 
        //if(object instanceof CollectionPlus)return ((CollectionPlus)object).duplicate(deepCopy,ThreadLocalDuplication.getMap());
        if(object instanceof Collection)return ((Collection)object).duplicate(deepCopy);
        if(object instanceof Duplicable)return ((Duplicable)object).duplicate(deepCopy);
        if(object instanceof UDF)    return ((UDF)object).duplicate();
          if(object instanceof List)    return duplicateList((List)object,deepCopy);
          if(object instanceof Map)     return duplicateMap((Map)object,deepCopy);
      if(object instanceof Serializable) {
        try {
          String ser = JavaConverter.serialize((Serializable)object);
          return JavaConverter.deserialize(ser);
         
        } catch (Throwable t) {}
      }
        } 
        finally {
          if(!before.toBooleanValue())ThreadLocalDuplication.reset();
        }
     
    return object;
    }
View Full Code Here

  @Override
  public PageSource getRealPage(String realPath) {
      if(realPath.equals(".") || realPath.equals(".."))realPath+='/';
      else realPath=realPath.replace('\\','/');
      RefBoolean _isOutSide=new RefBooleanImpl(isOutSide);
     
     
    if(realPath.indexOf('/')==0) {
        _isOutSide.setValue(false);
    }
    else if(realPath.startsWith("./")) {
      realPath=mergeRealPathes(mapping,this.realPath, realPath.substring(2),_isOutSide);
    }
    else {
      realPath=mergeRealPathes(mapping,this.realPath, realPath,_isOutSide);
    }
    return mapping.getPageSource(realPath,_isOutSide.toBooleanValue());
  }
View Full Code Here

    return b!=null && b.toBooleanValue();
  }
 
  private static void setIsInside(boolean isInside) {
    RefBoolean b = inside.get();
    if(b==null)inside.set(new RefBooleanImpl(isInside));
    else b.setValue(isInside);
  }
View Full Code Here

      exp=column(raw);
      if(!(exp instanceof Column)) throw new SQLParserException("invalid table definition");
      column=(Column) exp;
      raw.removeSpace();
      if(raw.forwardIfCurrent("as ")) {
        String alias=identifier(raw,new RefBooleanImpl(false));
        if(alias==null) throw new SQLParserException("missing alias in select part");
        column.setAlias(alias);
      }
      else {
        int start=raw.getPos();
        RefBoolean hasBracked = new RefBooleanImpl(false);
        String alias=identifier(raw,hasBracked);//TODO having usw
        if(!hasBracked.toBooleanValue()) {
          if("where".equalsIgnoreCase(alias)) raw.setPos(start);
          else if("group".equalsIgnoreCase(alias)) raw.setPos(start);
          else if("having".equalsIgnoreCase(alias)) raw.setPos(start);
          else if("union".equalsIgnoreCase(alias)) raw.setPos(start);
          else if("order".equalsIgnoreCase(alias)) raw.setPos(start);
View Full Code Here

     
      exp=expression(raw);
      if(exp==null) throw new SQLParserException("missing expression in select part of query");
      raw.removeSpace();
      if(raw.forwardIfCurrent("as ")) {
        String alias=identifier(raw,new RefBooleanImpl(false));
        if(alias==null) throw new SQLParserException("missing alias in select part");
        exp.setAlias(alias);
      }
      else {
        int start=raw.getPos();
        RefBoolean hb = new RefBooleanImpl(false);
        String alias=identifier(raw,hb);
        if(!hb.toBooleanValue() && "from".equalsIgnoreCase(alias)) raw.setPos(start);
        else if(alias!=null) exp.setAlias(alias);
      }
      select.addSelectExpression(exp);
      raw.removeSpace();
    }
View Full Code Here

    raw.removeSpace();
    return exp;//new BracketExpression(exp);
  }

  private Expression column(ParserString raw) throws SQLParserException {
    RefBoolean hb = new RefBooleanImpl(false);
    String name = identifier(raw,hb);
    if(name==null) return null;
    if(!hb.toBooleanValue()) {
      if("true".equalsIgnoreCase(name)) return ValueBoolean.TRUE;
      if("false".equalsIgnoreCase(name)) return ValueBoolean.FALSE;
      if("null".equalsIgnoreCase(name)) return ValueNull.NULL;
    }
   
View Full Code Here

        sct.set(KeyConstants._fullname,ps.getComponentName());
        sct.set(KeyConstants._name,ps.getComponentName());
        sct.set(KeyConstants._path,ps.getDisplayPath());
        sct.set(KeyConstants._type,"component");
           
        Class<?> skeleton = comp.getJavaAccessClass(pc,new RefBooleanImpl(false),((ConfigImpl)pc.getConfig()).getExecutionLogEnabled(),false,false,((ConfigImpl)pc.getConfig()).getSupressWSBeforeArg());
        if(skeleton !=null)sct.set(KeyConstants._skeleton, skeleton);
       
        HttpServletRequest req = pc.getHttpServletRequest();
            try {
              String path=ContractPath.call(pc, ps.getDisplayPath()); // MUST better impl !!!
View Full Code Here

TOP

Related Classes of railo.commons.lang.types.RefBooleanImpl

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.