94 lines
2.1 KiB
Java
94 lines
2.1 KiB
Java
package org.gcube.spatial.data.clients.geoserver;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.ws.rs.client.WebTarget;
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
import org.gcube.common.clients.Call;
|
|
import org.gcube.spatial.data.clients.AbstractGenericClient;
|
|
import org.gcube.spatial.data.clients.GenericLoginClient;
|
|
import org.gcube.spatial.data.clients.model.ConnectionDescriptor;
|
|
import org.gcube.spatial.data.sdi.model.faults.RemoteException;
|
|
import org.gcube.spatial.data.sdi.model.gn.LoginLevel;
|
|
import org.json.simple.JSONArray;
|
|
import org.json.simple.JSONObject;
|
|
|
|
public class GSRESTClientImpl extends AbstractGenericClient implements GSRESTClient,GenericLoginClient{
|
|
|
|
protected GSRESTClientImpl(ConnectionDescriptor conn) {
|
|
super(conn);
|
|
// localhost:8080/geoserver/rest
|
|
}
|
|
|
|
@Override
|
|
public void login() {
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
@Override
|
|
public void login(LoginLevel lvl) {
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
@Override
|
|
public JSONArray getWorkspaces() throws RemoteException,Exception {
|
|
return makeCall(new Call<WebTarget, JSONArray>() {
|
|
|
|
public JSONArray call(WebTarget endpoint) throws Exception {
|
|
return check(endpoint.path("workspace").request(MediaType.APPLICATION_JSON).get(),JSONArray.class);
|
|
};
|
|
|
|
});
|
|
}
|
|
|
|
@Override
|
|
public JSONObject getWorkspace(String workspace) throws RemoteException, Exception {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public List<String> getDataStoresInWorkspace(String ws) {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public List<String> getStyles() {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public List<String> getStylesInWorkspace(String ws) {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public List<String> getStylesByLayer(String layer) {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public void createWorkspace(String ws) {
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
@Override
|
|
public void createStyle(String name, String content) {
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|