Removing config and coverageName from publishWorldImage.
This commit is contained in:
parent
ee75f7138e
commit
b12a7fb0a5
@ -1522,21 +1522,12 @@ public class GeoServerRESTPublisher {
|
|||||||
* @param workspace Workspace to use
|
* @param workspace Workspace to use
|
||||||
* @param coveragestore Name of the coveragestore
|
* @param coveragestore Name of the coveragestore
|
||||||
* @param zipFile zip file to upload
|
* @param zipFile zip file to upload
|
||||||
* @param configure Configure parameter. It may be null.
|
|
||||||
* @param coverageName coverageName parameter to append. Only works if configure is set. It may be null.
|
|
||||||
* @return true if the operation completed successfully.
|
* @return true if the operation completed successfully.
|
||||||
*/
|
*/
|
||||||
public boolean publishWorldimage(String workspace, String coveragestore, File zipFile, String configure, String coverageName) throws FileNotFoundException {
|
public boolean publishWorldimage(String workspace, String coveragestore, File zipFile) throws FileNotFoundException {
|
||||||
// build full URL
|
// build full URL
|
||||||
StringBuilder sbUrl = new StringBuilder(restURL).append("/rest/workspaces/").append(workspace).append("/coveragestores/").append(coveragestore)
|
StringBuilder sbUrl = new StringBuilder(restURL).append("/rest/workspaces/").append(workspace).append("/coveragestores/").append(coveragestore)
|
||||||
.append("/file.worldimage");
|
.append("/file.worldimage");
|
||||||
|
|
||||||
if ( configure != null && coverageName != null) {
|
|
||||||
sbUrl.append("?configure").append(configure);
|
|
||||||
if ( coverageName != null) {
|
|
||||||
sbUrl.append("&coverageName=").append(coverageName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String sentResult = HTTPUtils.put(sbUrl.toString(), zipFile, "application/zip", gsuser, gspass);
|
String sentResult = HTTPUtils.put(sbUrl.toString(), zipFile, "application/zip", gsuser, gspass);
|
||||||
boolean fileSent = sentResult != null;
|
boolean fileSent = sentResult != null;
|
||||||
|
|||||||
@ -478,7 +478,7 @@ public class GeoserverRESTPublisherTest extends GeoserverRESTTest {
|
|||||||
File worldImageFile = new ClassPathResource("testdata/worldimagetest.zip").getFile();
|
File worldImageFile = new ClassPathResource("testdata/worldimagetest.zip").getFile();
|
||||||
|
|
||||||
// test publish
|
// test publish
|
||||||
boolean wp = publisher.publishWorldimage(DEFAULT_WS, storeName, worldImageFile, null, null);
|
boolean wp = publisher.publishWorldimage(DEFAULT_WS, storeName, worldImageFile);
|
||||||
assertTrue("Publish worldfile failed.",wp);
|
assertTrue("Publish worldfile failed.",wp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user