Package railo.runtime

Examples of railo.runtime.Component


     return rtn;
  }
 
 
  private Object load(PageContext pc, String cfcName, Struct filter, Struct options, String order, boolean unique) throws PageException {
    Component cfc=data.getEngine().create(pc, this,cfcName,false);
   
    String name = HibernateCaster.getEntityName(cfc);
    ClassMetadata metaData = null;
   
    Object rtn;
View Full Code Here


     * 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;
View Full Code Here

 
  @Override
  protected Object invokeMethod(MessageContext mc, Method method, Object trg, Object[] args) throws Exception {
    PageContext pc=(PageContext) mc.getProperty(Constants.PAGE_CONTEXT);
    Component c= (Component) mc.getProperty(Constants.COMPONENT);
       
    RPCServer server = RPCServer.getInstance(pc.getId(),pc.getServletContext());
    TypeMapping tm = server.getEngine().getTypeMappingRegistry().getDefaultTypeMapping();
   
    return AxisCaster.toAxisType(tm,c.call(pc,method.getName(),toRailoType(pc,args)),null);
  }
View Full Code Here

      throw AxisFault.makeFault((Caster.toPageException(t)));
    }
  }
  public static Object _invoke(String name, Object[] args) throws PageException {
    Key key = Caster.toKey(name);
    Component c=component.get();
    PageContext p=pagecontext.get();
    if(c==null) throw new ApplicationException("missing component");
    if(p==null) throw new ApplicationException("missing pagecontext");
   
    for(int i=0;i<args.length;i++) {
      args[i]=AxisCaster.toRailoType(p,args[i]);
    }
   
    Object udf = c.get(p,key,null);
    String rt="any";
    if(udf instanceof UDF) {
      rt=((UDF)udf).getReturnTypeAsString();
    }
    Object rv = c.call(p, key, args);
   
    try {
      RPCServer server = RPCServer.getInstance(p.getId(),p.getServletContext());
      TypeMapping tm = server.getEngine().getTypeMappingRegistry().getDefaultTypeMapping();
      rv=Caster.castTo(p, rt, rv, false);
View Full Code Here

    }
   
  @Override
  public int doStartTag() throws PageException  {
    if(pageContext.variablesScope() instanceof ComponentScope) {
      Component comp = ((ComponentScope)pageContext.variablesScope()).getComponent();
      comp.setProperty(property);
      property.setOwnerName(comp.getAbsName());
    }
   
    return SKIP_BODY;
  }
View Full Code Here

                    }
                break;
           }
        }
        if(o instanceof Component) {
            Component comp=((Component)o);
            return comp.instanceOf(type);
        }
        if(isArrayType(type) && isArray(o)){
          String t=type.substring(0,type.length()-2);
          Array arr = Caster.toArray(o,null);
          if(arr!=null){
View Full Code Here

        case CFTypes.TYPE_FUNCTION:    return isFunction(o);
        case CFTypes.TYPE_XML:          return isXML(o);
    }
   
        if(o instanceof Component) {
          Component comp=((Component)o);
            return comp.instanceOf(strType);
        }
        if(isArrayType(strType) && isArray(o)){
          String _strType=strType.substring(0,strType.length()-2);
          short _type=CFTypes.toShort(_strType, false, (short)-1);
          Array arr = Caster.toArray(o,null);
View Full Code Here

     

      // search relative to active cfc (this get not cached because the cache get ambigous if we do)
      if(searchLocal && isRealPath)  {
        if(child==null) {
          Component cfc = pc.getActiveComponent();
          if(cfc!=null) child = cfc.getPageSource();
        }
       
       
        if(child!=null) {
          ps=child.getRealPage(pathWithCFC);
View Full Code Here

            _serialize(pc,test,value,sb,serializeQueryByColumns,done);
        }
       
        if(struct instanceof Component){
          Boolean remotingFetch;
          Component cp = (Component)struct;
          boolean isPeristent=false;
          try {
        ComponentAccess ca = ComponentUtil.toComponentAccess(cp);
        isPeristent=ca.isPersistent();
      } catch (ExpressionException ee) {}
     
          Property[] props = cp.getProperties(false);
          ComponentScope scope = cp.getComponentScope();
          for(int i=0;i<props.length;i++) {
            if(!ignoreRemotingFetch) {
              remotingFetch=Caster.toBoolean(props[i].getDynamicAttributes().get(REMOTING_FETCH,null),null);
              if(remotingFetch==null){
                if(isPeristent  && ORMUtil.isRelated(props[i])) continue;
View Full Code Here

    PageContext oldPC = ThreadLocalPageContext.get();
    PageContextImpl pc=createPageContext(requestURI,id,functionName,arguments,cfcPeristent);
   
    try {
      ThreadLocalPageContext.register(pc);
      Component cfc=getCFC(pc,requestURI);
      if(cfc.containsKey(functionName)){
        pc.execute(requestURI, true,false);
        // Result
        return pc.variablesScope().get(AMF_FORWARD,null);
      }
    }
View Full Code Here

TOP

Related Classes of railo.runtime.Component

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.