diff --git a/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java b/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java index 374bc8b..5503b27 100644 --- a/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java +++ b/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java @@ -1691,7 +1691,43 @@ public class GeoServerRESTPublisher { return publishCoverage(workspace, coveragestore, CoverageStoreExtension.WORLDIMAGE, "application/zip", zipFile, configure, params); } + + /** + * Publish a external worldimage file. + * + * @param workspace Workspace to use + * @param coveragestore Name of the coveragestore + * @param fileUri the uri of the file containing the WorldImage. + * @param configure Configure parameter. See {@link ParameterConfigure}. It can be null. + * @param params parameters to append to the url (can be null).
+ * Accepted parameters are: + * + * @return true if the operation completed successfully. + */ + public boolean publishWorldImage(String workspace, String coveragestore, URI fileURI, + ParameterConfigure configure, NameValuePair... params) throws FileNotFoundException { + + return createCoverageStore(workspace, coveragestore, UploadMethod.EXTERNAL, CoverageStoreExtension.WORLDIMAGE, + "text/plain", fileURI, configure, params); + + } + /** + * Publish a external worldimage file. + * + * @param workspace Workspace to use + * @param coveragestore Name of the coveragestore + * @param fileUri the uri of the file containing the WorldImage. + * @return true if the operation completed successfully. + */ + public boolean publishWorldImage(String workspace, String coveragestore, URI fileURI) throws FileNotFoundException { + return createCoverageStore(workspace, coveragestore, UploadMethod.EXTERNAL, CoverageStoreExtension.WORLDIMAGE, + "text/plain", fileURI, ParameterConfigure.FIRST, (NameValuePair) null); + + } + // ========================================================================== // === MOSAIC // ==========================================================================