Examples of UDFPlus


Examples of railo.runtime.type.UDFPlus

      PageContext pc = ThreadLocalPageContext.get();
    if(pc!=null) {
      Member member = getMember(pc,KeyConstants.__toDateTime,true,superAccess);
      //Object o = get(pc,"_toDateTime",null);
      if(member instanceof UDFPlus) {
        UDFPlus udf = (UDFPlus)member;
        if(udf.getReturnType()==CFTypes.TYPE_DATETIME && udf.getFunctionArguments().length==0) {
         
          try {
            return DateCaster.toDateAdvanced(_call(pc, KeyConstants.__toDateTime,udf, null, new Object[0]),true,pc.getTimeZone(),defaultValue);
          } catch (PageException e) {
            return defaultValue;
View Full Code Here

Examples of railo.runtime.type.UDFPlus

     * @return value set
     * @throws ExpressionException
     */
    private synchronized Object _set(PageContext pc,Collection.Key key, Object value) throws ExpressionException {
      if(value instanceof UDFPlus) {
          UDFPlus udf = (UDFPlus)((UDFPlus)value).duplicate();
          //udf.isComponentMember(true);///+++
          udf.setOwnerComponent(this);
          if(udf.getAccess()>Component.ACCESS_PUBLIC)
            udf.setAccess(Component.ACCESS_PUBLIC);
          _data.put(key,udf);
          _udfs.put(key,udf);
          hasInjectedFunctions=true;
        }
        else {
View Full Code Here

Examples of railo.runtime.type.UDFPlus

    private Object callGetter(PageContext pc,Collection.Key key) throws PageException {
      Key getterName = KeyImpl.getInstance("get"+key.getLowerString());
      Member member=getMember(pc,getterName,false,false);
        if(member instanceof UDFPlus) {
            UDFPlus udf = (UDFPlus)member;
            if(udf.getFunctionArguments().length==0 && udf.getReturnType()!=CFTypes.TYPE_VOID) {
                return _call(pc,getterName,udf,null,ArrayUtil.OBJECT_EMPTY);
            }
        }
        throw new ExpressionException("Component ["+getCallName()+"] has no accessible Member with name ["+key+"]");
  }
View Full Code Here

Examples of railo.runtime.type.UDFPlus

   
    private Object callGetter(PageContext pc,Collection.Key key, Object defaultValue) {
      Key getterName = KeyImpl.getInstance("get"+key.getLowerString());
      Member member=getMember(pc,getterName,false,false);
        if(member instanceof UDFPlus) {
            UDFPlus udf = (UDFPlus)member;
            if(udf.getFunctionArguments().length==0 && udf.getReturnType()!=CFTypes.TYPE_VOID) {
                try {
          return _call(pc,getterName,udf,null,ArrayUtil.OBJECT_EMPTY);
        } catch (PageException e) {
          return defaultValue;
        }
View Full Code Here

Examples of railo.runtime.type.UDFPlus

   
    private Object callSetter(PageContext pc,Collection.Key key, Object value) throws PageException {
      Collection.Key setterName = KeyImpl.getInstance("set"+key.getLowerString());
      Member member=getMember(pc,setterName,false,false);
      if(member instanceof UDFPlus) {
          UDFPlus udf = (UDFPlus)member;
          if(udf.getFunctionArguments().length==1 && (udf.getReturnType()==CFTypes.TYPE_VOID) || udf.getReturnType()==CFTypes.TYPE_ANY   ) {// TDOO support int return type
                return _call(pc,setterName,udf,null,new Object[]{value});
            }   
        }
        return _set(pc,key,value);
  }
View Full Code Here

Examples of railo.runtime.type.UDFPlus

     
    props.strType="any";
    props.secureJson=pc.getApplicationContext().getSecureJson();
    int udfReturnFormat=-1;
    if(o instanceof UDFPlus) {
      UDFPlus udf = ((UDFPlus)o);
      udfReturnFormat=udf.getReturnFormat(-1);
      props.type=udf.getReturnType();
      props.strType=udf.getReturnTypeAsString();
      props.output=udf.getOutput();
      if(udf.getSecureJson()!=null)props.secureJson=udf.getSecureJson().booleanValue();
    }

    // format
    if(isValid(urlReturnFormat)) props.format=urlReturnFormat;
    else if(isValid(udfReturnFormat)) props.format=udfReturnFormat;
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.