Stile publication improvements to fix #3. ImageMosaic publication added. GeoTiff publication fixed. Added JUnit tests.
This commit is contained in:
parent
f62164b37b
commit
69ff7aad61
@ -131,8 +131,47 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return <TT>true</TT> if the operation completed successfully.
|
* @return <TT>true</TT> if the operation completed successfully.
|
||||||
*/
|
*/
|
||||||
public boolean publishStyle(String sldBody) {
|
public boolean publishStyle(String sldBody) {
|
||||||
String sUrl = restURL + "/rest/styles";
|
try {
|
||||||
String result = HTTPUtils.post(sUrl, sldBody,
|
return publishStyle(sldBody,null);
|
||||||
|
} catch (IllegalArgumentException e){
|
||||||
|
if (LOGGER.isEnabledFor(Level.ERROR)){
|
||||||
|
LOGGER.error(e.getLocalizedMessage(),e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store and publish an SLD.
|
||||||
|
* <P>
|
||||||
|
* This is the equivalent call with cUrl:
|
||||||
|
*
|
||||||
|
* <PRE>
|
||||||
|
* {@code curl -u admin:geoserver -XPOST \
|
||||||
|
* -H 'Content-type: application/vnd.ogc.sld+xml' \
|
||||||
|
* -d @$FULLSLD \
|
||||||
|
* http://$GSIP:$GSPORT/$SERVLET/rest/styles?name=name}
|
||||||
|
* </PRE>
|
||||||
|
*
|
||||||
|
* @param sldBody
|
||||||
|
* the SLD document as an XML String.
|
||||||
|
* @param name
|
||||||
|
* the Style name (can be null).
|
||||||
|
*
|
||||||
|
* @return <TT>true</TT> if the operation completed successfully.
|
||||||
|
* @throws IllegalArgumentException
|
||||||
|
* if the style body is null or empty
|
||||||
|
*/
|
||||||
|
public boolean publishStyle(final String sldBody, final String name) throws IllegalArgumentException {
|
||||||
|
if (sldBody==null || sldBody.isEmpty()){
|
||||||
|
throw new IllegalArgumentException("The style body may not be null or empty");
|
||||||
|
}
|
||||||
|
StringBuilder sUrl = new StringBuilder(restURL);
|
||||||
|
sUrl.append("/rest/styles");
|
||||||
|
if (name!=null && !name.isEmpty()){
|
||||||
|
sUrl.append("?name=").append(name);
|
||||||
|
}
|
||||||
|
final String result = HTTPUtils.post(sUrl.toString(), sldBody,
|
||||||
"application/vnd.ogc.sld+xml", gsuser, gspass);
|
"application/vnd.ogc.sld+xml", gsuser, gspass);
|
||||||
return result != null;
|
return result != null;
|
||||||
}
|
}
|
||||||
@ -161,7 +200,7 @@ public class GeoServerRESTPublisher {
|
|||||||
*/
|
*/
|
||||||
public boolean publishStyle(File sldFile, String name) {
|
public boolean publishStyle(File sldFile, String name) {
|
||||||
String sUrl = restURL + "/rest/styles";
|
String sUrl = restURL + "/rest/styles";
|
||||||
if (name != null) {
|
if (name != null && !name.isEmpty()) {
|
||||||
sUrl += "?name=" + encode(name);
|
sUrl += "?name=" + encode(name);
|
||||||
}
|
}
|
||||||
LOGGER.debug("POSTing new style " + name + " to " + sUrl);
|
LOGGER.debug("POSTing new style " + name + " to " + sUrl);
|
||||||
@ -170,6 +209,43 @@ public class GeoServerRESTPublisher {
|
|||||||
return result != null;
|
return result != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a Style.<br>
|
||||||
|
*
|
||||||
|
* The Style will be unpublished and the related SLD file will be removed
|
||||||
|
* (if purge==true).<br>
|
||||||
|
*
|
||||||
|
* @param styleName
|
||||||
|
* the name of the Style to remove.
|
||||||
|
* @param purge
|
||||||
|
* and the related SLD file will be removed.
|
||||||
|
*
|
||||||
|
* @return <TT>true</TT> if the operation completed successfully.
|
||||||
|
* @throws IllegalArgumentException
|
||||||
|
* if styleName is null or empty
|
||||||
|
*/
|
||||||
|
public boolean removeStyle(String styleName, final boolean purge)
|
||||||
|
throws IllegalArgumentException {
|
||||||
|
if (styleName == null || styleName.isEmpty())
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Check styleName parameter, it may never be null or empty");
|
||||||
|
|
||||||
|
final StringBuffer sUrl = new StringBuffer(restURL);
|
||||||
|
|
||||||
|
// check style name
|
||||||
|
// TODO may we whant to throw an exception instead of
|
||||||
|
// change style name?
|
||||||
|
styleName = styleName.replaceAll(":", "_");
|
||||||
|
styleName = encode(styleName);
|
||||||
|
|
||||||
|
sUrl.append("/rest/styles/").append(styleName);
|
||||||
|
if (purge) {
|
||||||
|
sUrl.append("?purge=true");
|
||||||
|
}
|
||||||
|
|
||||||
|
return HTTPUtils.delete(sUrl.toString(), gsuser, gspass);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a Style.
|
* Remove a Style.
|
||||||
* <P>
|
* <P>
|
||||||
@ -181,10 +257,14 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return <TT>true</TT> if the operation completed successfully.
|
* @return <TT>true</TT> if the operation completed successfully.
|
||||||
*/
|
*/
|
||||||
public boolean removeStyle(String styleName) {
|
public boolean removeStyle(String styleName) {
|
||||||
styleName = styleName.replaceAll(":", "_"); // ???
|
try {
|
||||||
styleName = encode(styleName); // spaces may
|
return removeStyle(styleName, true);
|
||||||
String sUrl = restURL + "/rest/styles/" + styleName + "?purge=true";
|
} catch (IllegalArgumentException e){
|
||||||
return HTTPUtils.delete(sUrl, gsuser, gspass);
|
if (LOGGER.isEnabledFor(Level.ERROR)){
|
||||||
|
LOGGER.error(e.getLocalizedMessage(),e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@ -381,9 +461,6 @@ public class GeoServerRESTPublisher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link publishDBLayer(final String workspace, final
|
|
||||||
* String storename, final GSFeatureTypeEncoder fte, final
|
|
||||||
* GSLayerEncoder layerEncoder)}
|
|
||||||
* @param workspace
|
* @param workspace
|
||||||
* @param storename
|
* @param storename
|
||||||
* @param layername
|
* @param layername
|
||||||
@ -553,16 +630,16 @@ public class GeoServerRESTPublisher {
|
|||||||
* parameters to append to the url (can be null).<br>
|
* parameters to append to the url (can be null).<br>
|
||||||
* Accepted parameters are:
|
* Accepted parameters are:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>
|
* <li> <b>coverageName=name</b> coverageName parameter to
|
||||||
* <b>coverageName=name</b> coverageName parameter to append. Only
|
* append. Only works if configure is not set to
|
||||||
* works if configure is not set to ParameterConfigure.NONE.
|
* ParameterConfigure.NONE. </li>
|
||||||
* </li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* @see #{@link ParameterConfigure}
|
* @see #{@link ParameterConfigure}
|
||||||
* @return true if the operation completed successfully.
|
* @return true if the operation completed successfully.
|
||||||
*/
|
*/
|
||||||
private boolean publishCoverage(String workspace, String coveragestore, String format, String mimeType,
|
private boolean publishCoverage(String workspace, String coveragestore,
|
||||||
File file, ParameterConfigure configure, NameValuePair... params)
|
String format, String mimeType, File file,
|
||||||
|
ParameterConfigure configure, NameValuePair... params)
|
||||||
throws FileNotFoundException {
|
throws FileNotFoundException {
|
||||||
// build full URL
|
// build full URL
|
||||||
StringBuilder sbUrl = new StringBuilder(restURL)
|
StringBuilder sbUrl = new StringBuilder(restURL)
|
||||||
@ -572,21 +649,20 @@ public class GeoServerRESTPublisher {
|
|||||||
|
|
||||||
if (configure != null) {
|
if (configure != null) {
|
||||||
sbUrl.append("?configure=").append(configure);
|
sbUrl.append("?configure=").append(configure);
|
||||||
if (params!= null && !configure.equals(ParameterConfigure.NONE)){
|
if (params != (NameValuePair[])null && !configure.equals(ParameterConfigure.NONE)) {
|
||||||
final String paramString = appendParameters(params);
|
final String paramString = appendParameters(params);
|
||||||
if (!paramString.isEmpty()) {
|
if (!paramString.isEmpty()) {
|
||||||
sbUrl.append("&").append(paramString);
|
sbUrl.append("&").append(paramString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String sentResult = HTTPUtils.put(sbUrl.toString(), file,
|
String sentResult = HTTPUtils.put(sbUrl.toString(), file, mimeType,
|
||||||
mimeType, gsuser, gspass);
|
gsuser, gspass);
|
||||||
boolean fileSent = sentResult != null;
|
boolean fileSent = sentResult != null;
|
||||||
|
|
||||||
if (fileSent) {
|
if (fileSent) {
|
||||||
if (LOGGER.isInfoEnabled())
|
if (LOGGER.isInfoEnabled())
|
||||||
LOGGER.info("File successfully uploaded ( " + file
|
LOGGER.info("File successfully uploaded ( " + file + ")");
|
||||||
+ ")");
|
|
||||||
} else {
|
} else {
|
||||||
if (LOGGER.isEnabledFor(Level.WARN))
|
if (LOGGER.isEnabledFor(Level.WARN))
|
||||||
LOGGER.warn("Error in sending file " + file);
|
LOGGER.warn("Error in sending file " + file);
|
||||||
@ -615,7 +691,9 @@ public class GeoServerRESTPublisher {
|
|||||||
*/
|
*/
|
||||||
public boolean publishGeoTIFF(String workspace, String storeName,
|
public boolean publishGeoTIFF(String workspace, String storeName,
|
||||||
File geotiff) throws FileNotFoundException {
|
File geotiff) throws FileNotFoundException {
|
||||||
return publishCoverage(workspace, storeName, "geotiff", "image/geotiff", geotiff, ParameterConfigure.FIRST, (NameValuePair[])null);
|
return publishCoverage(workspace, storeName, "geotiff",
|
||||||
|
"image/geotiff", geotiff, ParameterConfigure.FIRST,
|
||||||
|
(NameValuePair[]) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -687,9 +765,10 @@ public class GeoServerRESTPublisher {
|
|||||||
/**
|
/**
|
||||||
* {@link #publishWorldImage(String, String, File, ParameterConfigure, NameValuePair...)}
|
* {@link #publishWorldImage(String, String, File, ParameterConfigure, NameValuePair...)}
|
||||||
*/
|
*/
|
||||||
public boolean publishWorldImage(String workspace, String coveragestore, File zipFile)
|
public boolean publishWorldImage(String workspace, String coveragestore,
|
||||||
throws FileNotFoundException {
|
File zipFile) throws FileNotFoundException {
|
||||||
return publishWorldImage(workspace, coveragestore, zipFile, ParameterConfigure.FIRST,(NameValuePair)null);
|
return publishWorldImage(workspace, coveragestore, zipFile,
|
||||||
|
ParameterConfigure.FIRST, (NameValuePair) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -720,10 +799,9 @@ public class GeoServerRESTPublisher {
|
|||||||
* parameters to append to the url (can be null).<br>
|
* parameters to append to the url (can be null).<br>
|
||||||
* Accepted parameters are:
|
* Accepted parameters are:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>
|
* <li> <b>coverageName=name</b> coverageName parameter to
|
||||||
* <b>coverageName=name</b> coverageName parameter to append. Only
|
* append. Only works if configure is not set to
|
||||||
* works if configure is not set to ParameterConfigure.NONE.
|
* ParameterConfigure.NONE. </li>
|
||||||
* </li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* @see #{@link ParameterConfigure}
|
* @see #{@link ParameterConfigure}
|
||||||
* @return true if the operation completed successfully.
|
* @return true if the operation completed successfully.
|
||||||
@ -731,10 +809,10 @@ public class GeoServerRESTPublisher {
|
|||||||
public boolean publishWorldImage(String workspace, String coveragestore,
|
public boolean publishWorldImage(String workspace, String coveragestore,
|
||||||
File zipFile, ParameterConfigure configure, NameValuePair... params)
|
File zipFile, ParameterConfigure configure, NameValuePair... params)
|
||||||
throws FileNotFoundException {
|
throws FileNotFoundException {
|
||||||
return publishCoverage(workspace, coveragestore, "worldimage", "application/zip", zipFile, configure, params);
|
return publishCoverage(workspace, coveragestore, "worldimage",
|
||||||
|
"application/zip", zipFile, configure, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// === MOSAIC
|
// === MOSAIC
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@ -746,7 +824,9 @@ public class GeoServerRESTPublisher {
|
|||||||
*/
|
*/
|
||||||
public boolean publishImageMosaic(String workspace, String storeName,
|
public boolean publishImageMosaic(String workspace, String storeName,
|
||||||
File zipFile) throws FileNotFoundException {
|
File zipFile) throws FileNotFoundException {
|
||||||
return publishCoverage(workspace, storeName, "imagemosaic", "application/zip", zipFile, ParameterConfigure.FIRST, (NameValuePair[])null);
|
return publishCoverage(workspace, storeName, "imagemosaic",
|
||||||
|
"application/zip", zipFile, ParameterConfigure.FIRST,
|
||||||
|
(NameValuePair[]) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -755,8 +835,10 @@ public class GeoServerRESTPublisher {
|
|||||||
* @see {@link #publishWorldImage(String, String, File, ParameterConfigure, NameValuePair...)}
|
* @see {@link #publishWorldImage(String, String, File, ParameterConfigure, NameValuePair...)}
|
||||||
*/
|
*/
|
||||||
public boolean publishImageMosaic(String workspace, String storeName,
|
public boolean publishImageMosaic(String workspace, String storeName,
|
||||||
File zipFile, ParameterConfigure configure, NameValuePair... params) throws FileNotFoundException {
|
File zipFile, ParameterConfigure configure, NameValuePair... params)
|
||||||
return publishCoverage(workspace, storeName, "imagemosaic", "application/zip", zipFile, configure, params);
|
throws FileNotFoundException {
|
||||||
|
return publishCoverage(workspace, storeName, "imagemosaic",
|
||||||
|
"application/zip", zipFile, configure, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1447,6 +1529,7 @@ public class GeoServerRESTPublisher {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows to configure some layer attributes such and DefaultStyle
|
* Allows to configure some layer attributes such and DefaultStyle
|
||||||
|
*
|
||||||
* @TODO WmsPath
|
* @TODO WmsPath
|
||||||
*/
|
*/
|
||||||
public boolean configureLayer(final String workspace,
|
public boolean configureLayer(final String workspace,
|
||||||
@ -1663,11 +1746,36 @@ public class GeoServerRESTPublisher {
|
|||||||
if (params != null) {
|
if (params != null) {
|
||||||
final int paramsSize = params.length;
|
final int paramsSize = params.length;
|
||||||
if (paramsSize > 0) {
|
if (paramsSize > 0) {
|
||||||
sbUrl.append(params[0].getName()).append("=")
|
int i = 0;
|
||||||
.append(params[0].getValue());
|
NameValuePair param=params[i];
|
||||||
for (int i = 1; i < paramsSize; i++) {
|
while (param!=null && i++<paramsSize){
|
||||||
sbUrl.append("&").append(params[i].getName()).append("=")
|
final String name=param.getName();
|
||||||
.append(params[i].getValue());
|
final String value=param.getValue();
|
||||||
|
// success
|
||||||
|
if (name!=null && !name.isEmpty() && value!=null && !value.isEmpty()){
|
||||||
|
sbUrl.append(name).append("=")
|
||||||
|
.append(value);
|
||||||
|
// end cycle
|
||||||
|
param=null;
|
||||||
|
} else {
|
||||||
|
// next value
|
||||||
|
param=params[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (; i < paramsSize; i++) {
|
||||||
|
param=params[i];
|
||||||
|
if (param!=null){
|
||||||
|
final String name=param.getName();
|
||||||
|
final String value=param.getValue();
|
||||||
|
sbUrl.append(name).append("=")
|
||||||
|
.append(value);
|
||||||
|
if (name!=null && !name.isEmpty() && value!=null && !value.isEmpty()){
|
||||||
|
sbUrl.append("&").append(name).append("=")
|
||||||
|
.append(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@ package it.geosolutions.geoserver.rest.publisher;
|
|||||||
|
|
||||||
|
|
||||||
import it.geosolutions.geoserver.rest.GeoserverRESTTest;
|
import it.geosolutions.geoserver.rest.GeoserverRESTTest;
|
||||||
|
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher.ParameterConfigure;
|
||||||
import it.geosolutions.geoserver.rest.decoder.RESTCoverageStore;
|
import it.geosolutions.geoserver.rest.decoder.RESTCoverageStore;
|
||||||
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
|
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
|
||||||
import it.geosolutions.geoserver.rest.encoder.GSResourceEncoder.ProjectionPolicy;
|
import it.geosolutions.geoserver.rest.encoder.GSResourceEncoder.ProjectionPolicy;
|
||||||
@ -38,6 +39,7 @@ import java.io.File;
|
|||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.apache.commons.httpclient.NameValuePair;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
@ -167,4 +169,54 @@ public class GeoserverRESTImageMosaicTest extends GeoserverRESTTest {
|
|||||||
assertTrue(publisher.removeWorkspace(wsName));
|
assertTrue(publisher.removeWorkspace(wsName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testPublishImageMosaic() throws IOException {
|
||||||
|
|
||||||
|
if (!enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
deleteAll();
|
||||||
|
|
||||||
|
String storeName = "testImageMosaic";
|
||||||
|
|
||||||
|
assertTrue(reader.getWorkspaces().isEmpty());
|
||||||
|
|
||||||
|
assertTrue(publisher.createWorkspace(DEFAULT_WS));
|
||||||
|
|
||||||
|
File imageMosaicFile = new ClassPathResource(
|
||||||
|
"testdata/mosaic_geotiff.zip").getFile();
|
||||||
|
|
||||||
|
// test publish
|
||||||
|
boolean wp = publisher.publishImageMosaic(DEFAULT_WS, storeName,
|
||||||
|
imageMosaicFile, ParameterConfigure.NONE, (NameValuePair) null);
|
||||||
|
|
||||||
|
assertTrue("Publish imagemosaic with no layer configured, failed.", wp);
|
||||||
|
|
||||||
|
assertTrue("Unpublish() failed",
|
||||||
|
publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
||||||
|
|
||||||
|
// create default style
|
||||||
|
File sldFile = new ClassPathResource("testdata/restteststyle.sld")
|
||||||
|
.getFile();
|
||||||
|
assertTrue(publisher.publishStyle(sldFile, "raster"));
|
||||||
|
|
||||||
|
wp = publisher.publishImageMosaic(DEFAULT_WS, storeName, imageMosaicFile,
|
||||||
|
ParameterConfigure.FIRST, new NameValuePair("coverageName",
|
||||||
|
"imageMosaic_test"));
|
||||||
|
|
||||||
|
assertTrue("Publish imagemosaic configuring layer name, failed.", wp);
|
||||||
|
|
||||||
|
assertTrue("Unpublish() failed",
|
||||||
|
publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
||||||
|
|
||||||
|
wp = publisher.publishImageMosaic(DEFAULT_WS, storeName,
|
||||||
|
imageMosaicFile, ParameterConfigure.ALL, (NameValuePair) null);
|
||||||
|
|
||||||
|
assertTrue(
|
||||||
|
"Publish imagemosaic configuring all available layers, failed.",
|
||||||
|
wp);
|
||||||
|
|
||||||
|
assertTrue("Unpublish() failed",
|
||||||
|
publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ public class GeoserverRESTStyleTest extends GeoserverRESTTest {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Assume.assumeTrue(enabled);
|
// Assume.assumeTrue(enabled);
|
||||||
final String styleName = "restteststyle";
|
String styleName = "restteststyle";
|
||||||
|
|
||||||
File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile();
|
File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile();
|
||||||
|
|
||||||
@ -147,11 +147,21 @@ public class GeoserverRESTStyleTest extends GeoserverRESTTest {
|
|||||||
boolean published = publisher.publishStyle(sldContent); // Will take the name from sld contents
|
boolean published = publisher.publishStyle(sldContent); // Will take the name from sld contents
|
||||||
assertTrue("publish() failed", published);
|
assertTrue("publish() failed", published);
|
||||||
assertTrue(reader.existsStyle(styleName));
|
assertTrue(reader.existsStyle(styleName));
|
||||||
|
|
||||||
//test delete
|
//test delete
|
||||||
boolean ok = publisher.removeStyle(styleName);
|
boolean ok = publisher.removeStyle(styleName);
|
||||||
assertTrue("Unpublish() failed", ok);
|
assertTrue("Unpublish() failed", ok);
|
||||||
assertFalse(reader.existsStyle(styleName));
|
assertFalse(reader.existsStyle(styleName));
|
||||||
|
|
||||||
|
styleName = "restteststyle_with_name";
|
||||||
|
// test insert with name
|
||||||
|
published = publisher.publishStyle(sldContent,styleName); // Will set the name
|
||||||
|
assertTrue("publish() failed", published);
|
||||||
|
assertTrue(reader.existsStyle(styleName));
|
||||||
|
//test delete
|
||||||
|
ok = publisher.removeStyle(styleName);
|
||||||
|
assertTrue("Unpublish() failed", ok);
|
||||||
|
assertFalse(reader.existsStyle(styleName));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testUpdateDefaultStyle() throws FileNotFoundException, IOException {
|
public void testUpdateDefaultStyle() throws FileNotFoundException, IOException {
|
||||||
|
|||||||
BIN
src/test/resources/testdata/mosaic_geotiff.zip
vendored
Normal file
BIN
src/test/resources/testdata/mosaic_geotiff.zip
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user