Package com.lbslocal.master.common

Examples of com.lbslocal.master.common.ConfigurationManager


public class ControlAPI {

   
  public static String getLBSAPI(Proxy proxy, TokenValidated tokenValidated) {
    ConfigurationManager cm = ConfigurationManager.getInstance();
   
    String API_VERSION = com.lbslocal.api.utils.ConfigurationManager.getInstance().getAppSettings("M_VERSION");
      String AKAMAI_VERSION = com.lbslocal.api.utils.ConfigurationManager.getInstance().getAppSettings("M_MAP_VERSION");
     
      String SERVICES_SERVER = cm.getAppSettings("M_SERVER");
      String MAP_SERVER = cm.getAppSettings("M_MAP_SERVER");
      String API_JSCRIPT_SERVER = cm.getAppSettings("M_SERVER_API_GZ");
      String MAQUINA = cm.getAppSettings("MAQUINA");
      String SCR_SERVER = cm.getAppSettings("M_SCR_SERVER");
      String MAP_SERVER_DG = cm.getAppSettings("M_MAP_SERVER_DG");
   
      ControlTraffic ct = ControlTraffic.getInstance();
     
    String mTrafficUpdate = ct.getTraffic();
   
View Full Code Here


 
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    try
    {
      ConfigurationManager cm = ConfigurationManager.getInstance();
     
      int id_licenca = Integer.parseInt(cm.getAppSettings("ID"));
     

     
      CMapRenderAPI cMr = new CMapRenderAPI(
          cm.getAppSettings("MAQUINA"),
          cm.getAppSettings("SERVER"),
          11188,
          cm.getAppSettings("PATH_FILE_IMAGES"),
          cm.getAppSettings("WEBOUTPUT"),
          cm.getAppSettings("M_BASEDECARTA_MAPAS"));
     
      CommonRest cr = new CommonRest();
     
      PostHelper ph = cr.getDataFromPost(request);
     
View Full Code Here

  }

  // Modificado para nao acessar banco
  public static Country getCountryByDataBase(String dataB) {

    ConfigurationManager cm = ConfigurationManager.getInstance();

    return new Country(cm.getAppSettings("DATABASE_SOURCE_RUAS"), cm.getAppSettings("COUNTRY"));
  }
View Full Code Here

    return new Country(cm.getAppSettings("DATABASE_SOURCE_RUAS"), cm.getAppSettings("COUNTRY"));
  }

  // Modificado para nao acessar banco
  public static Country getDataBase(int idLicenca, String country) throws SQLException {
    ConfigurationManager cm = ConfigurationManager.getInstance();

    return new Country(cm.getAppSettings("DATABASE_SOURCE_RUAS"), cm.getAppSettings("COUNTRY"));

  }
View Full Code Here

    return mi;
  }

  String insertPointsInMap(MapOptions mo, MapInfo mi, String file, String mapType) {
    String urlRetorno = "";
    ConfigurationManager cm = ConfigurationManager.getInstance();
    String image = cm.getAppSettings("PATH_FILE_IMAGES") + "/images/";
    if (mo.getIcon() != null) {
      try {
        BufferedImage original = null;
        original = ImageIO.read(new File(file));
       
View Full Code Here

public class dataBase {
  public static String status = "";

  public static Connection getConnection(String dataBase) {
    Connection conn = null;
    ConfigurationManager cm = ConfigurationManager.getInstance();
    try {
     
      Class.forName(cm.getAppSettings("DB_DRIVER_NAME")).newInstance();
     
     
//      String t = "jdbc:mysql://200.186.101.150/%s?useUnicode=true&characterEncoding=UTF-8";
//      conn = DriverManager.getConnection(String.format(t, dataBase),
//              "root",
//              "lbs@@#1");
     
      conn = DriverManager.getConnection(String.format(cm.getAppSettings("DB_URI"), dataBase),
          cm.getAppSettings("DB_USER"),
          cm.getAppSettings("DB_PASSWORD"));

      status = "Connection opened";
    } catch (SQLException e) {
      status += e.getMessage();
    } catch (ClassNotFoundException e) {
View Full Code Here

  public AddressFinder() {
    super();
  }

  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ConfigurationManager cm = ConfigurationManager.getInstance();

    CAddressFinderAPI cAf = new CAddressFinderAPI(cm.getAppSettings("MAQUINA"), cm.getAppSettings("SERVER"), 11188, cm.getAppSettings("OUTPUT"),
        cm.getAppSettings("DNS"), cm.getAppSettings("M_BASEDECARTA_MAPA"), cm.getAppSettings("M_BASEDECARTA_REVGEO"));

    CommonRest cr = new CommonRest();

    Point point = new Point(Double.parseDouble(request.getParameter("lng")), Double.parseDouble(request.getParameter("lat")));
    Double tolerance = 50D;
    AddressLocation al = new AddressLocation();

    try {
      al = cAf.getAddress(point, tolerance, Integer.parseInt(cm.getAppSettings("ID")));
    } catch (Exception e) {
      e.printStackTrace();
    }

    ObjectsHelper[] dependencyObjects = new ObjectsHelper[3];
View Full Code Here

  }

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try {
      ConfigurationManager cm = ConfigurationManager.getInstance();
     
      int id_licenca = Integer.parseInt(cm.getAppSettings("ID"));
     
      CAddressFinderAPI cAf = new CAddressFinderAPI(cm.getAppSettings("MAQUINA"), cm.getAppSettings("SERVER"), 11188, cm
          .getAppSettings("OUTPUT"), cm.getAppSettings("DNS"), cm.getAppSettings("M_BASEDECARTA_MAPA"), cm
          .getAppSettings("M_BASEDECARTA_REVGEO"));

      CommonRest cr = new CommonRest();

      PostHelper ph = cr.getDataFromPost(request);
View Full Code Here

 
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    try
    {
      ConfigurationManager cm = ConfigurationManager.getInstance();
      int id_licenca = Integer.parseInt(cm.getAppSettings("ID"));
     
      CRouteAPI cRoute = new CRouteAPI(
          cm.getAppSettings("MAQUINA"),
          cm.getAppSettings("SERVER"),
          11188,
          cm.getAppSettings("OUTPUT"),
          cm.getAppSettings("DNS"),
          cm.getAppSettings("M_BASEDECARTA_ROTAS"),
          cm.getAppSettings("M_BASEDECARTA_MAPAS"));
     
      CommonRest cr = new CommonRest();
     
      PostHelper ph = cr.getDataFromPost(request);
     
View Full Code Here

    fos.close();
  }

  public static TokenValidated ValidateUser(Proxy proxy) throws Exception {
    ConfigurationManager cm = ConfigurationManager.getInstance();
    TokenValidated token = new TokenValidated(Boolean.parseBoolean(cm.getAppSettings("ATIVO")), cm.getAppSettings("ID"), Integer.parseInt(cm.getAppSettings("CLIENTTYPE")));
    Common.ValidateStatusToken(token);

    return token;
  }
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.