Package com.lbslocal.master.common

Examples of com.lbslocal.master.common.ConfigurationManager


  public static String runService(Proxy proxy, TokenValidated tk) throws Exception {
    String respostaWs = "";
        Object[] o;
        ProximityInfo pInfo;
       
        ConfigurationManager cm = ConfigurationManager.getInstance();
       
        CProximity cProximity = new CProximity(cm.getAppSettings("Maquina"), "");

        switch (getService(proxy.GetService()))
        {
            case findClosestFromAddress:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Address.class, ProximityOptions.class });
View Full Code Here


  public static String runService(Proxy proxy, TokenValidated tk) throws Exception {
    String respostaWs = "";
    Object[] o;

    ConfigurationManager cm = ConfigurationManager.getInstance();
    CAddressFinderAPI addressFinder = new CAddressFinderAPI(cm.getAppSettings("Maquina"), cm.getAppSettings("Server"), 11188, cm
        .getAppSettings("dirOutPut"), cm.getAppSettings("webOutPut"), cm.getAppSettings("M_BASEDECARTA_MAPAS"), cm
        .getAppSettings("M_BASEDECARTA_REVGEO"));

    switch (getService(proxy.GetService())) {
    case findAddress:
      o = Common.getArrayByJSon(proxy.getParameters("tjss").toString(), new Class[] { Address.class, AddressOptions.class });
View Full Code Here

  public static String runService(Proxy proxy, TokenValidated tk) throws Exception {
    Object[] o;
    MapInfo mInfo;
    String respostaWs = "";
    ConfigurationManager cm = ConfigurationManager.getInstance();
    CMapRenderAPI mapRender = new CMapRenderAPI(cm.getAppSettings("Maquina"), cm.getAppSettings("Server"), 11188, cm.getAppSettings("dirOutPut"),
        cm.getAppSettings("webOutPut"), cm.getAppSettings("M_BASEDECARTA_MAPAS"));

    switch (getService(proxy.GetService())) {
    case getMap:
      o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { String.class, Extent.class, MapOptions.class });
      mInfo = mapRender.getMap((String) o[0], (Extent) o[1], (MapOptions) o[2], tk.getId());
View Full Code Here

        if (proxy.GetService().indexOf("Rodoviaria") > -1)
        {
            plusRodoviaria = "_RODOVIARIA";
            proxy.setService(proxy.GetService().replace("Rodoviaria", ""));
        }
        ConfigurationManager cm = ConfigurationManager.getInstance();
       
        CRouteAPI route = new CRouteAPI(
            cm.getAppSettings("Maquina"),
            cm.getAppSettings("Server"),
              11188,
              cm.getAppSettings("dirOutPut"),
              cm.getAppSettings("webOutPut"),
              cm.getAppSettings("M_BASEDECARTA_ROTAS" + plusRodoviaria),
              cm.getAppSettings("M_BASEDECARTA_MAPAS" + plusRodoviaria)
        );
        switch (getService(proxy.GetService()))
        {
            case getRoute:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                RouteInfo ri = route.getRoute((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(ri);
                break;
            case getRouteTotals:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                RouteTotals rt = route.getRouteTotals((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(rt);
                break;
            case getRouteDescription:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                SegmentDescription[] sd = route.getRouteDescription((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(sd);
                break;
            case getRouteWithMap:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class, MapOptions.class });
                RouteInfo rwm = route.getRouteWithMap((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], (MapOptions)o[2], tk.getId());
                respostaWs = Common.SerializeJSObject(rwm);
                break;
            case getRouteSummary:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                RouteSummary[] rs = route.getRouteSummary((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(rs);
                break;
            case setRouteFence:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { String.class, Double.class });
               
                boolean rotaSelecionada = route.setRouteFence((String)o[0],((Double)o[1]), tk.getId());
                respostaWs = Common.SerializeJSObject(rotaSelecionada);
                break;
            case checkFence:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { String.class, Point.class });
                boolean dentro = route.checkFence((String)o[0], (Point)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(dentro);
                break;
            case getCoords:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { String.class, String.class, String.class });

                Extent ext = new Extent();
                MapSize msz = new MapSize();
                String idroute = (String)o[0];
                String ex = (String)o[1];
                String ms = (String)o[2];
                ext.setXMin(Double.parseDouble(ex.split(Pattern.quote("|"))[0].replace(",", ".")));
                ext.setXMax(Double.parseDouble(ex.split(Pattern.quote("|"))[1].replace(",", ".")));
                ext.setYMin(Double.parseDouble(ex.split(Pattern.quote("|"))[2].replace(",", ".")));
                ext.setYMax(Double.parseDouble(ex.split(Pattern.quote("|"))[3].replace(",", ".")));
                
                msz.setWidth(Integer.parseInt(ms.split(Pattern.quote("|"))[0].toString()));
                msz.setHeight(Integer.parseInt(ms.split(Pattern.quote("|"))[1].toString()));
               
                //CommonControls.
                respostaWs = route.getRouteCoords(idroute, ext, msz, tk.getId(), cm.getAppSettings("M_BASEDECARTA_ROTAS" + plusRodoviaria));
                break;
            case getCoordsFull:
                //o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { String) });

//                CommonRouteDeCarta croute = new CommonRouteDeCarta(cm.getAppSettings("Maquina"),
View Full Code Here

TOP

Related Classes of com.lbslocal.master.common.ConfigurationManager

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.