refine backport

This commit is contained in:
ccancellieri 2013-01-22 14:43:44 +01:00
parent 0978997f9f
commit 550f982701
3 changed files with 8 additions and 7 deletions

View File

@ -25,7 +25,7 @@
package it.geosolutions.geoserver.rest; package it.geosolutions.geoserver.rest;
import it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager; import it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager;
import it.geosolutions.geoserver.rest.manager.GeoServerRESTDataStoreManager; import it.geosolutions.geoserver.rest.manager.GeoServerRESTDatastoreManager;
import it.geosolutions.geoserver.rest.manager.GeoServerRESTStoreManager; import it.geosolutions.geoserver.rest.manager.GeoServerRESTStoreManager;
import java.net.MalformedURLException; import java.net.MalformedURLException;
@ -89,8 +89,8 @@ public class GeoServerRESTManager extends GeoServerRESTAbstractManager {
* *
* @Deprecated use {GeoServerRESTManager#getStoreManager()} * @Deprecated use {GeoServerRESTManager#getStoreManager()}
*/ */
public GeoServerRESTDataStoreManager getDatastoreManager() { public GeoServerRESTDatastoreManager getDatastoreManager() {
return (GeoServerRESTDataStoreManager) store; return (GeoServerRESTDatastoreManager) store;
} }
} }

View File

@ -36,6 +36,7 @@ import it.geosolutions.geoserver.rest.encoder.GSWorkspaceEncoder;
import it.geosolutions.geoserver.rest.encoder.coverage.GSCoverageEncoder; import it.geosolutions.geoserver.rest.encoder.coverage.GSCoverageEncoder;
import it.geosolutions.geoserver.rest.encoder.datastore.GSPostGISDatastoreEncoder; import it.geosolutions.geoserver.rest.encoder.datastore.GSPostGISDatastoreEncoder;
import it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder; import it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder;
import it.geosolutions.geoserver.rest.manager.GeoServerRESTStoreManager;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@ -874,7 +875,7 @@ public class GeoServerRESTPublisher {
/** /**
* Create a PostGIS datastore. * Create a PostGIS datastore.
* *
* @deprecated Will be deleted in next version 1.5.x, use {@link GeoServerRESTDatastoreManager} instead. * @deprecated Will be deleted in next version 1.6.x, use {@link GeoServerRESTStoreManager} instead.
* *
* @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the * @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the
* database. * database.
@ -883,7 +884,7 @@ public class GeoServerRESTPublisher {
* @return <TT>true</TT> if the PostGIS datastore has been successfully created, <TT>false</TT> otherwise * @return <TT>true</TT> if the PostGIS datastore has been successfully created, <TT>false</TT> otherwise
*/ */
public boolean createPostGISDatastore(String workspace, public boolean createPostGISDatastore(String workspace,
GSPostGISDatastoreEncoder datastoreEncoder) { it.geosolutions.geoserver.rest.encoder.GSPostGISDatastoreEncoder datastoreEncoder) {
String sUrl = restURL + "/rest/workspaces/" + workspace + "/datastores/"; String sUrl = restURL + "/rest/workspaces/" + workspace + "/datastores/";
String xml = datastoreEncoder.toString(); String xml = datastoreEncoder.toString();
String result = HTTPUtils.postXml(sUrl, xml, gsuser, gspass); String result = HTTPUtils.postXml(sUrl, xml, gsuser, gspass);

View File

@ -40,7 +40,7 @@ import java.net.URL;
* *
* @deprecated currently this is only a {@link GeoServerRESTStoreManager} wrapper for datastore * @deprecated currently this is only a {@link GeoServerRESTStoreManager} wrapper for datastore
*/ */
public class GeoServerRESTDataStoreManager extends GeoServerRESTStoreManager { public class GeoServerRESTDatastoreManager extends GeoServerRESTStoreManager {
/** /**
* Default constructor. * Default constructor.
@ -51,7 +51,7 @@ public class GeoServerRESTDataStoreManager extends GeoServerRESTStoreManager {
* @throws MalformedURLException * @throws MalformedURLException
* @throws IllegalArgumentException * @throws IllegalArgumentException
*/ */
public GeoServerRESTDataStoreManager(URL restURL, String username, String password) public GeoServerRESTDatastoreManager(URL restURL, String username, String password)
throws IllegalArgumentException, MalformedURLException { throws IllegalArgumentException, MalformedURLException {
super(restURL, username, password); super(restURL, username, password);
} }