nl.pdok.workspacebuilder.GeoserverRestProxy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geoserver-workspace-builder Show documentation
Show all versions of geoserver-workspace-builder Show documentation
PDOK Geoserver Workspace Builder
The newest version!
package nl.pdok.workspacebuilder;
import it.geosolutions.geoserver.rest.GeoServerRESTManager;
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
import it.geosolutions.geoserver.rest.GeoServerRESTReader;
import java.net.MalformedURLException;
import java.net.URL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GeoserverRestProxy {
final static Logger logger = LoggerFactory.getLogger(GeoserverRestProxy.class);
private GeoServerRESTReader reader;
private GeoServerRESTPublisher publisher;
private GeoServerRESTManager manager;
public GeoserverRestProxy(String geoserverUrl, String geoserverUser, String geoserverPassword) {
try {
reader = new GeoServerRESTReader(geoserverUrl, geoserverUser, geoserverPassword);
publisher = new GeoServerRESTPublisher(geoserverUrl, geoserverUser, geoserverPassword);
manager = new GeoServerRESTManager(new URL(geoserverUrl), geoserverUser, geoserverPassword);
} catch (MalformedURLException malformedURLException) {
logger.error("Error creating GeoserverREST communication objects: " + malformedURLException.getMessage());
}
}
public GeoServerRESTReader getReader() {
return reader;
}
public GeoServerRESTPublisher getPublisher() {
return publisher;
}
public GeoServerRESTManager getManager() {
return manager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy