Package ch.ralscha.extdirectspring.bean.api

Examples of ch.ralscha.extdirectspring.bean.api.RemotingApi


        Boolean.FALSE));
    return remotingApi;
  }

  private static RemotingApi group2Apis(String namespace, String url) {
    RemotingApi remotingApi = new RemotingApi("remoting", url, namespace);
    remotingApi.addAction("remoteProviderSimple", new Action("method3", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method6", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method7", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update4",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi
        .addAction("formInfoController", new Action("upload", 0, Boolean.TRUE));
    remotingApi.addAction("uploadService", new Action("upload", 0, Boolean.TRUE));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage1", "message1"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage2", "message2"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider", "message6",
        "message6"));
    remotingApi.addSseProvider("sseProvider", "message1");
    remotingApi.addSseProvider("sseProvider", "message2");
    remotingApi.addSseProvider("sseProvider", "message6");
    return remotingApi;
  }
View Full Code Here


    remotingApi.addSseProvider("sseProvider", "message6");
    return remotingApi;
  }

  private static RemotingApi group1and2Apis(String namespace) {
    RemotingApi remotingApi = new RemotingApi("remoting", "/router", namespace);
    remotingApi.addAction("remoteProviderSimple", new Action("method1", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method1", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderSimple", new Action("method3", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method6", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method7", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update4",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi
        .addAction("formInfoController", new Action("upload", 0, Boolean.TRUE));
    remotingApi.addAction("uploadService", new Action("upload", 0, Boolean.TRUE));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage1", "message1"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage2", "message2"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider", "message6",
        "message6"));
    remotingApi.addSseProvider("sseProvider", "message1");
    remotingApi.addSseProvider("sseProvider", "message2");
    remotingApi.addSseProvider("sseProvider", "message6");
    return remotingApi;
  }
View Full Code Here

  static RemotingApi group2Apis(String namespace) {
    return group2Apis(namespace, "/router");
  }

  private static RemotingApi group3Apis(String namespace) {
    RemotingApi remotingApi = new RemotingApi("remoting", "/router", namespace);
    remotingApi.addAction("remoteProviderSimple", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method9", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("destroy", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("destroy", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("destroy", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("formInfoController", new Action("updateInfo", 0,
        Boolean.TRUE));
    remotingApi.addAction("formInfoController", new Action("updateInfoDirect", 0,
        Boolean.TRUE));
    remotingApi.addAction("formInfoController2", new Action("updateInfo1", 0,
        Boolean.TRUE));
    remotingApi.addAction("formInfoController2", new Action("updateInfo2", 0,
        Boolean.TRUE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method3", 1,
        Boolean.FALSE));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage5", "message5"));
    remotingApi.addSseProvider("sseProvider", "message5");
    return remotingApi;
  }
View Full Code Here

    remotingApi.addSseProvider("sseProvider", "message5");
    return remotingApi;
  }

  private static RemotingApi group4Apis(String namespace) {
    RemotingApi remotingApi = new RemotingApi("remoting", "/router", namespace);
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage3", "message3"));
    remotingApi.addSseProvider("sseProvider", "message3");
    return remotingApi;
  }
