Пример #1
0
 public String dumpRouteAsXml() throws Exception {
   String id = route.getId();
   RouteDefinition def = context.getRouteDefinition(id);
   if (def != null) {
     return ModelHelper.dumpModelAsXml(def);
   }
   return null;
 }
Пример #2
0
  public String dumpRoutesAsXml() throws Exception {
    List<RouteDefinition> routes = context.getRouteDefinitions();
    if (routes.isEmpty()) {
      return null;
    }

    // use a routes definition to dump the routes
    RoutesDefinition def = new RoutesDefinition();
    def.setRoutes(routes);
    return ModelHelper.dumpModelAsXml(context, def);
  }