Package org.dmd.mvw.tools.mvwgenerator.extended

Examples of org.dmd.mvw.tools.mvwgenerator.extended.Controller


        super(new ControllerDMO(mods), org.dmd.mvw.tools.mvwgenerator.generated.MvwSchemaAG._Controller);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGeneratorNewest.dumpWrapper(BaseDMWGeneratorNewest.java:491)
    public Controller getModificationRecorder(){
        Controller rc = new Controller();
        rc.setControllerName(getControllerName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }
View Full Code Here


    public ControllerDMW(ControllerDMO obj) {
        super(obj, org.dmd.mvw.tools.mvwgenerator.generated.MvwSchemaAG._Controller);
    }

    public Controller cloneIt() {
        Controller rc = new Controller();
        rc.setDmcObject(getDMO().cloneIt());
        return(rc);
    }
View Full Code Here

        rci.getDefinedInModule().addRunContextItem(rci);

      }
    }
    else if (def instanceof Controller){
      Controller controller = (Controller) def;
//      controller.getDMO().addUsesRunContextItem("eventBus");
      controllers.put(def.getCamelCaseName(), controller);
      components.put(def.getCamelCaseName(), controller);
     
      RunContextItem controllerRCI = null;
      if (controller.isAddedToRunContext()){
        // All Controllers run for the life of the application and so, are added to the run context
        // so that they are created on start up
        controllerRCI = new RunContextItem();
        controllerRCI.setAutoCreated(true);
        RunContextItemCollection rcic = contexts.get(controllerRCI.getContextImpl());
       
        controllerRCI.setItemName(controller.getControllerName().getNameString() + "RCI");
        controllerRCI.setDescription("The auto generated run context item for the " + controller.getControllerName());
       
        if (controller.getSubpackage() == null)
          controllerRCI.setUseClass(currentModule.getGenPackage() + ".extended." + controller.getControllerName());
        else
          controllerRCI.setUseClass(currentModule.getGenPackage() + ".extended." + controller.getSubpackage() + "." + controller.getControllerName());
         
        if (controller.usesRunContext())
          controllerRCI.setConstruction("new " + controller.getControllerName() + "(this)");
        else
          controllerRCI.setConstruction("new " + controller.getControllerName() + "()");
       
        controllerRCI.setDefinedInModule(controller.getDefinedInModule());
       
        if (controller.getItemOrder() != null)
          controllerRCI.setItemOrder(controller.getItemOrder());
       
        if (rcic == null){
          rcic = new RunContextItemCollection(controllerRCI.getContextImpl());
          contexts.put(controllerRCI.getContextImpl(), rcic);
        }
        rcic.addItem(controllerRCI);
       
        // Add the item to its module
        controllerRCI.getDefinedInModule().addRunContextItem(controllerRCI);
       
//DebugInfo.debug("\n" + rci.toOIF());
       
        // Tell the controller its item
        controller.setRunContextItem(controllerRCI);
       
        // Add to all definitions so that references can be resolved
        controllerRCI.setCamelCaseName(controllerRCI.getObjectName());
        checkAndAdd(controllerRCI,allDefs);

      }
     
      if (controller.isCentralRPCErrorHandler()){
        if (centralRpcErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central RPC error handler.");
          ex.result.lastResult().moreMessages(centralRpcErrorHandler.getControllerName() + " in " + centralRpcErrorHandler.getDefinedInModule().getFile() + " at line " + centralRpcErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralRpcErrorHandler = controller;
      }
      if (controller.isCentralDMPErrorHandler()){
        if (centralDmpErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central DMP error handler.");
          ex.result.lastResult().moreMessages(centralDmpErrorHandler.getControllerName() + " in " + centralDmpErrorHandler.getDefinedInModule().getFile() + " at line " + centralDmpErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralDmpErrorHandler = controller;
      }
      if (controller.isCentralAsyncErrorHandler()){
        if (centralAsyncErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central asynchronous code loading error handler.");
          ex.result.lastResult().moreMessages(centralAsyncErrorHandler.getControllerName() + " in " + centralAsyncErrorHandler.getDefinedInModule().getFile() + " at line " + centralDmpErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralAsyncErrorHandler = controller;
        centralAsyncErrorHandlerRCI = controllerRCI;
//       
View Full Code Here

TOP

Related Classes of org.dmd.mvw.tools.mvwgenerator.extended.Controller

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.