View Full Code Here

    remotingApi.addSseProvider("sseProvider", "message3");
    return remotingApi;
  }

  private static RemotingApi interfaceApis(String namespace) {
    RemotingApi remotingApi = new RemotingApi("remoting", "/router", namespace);
    remotingApi.addAction("remoteProviderImplementation", new Action("storeRead", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderImplementation", new Action("method2", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderImplementation", new Action("method3", 3,
        Boolean.FALSE));
    return remotingApi;
  }
View Full Code Here

        Boolean.FALSE));
    return remotingApi;
  }

  private static RemotingApi allApis(String namespace) {
    RemotingApi remotingApi = new RemotingApi("remoting", "/router", namespace);
    remotingApi.addAction("remoteProviderSimple", new Action("method1", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method2", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method3", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method4b", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method6", 2,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method7", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method8", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method9", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method10", 9,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method11", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method11b", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method12", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method13", 9,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method14", 4,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderSimple", new Action("method15", 2,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method16", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method17", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method18", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method19", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method20", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method21", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method22", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method23", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method24", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method25", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method26", 3,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method27", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method28", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method29", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimple", new Action("method30", 0,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method1", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method2", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method3", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method4", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method5", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method6", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method7", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method8", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method9", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method10", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method11", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderSimpleDoc", new Action("method12", 0,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderStoreRead", new Action("method1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method6", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method7", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method8", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("method9", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("methodFilter", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreRead", new Action("methodMetadata", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderStoreModify", new Action("create1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("create2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModify", new Action("destroy", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("create1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("create2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyArray", new Action("destroy", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("create1",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("create2",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update1",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update2",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update3",
        1, Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifyInterface", new Action("update4",
        1, Boolean.FALSE));

    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("create1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("create2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("update4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderStoreModifySingle", new Action("destroy", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderFormLoad", new Action("method1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method6", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderFormLoad", new Action("method7", 1,
        Boolean.FALSE));

    remotingApi.addAction("formInfoController", new Action("updateInfo", 0,
        Boolean.TRUE));
    remotingApi.addAction("formInfoController", new Action("updateInfoDirect", 0,
        Boolean.TRUE));
    remotingApi
        .addAction("formInfoController", new Action("upload", 0, Boolean.TRUE));
    remotingApi.addAction("uploadService", new Action("upload", 0, Boolean.TRUE));

    remotingApi.addAction("formInfoController3", new Action("updateInfoJson", 1,
        Boolean.FALSE));
    remotingApi.addAction("formInfoController3", new Action("updateInfoJsonDirect",
        1, Boolean.FALSE));
    remotingApi.addAction("formInfoController3", new Action(
        "updateInfoJsonDirectError", 1, Boolean.FALSE));

    remotingApi.addAction("formInfoController2", new Action("updateInfo1", 0,
        Boolean.TRUE));
    remotingApi.addAction("formInfoController2", new Action("updateInfo2", 0,
        Boolean.TRUE));

    remotingApi.addAction("remoteProviderTreeLoad", new Action("method1", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method2", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method3", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method4", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method5", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderTreeLoad", new Action("method6", 1,
        Boolean.FALSE));

    remotingApi.addAction("remoteProviderImplementation", new Action("storeRead", 1,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderImplementation", new Action("method2", 0,
        Boolean.FALSE));
    remotingApi.addAction("remoteProviderImplementation", new Action("method3", 3,
        Boolean.FALSE));

    remotingApi.addAction("bookService", new Action("read", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("readWithPaging", 1,
        Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("update3", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("update4", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("delete3", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("delete4", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("create3", 1, Boolean.FALSE));
    remotingApi.addAction("bookService", new Action("create4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService", new Action("read", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService", new Action("readWithPaging", 1,
        Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("update3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("update4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("delete3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("delete4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("create3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubAopService",
        new Action("create4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("read", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("readWithPaging", 1,
        Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("update3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("update4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("delete3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("delete4", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("create3", 1, Boolean.FALSE));
    remotingApi.addAction("bookSubService", new Action("create4", 1, Boolean.FALSE));

    remotingApi.addAction("remoteProviderSimpleNamed", new Action("method1",
        new ArrayList<String>()));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("method2", Arrays.asList("i", "d", "s")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("method3", Arrays.asList("userName")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("method4", Arrays.asList("a", "b")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("method5", Arrays.asList("d")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action("method6",
        new ArrayList<String>()));
    remotingApi.addAction(
        "remoteProviderSimpleNamed",
        new Action("method7", Arrays.asList("flag", "aCharacter", "workflow",
            "aInt", "aLong", "aDouble", "aFloat", "aShort", "aByte")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("method9", Arrays.asList("aRow")));
    remotingApi.addAction(
        "remoteProviderSimpleNamed",
        new Action("method10", Arrays.asList("flag", "aCharacter", "workflow",
            "aInt", "aLong", "aDouble", "aFloat", "aShort", "aByte")));

    remotingApi.addAction(
        "remoteProviderSimpleNamed",
        new Action("method11", Arrays.asList("endDate", "normalParameter",
            "aDate", "percent")));

    remotingApi.addAction("remoteProviderSimpleNamed", new Action(
        "methodCollection1", Arrays.asList("name", "collections")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action(
        "methodCollection2", Arrays.asList("name", "collections")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action(
        "methodCollection3", Arrays.asList("name", "collections")));

    remotingApi.addAction("remoteProviderSimpleNamed", new Action("methodArray1",
        Arrays.asList("name", "array")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action("methodArray2",
        Arrays.asList("name", "array")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action("methodArray3",
        Arrays.asList("name", "array")));
    remotingApi.addAction("remoteProviderSimpleNamed", new Action("methodArray4",
        Arrays.asList("name", "array")));

    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("methodRP1", Arrays.asList("lastName", "theAge", "active")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("methodRP2", Arrays.asList("lastName", "theAge", "active")));
    remotingApi.addAction("remoteProviderSimpleNamed",
        new Action("methodRP3", Arrays.asList("lastName", "theAge", "active")));

    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage1", "message1"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage2", "message2"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage3", "message3"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage4", "message4"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "handleMessage5", "message5"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider", "message6",
        "message6"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader1", "messageRequestHeader1"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader2", "messageRequestHeader2"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader3", "messageRequestHeader3"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader4", "messageRequestHeader4"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader5", "messageRequestHeader5"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageRequestHeader6", "messageRequestHeader6"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue1", "messageCookieValue1"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue2", "messageCookieValue2"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue3", "messageCookieValue3"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue4", "messageCookieValue4"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue5", "messageCookieValue5"));
    remotingApi.addPollingProvider(new PollingProvider("pollProvider",
        "messageCookieValue6", "messageCookieValue6"));

    remotingApi.addSseProvider("sseProvider", "message1");
    remotingApi.addSseProvider("sseProvider", "message2");
    remotingApi.addSseProvider("sseProvider", "message3");
    remotingApi.addSseProvider("sseProvider", "message4");
    remotingApi.addSseProvider("sseProvider", "message5");
    remotingApi.addSseProvider("sseProvider", "message6");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader1");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader2");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader3");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader4");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader5");
    remotingApi.addSseProvider("sseProvider", "messageRequestHeader6");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue1");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue2");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue3");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue4");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue5");
    remotingApi.addSseProvider("sseProvider", "messageCookieValue6");
    remotingApi.addSseProvider("sseProvider", "message13");
    remotingApi.addSseProvider("sseProvider", "message14");
    remotingApi.addSseProvider("sseProvider", "message15");
    return remotingApi;
  }
View Full Code Here

  public void afterTest() {
    IOUtils.closeQuietly(client);
  }

  private static RemotingApi api() {
    RemotingApi remotingApi = new RemotingApi("remoting", "/controller/router", null);
    remotingApi.addAction("myModelService", new Action("method1", 0, Boolean.TRUE));
    remotingApi.addAction("myModelService", new Action("method2", 0, Boolean.TRUE));
    remotingApi.addAction("myModelService", new Action("update", 0, Boolean.TRUE));
    return remotingApi;
  }
View Full Code Here

  private String buildApiString(String apiNs, String actionNs, String remotingApiVar, String pollingUrlsVar,
      String sseVar, String routerUrl, String basePollUrl, String baseSseUrl, String group, boolean debug,
      boolean doc) {

    RemotingApi remotingApi = new RemotingApi(configurationService.getConfiguration().getProviderType(), routerUrl,
        actionNs);

    remotingApi.setTimeout(configurationService.getConfiguration().getTimeout());
    remotingApi.setMaxRetries(configurationService.getConfiguration().getMaxRetries());

    Object enableBuffer = configurationService.getConfiguration().getEnableBuffer();
    if (enableBuffer instanceof String && StringUtils.hasText((String) enableBuffer)) {
      String enableBufferString = (String) enableBuffer;
      if (enableBufferString.equalsIgnoreCase("true")) {
        remotingApi.setEnableBuffer(true);
      } else if (enableBufferString.equalsIgnoreCase("false")) {
        remotingApi.setEnableBuffer(false);
      } else {
        Integer enableBufferMs = NumberUtils.parseNumber(enableBufferString, Integer.class);
        remotingApi.setEnableBuffer(enableBufferMs);
      }
    } else if (enableBuffer instanceof Number || enableBuffer instanceof Boolean) {
      remotingApi.setEnableBuffer(enableBuffer);
    }

    buildRemotingApi(remotingApi, group);

    StringBuilder sb = new StringBuilder();

    if (StringUtils.hasText(apiNs)) {
      sb.append("Ext.ns('");
      sb.append(apiNs);
      sb.append("');");
    }

    if (debug) {
      sb.append("\n\n");
    }

    if (StringUtils.hasText(actionNs)) {
      sb.append("Ext.ns('");
      sb.append(actionNs);
      sb.append("');");

      if (debug) {
        sb.append("\n\n");
      }
    }

    String jsonConfig;
    if (!doc) {
      jsonConfig = configurationService.getJsonHandler().writeValueAsString(remotingApi, debug);
    } else {
      ObjectMapper mapper = new ObjectMapper();
      mapper.addMixInAnnotations(RemotingApi.class, RemotingApiMixin.class);
      try {
        jsonConfig = mapper.writer().withDefaultPrettyPrinter().writeValueAsString(remotingApi);
      } catch (JsonProcessingException e) {
        jsonConfig = null;
        LogFactory.getLog(ApiController.class).info("serialize object to json", e);
      }
    }

    if (StringUtils.hasText(apiNs)) {
      sb.append(apiNs).append(".");
    }
    sb.append(remotingApiVar).append(" = ");
    sb.append(jsonConfig);
    sb.append(";");

    List<PollingProvider> pollingProviders = remotingApi.getPollingProviders();
    if (!pollingProviders.isEmpty()) {

      if (debug) {
        sb.append("\n\n");
      }

      if (StringUtils.hasText(apiNs)) {
        sb.append(apiNs).append(".");
      }
      sb.append(pollingUrlsVar).append(" = {");
      if (debug) {
        sb.append("\n");
      }

      for (int i = 0; i < pollingProviders.size(); i++) {
        if (debug) {
          sb.append("  ");
        }

        sb.append("\"");
        sb.append(pollingProviders.get(i).getEvent());
        sb.append("\"");
        sb.append(" : \"").append(basePollUrl).append("/");
        sb.append(pollingProviders.get(i).getBeanName());
        sb.append("/");
        sb.append(pollingProviders.get(i).getMethod());
        sb.append("/");
        sb.append(pollingProviders.get(i).getEvent());
        sb.append("\"");
        if (i < pollingProviders.size() - 1) {
          sb.append(",");
          if (debug) {
            sb.append("\n");
          }
        }
      }
      if (debug) {
        sb.append("\n");
      }
      sb.append("};");
    }

    Map<String, List<String>> sseProviders = remotingApi.getSseProviders();
    if (!sseProviders.isEmpty()) {

      if (debug) {
        sb.append("\n\n");
      }
View Full Code Here

  }

  private String buildApiJson(String apiNs, String actionNs, String remotingApiVar, String routerUrl, String group,
      boolean debug) {

    RemotingApi remotingApi = new RemotingApi(configurationService.getConfiguration().getProviderType(), routerUrl,
        actionNs);

    if (StringUtils.hasText(apiNs)) {
      remotingApi.setDescriptor(apiNs + "." + remotingApiVar);
    } else {
      remotingApi.setDescriptor(remotingApiVar);
    }

    buildRemotingApi(remotingApi, group);

    return configurationService.getJsonHandler().writeValueAsString(remotingApi, debug);
View Full Code Here

  private String buildApiString(String apiNs, String actionNs, String remotingApiVar, String pollingUrlsVar,
      String sseVar, String routerUrl, String basePollUrl, String baseSseUrl, String group, boolean debug,
      boolean doc) {

    RemotingApi remotingApi = new RemotingApi(configurationService.getConfiguration().getProviderType(), routerUrl,
        actionNs);

    remotingApi.setTimeout(configurationService.getConfiguration().getTimeout());
    remotingApi.setMaxRetries(configurationService.getConfiguration().getMaxRetries());

    Object enableBuffer = configurationService.getConfiguration().getEnableBuffer();
    if (enableBuffer instanceof String && StringUtils.hasText((String) enableBuffer)) {
      String enableBufferString = (String) enableBuffer;
      if (enableBufferString.equalsIgnoreCase("true")) {
        remotingApi.setEnableBuffer(true);
      } else if (enableBufferString.equalsIgnoreCase("false")) {
        remotingApi.setEnableBuffer(false);
      } else {
        Integer enableBufferMs = NumberUtils.parseNumber(enableBufferString, Integer.class);
        remotingApi.setEnableBuffer(enableBufferMs);
      }
    } else if (enableBuffer instanceof Number || enableBuffer instanceof Boolean) {
      remotingApi.setEnableBuffer(enableBuffer);
    }

    buildRemotingApi(remotingApi, group);

    StringBuilder sb = new StringBuilder();

    if (StringUtils.hasText(apiNs)) {
      sb.append("Ext.ns('");
      sb.append(apiNs);
      sb.append("');");
    }

    if (debug) {
      sb.append("\n\n");
    }

    if (StringUtils.hasText(actionNs)) {
      sb.append("Ext.ns('");
      sb.append(actionNs);
      sb.append("');");

      if (debug) {
        sb.append("\n\n");
      }
    }

    String jsonConfig;
    if (!doc) {
      jsonConfig = configurationService.getJsonHandler().writeValueAsString(remotingApi, debug);
    } else {
      ObjectMapper mapper = new ObjectMapper();
      mapper.addMixInAnnotations(RemotingApi.class, RemotingApiMixin.class);
      try {
        jsonConfig = mapper.writer().withDefaultPrettyPrinter().writeValueAsString(remotingApi);
      } catch (JsonProcessingException e) {
        jsonConfig = null;
        LogFactory.getLog(ApiController.class).info("serialize object to json", e);
      }
    }

    if (StringUtils.hasText(apiNs)) {
      sb.append(apiNs).append(".");
    }
    sb.append(remotingApiVar).append(" = ");
    sb.append(jsonConfig);
    sb.append(";");

    List<PollingProvider> pollingProviders = remotingApi.getPollingProviders();
    if (!pollingProviders.isEmpty()) {

      if (debug) {
        sb.append("\n\n");
      }

      if (StringUtils.hasText(apiNs)) {
        sb.append(apiNs).append(".");
      }
      sb.append(pollingUrlsVar).append(" = {");
      if (debug) {
        sb.append("\n");
      }

      for (int i = 0; i < pollingProviders.size(); i++) {
        if (debug) {
          sb.append("  ");
        }

        sb.append("\"");
        sb.append(pollingProviders.get(i).getEvent());
        sb.append("\"");
        sb.append(" : \"").append(basePollUrl).append("/");
        sb.append(pollingProviders.get(i).getBeanName());
        sb.append("/");
        sb.append(pollingProviders.get(i).getMethod());
        sb.append("/");
        sb.append(pollingProviders.get(i).getEvent());
        sb.append("\"");
        if (i < pollingProviders.size() - 1) {
          sb.append(",");
          if (debug) {
            sb.append("\n");
          }
        }
      }
      if (debug) {
        sb.append("\n");
      }
      sb.append("};");
    }

    Map<String, List<String>> sseProviders = remotingApi.getSseProviders();
    if (!sseProviders.isEmpty()) {

      if (debug) {
        sb.append("\n\n");
      }
View Full Code Here

TOP

Related Classes of ch.ralscha.extdirectspring.bean.api.RemotingApi

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.