All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ec.gob.senescyt.sniese.commons.clients.ServicioGeograficoCliente Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package ec.gob.senescyt.sniese.commons.clients;

import com.fasterxml.jackson.databind.JsonNode;
import ec.gob.senescyt.sniese.commons.security.PrincipalProvider;

public class ServicioGeograficoCliente extends AbstractServicioCliente implements ServicioCliente {
    private static final String URL_PARA_OBTENER_PAIS = "paises/";
    private static final String URL_PARA_OBTENER_PAIS_SECUENCIAL = "paises/secuencial/";
    private static final String URL_PARA_OBTENER_CIUDAD = "ciudades/";
    private static final String URL_PARA_OBTENER_CANTONES = "cantones";

    public ServicioGeograficoCliente(ServicioFactory factory, PrincipalProvider principalProvider) {
        super(factory, principalProvider);
    }

    public JsonNode obtenerPaisConId(String idPais) {
        return get(URL_PARA_OBTENER_PAIS + idPais, null).getEntity(JsonNode.class);
    }

    public JsonNode obtenerPaisConSecuencial(Long secuencialPais) {
        return get(URL_PARA_OBTENER_PAIS_SECUENCIAL + secuencialPais, null).getEntity(JsonNode.class);
    }

    public JsonNode obtenerCantones() {
        return get(URL_PARA_OBTENER_CANTONES, null).getEntity(JsonNode.class);
    }

    public JsonNode obtenerCiudadConId(String id) {
        return get(URL_PARA_OBTENER_CIUDAD + id, null).getEntity(JsonNode.class);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy