client skeleton
This commit is contained in:
parent
838b6aa60a
commit
15eaa2009a
|
@ -20,7 +20,7 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>sdi-interface</artifactId>
|
||||
<artifactId>sdi-generic-client</artifactId>
|
||||
<groupId>org.gcube.spatial.data</groupId>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.spatial.data.clients.geoserver;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.spatial.data.sdi.model.faults.RemoteException;
|
||||
|
||||
public interface GSRESTClient {
|
||||
|
||||
|
||||
|
@ -9,20 +11,20 @@ public interface GSRESTClient {
|
|||
|
||||
// WS
|
||||
|
||||
public List<String> getWorkspaces();
|
||||
public List<String> getWorkspaces()throws RemoteException,Exception;
|
||||
|
||||
// DS
|
||||
public List<String> getDataStoresInWorkspace(String ws);
|
||||
public List<String> getDataStoresInWorkspace(String ws)throws RemoteException,Exception;
|
||||
|
||||
// SLD
|
||||
public List<String> getStyles();
|
||||
public List<String> getStylesInWorkspace(String ws);
|
||||
public List<String> getStylesByLayer(String layer);
|
||||
public List<String> getStyles()throws RemoteException,Exception;
|
||||
public List<String> getStylesInWorkspace(String ws)throws RemoteException,Exception;
|
||||
public List<String> getStylesByLayer(String layer)throws RemoteException,Exception;
|
||||
|
||||
// *********** CREATE OPS
|
||||
public void createWorkspace(String ws);
|
||||
public void createWorkspace(String ws)throws RemoteException,Exception;
|
||||
|
||||
public void createStyle(String name,String content);
|
||||
public void createStyle(String name,String content)throws RemoteException,Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,19 +2,80 @@ package org.gcube.spatial.data.clients.geoserver;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.client.WebTarget;
|
||||
|
||||
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 com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor;
|
||||
public class GSRESTClientImpl extends AbstractGenericClient implements GSRESTClient,GenericLoginClient{
|
||||
|
||||
public class GSRESTClientImpl implements GSRESTClient,GenericLoginClient{
|
||||
|
||||
private ConnectionDescriptor conn;
|
||||
WebTarget target=
|
||||
|
||||
public GSRESTClientImpl(ConnectionDescriptor desc) {
|
||||
this.conn=desc;
|
||||
protected GSRESTClientImpl(ConnectionDescriptor conn) {
|
||||
super(conn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void login() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void login(LoginLevel lvl) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWorkspaces() throws RemoteException,Exception {
|
||||
return makeCall(new Call<WebTarget, List<String>>() {
|
||||
|
||||
public java.util.List<String> call(WebTarget endpoint) throws Exception {
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue