Removing config and coverageName from publishWorldImage.
This commit is contained in:
parent
ee75f7138e
commit
b12a7fb0a5
@ -1522,22 +1522,13 @@ public class GeoServerRESTPublisher {
|
||||
* @param workspace Workspace to use
|
||||
* @param coveragestore Name of the coveragestore
|
||||
* @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.
|
||||
*/
|
||||
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
|
||||
StringBuilder sbUrl = new StringBuilder(restURL).append("/rest/workspaces/").append(workspace).append("/coveragestores/").append(coveragestore)
|
||||
.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);
|
||||
boolean fileSent = sentResult != null;
|
||||
|
||||
|
||||
@ -478,7 +478,7 @@ public class GeoserverRESTPublisherTest extends GeoserverRESTTest {
|
||||
File worldImageFile = new ClassPathResource("testdata/worldimagetest.zip").getFile();
|
||||
|
||||
// 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);
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user