Skip to content

Commit

Permalink
Making community modules in communityRelease compile
Browse files Browse the repository at this point in the history
  • Loading branch information
aaime committed Jun 1, 2019
1 parent 22ae91d commit af2e7ed
Show file tree
Hide file tree
Showing 27 changed files with 44 additions and 303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.Map.Entry;
import java.util.Properties;
import org.apache.commons.io.FileUtils;
import org.geoserver.platform.resource.Files;
import org.geoserver.security.impl.GeoServerUser;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.util.StringUtils;
Expand Down Expand Up @@ -146,7 +147,7 @@ public synchronized int synchronize() throws IOException {

if (backupFile.exists()) backupFile.delete();

fileWatcher = new PropertyFileWatcher(propFile);
fileWatcher = new PropertyFileWatcher(Files.asResource(propFile));
return counter;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,6 @@ protected StyleInfo clone(StyleInfo source, WorkspaceInfo workspace) {
target.setFormatVersion(source.getFormatVersion());
target.setLegend(source.getLegend());
target.setName(source.getName());
target.setSLDVersion(source.getSLDVersion());

return target;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.zip.ZipOutputStream;
import org.geoserver.config.GeoServer;
import org.geoserver.data.util.IOUtils;
import org.geoserver.ogr.core.Format;
import org.geoserver.ogr.core.FormatAdapter;
import org.geoserver.ogr.core.FormatConverter;
import org.geoserver.ogr.core.ToolWrapper;
import org.geoserver.ogr.core.ToolWrapperFactory;
import org.geoserver.platform.ServiceException;
import org.geoserver.util.IOUtils;
import org.geoserver.wcs.WCSInfo;
import org.geoserver.wcs.responses.CoverageResponseDelegate;
import org.geotools.coverage.grid.GridCoverage2D;
Expand Down Expand Up @@ -304,8 +304,8 @@ public void encode(

// create the first temp directory, used for dumping gs generated
// content
File tempGS = org.geoserver.data.util.IOUtils.createTempDirectory("gdaltmpin");
File tempGDAL = org.geoserver.data.util.IOUtils.createTempDirectory("gdaltmpout");
File tempGS = IOUtils.createTempDirectory("gdaltmpin");
File tempGDAL = IOUtils.createTempDirectory("gdaltmpout");

// build the gdal wrapper used to run the gdal_translate commands
ToolWrapper wrapper =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.geoserver.wfs.request.GetFeatureRequest;
import org.geoserver.wms.GetMapRequest;
import org.geoserver.wms.MapLayerInfo;
import org.geoserver.wps.gs.GeoServerProcess;
import org.geoserver.wps.resource.WPSResourceManager;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.feature.FeatureCollection;
Expand All @@ -47,7 +48,6 @@
import org.geotools.process.factory.DescribeParameter;
import org.geotools.process.factory.DescribeProcess;
import org.geotools.process.factory.DescribeResult;
import org.geoserver.wps.gs.GeoServerProcess;
import org.geotools.referencing.CRS;
import org.geotools.styling.Style;
import org.geotools.util.URLs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import org.geoserver.cluster.ClusterConfig;
import org.geoserver.cluster.ClusterConfigWatcher;
import org.geoserver.config.GeoServerPluginConfigurator;
import org.geoserver.data.util.IOUtils;
import org.geoserver.platform.GeoServerResourceLoader;
import org.geoserver.platform.resource.Files;
import org.geoserver.platform.resource.Paths;
import org.geoserver.platform.resource.Resource;
import org.geoserver.platform.resource.ResourceStore;
import org.geoserver.platform.resource.Resources;
import org.geoserver.util.IOUtils;
import org.geotools.util.logging.Logging;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Throwables.throwIfUnchecked;

import static org.geoserver.catalog.CatalogFacade.ANY_WORKSPACE;
import static org.geoserver.catalog.Predicates.and;
import static org.geoserver.catalog.Predicates.equal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
package org.geoserver.jdbcconfig.internal;

import com.google.common.base.Throwables;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.sql.ResultSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import java.util.logging.Logger;
import javax.servlet.ServletContext;
import org.geoserver.config.GeoServerPluginConfigurator;
import org.geoserver.util.IOUtils;
import org.geoserver.jdbcconfig.JDBCGeoServerLoader;
import org.geoserver.platform.GeoServerResourceLoader;
import org.geoserver.platform.resource.Paths;
import org.geoserver.platform.resource.Resource;
import org.geoserver.platform.resource.ResourceStore;
import org.geoserver.platform.resource.Resources;
import org.geoserver.util.IOUtils;
import org.geotools.util.URLs;
import org.geotools.util.logging.Logging;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import org.geoserver.cluster.configuration.EmbeddedBrokerConfiguration;
import org.geoserver.cluster.configuration.JMSConfiguration;
import org.geoserver.config.SpringResourceAdaptor;
import org.geoserver.data.util.IOUtils;
import org.geoserver.platform.resource.Resource.Type;
import org.geoserver.platform.resource.Resources;
import org.geoserver.util.IOUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.core.io.Resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import org.geoserver.platform.resource.Resource;
import org.geoserver.wms.GetMapRequest;
import org.geoserver.wms.MapLayerInfo;
import org.geoserver.wps.gs.GeoServerProcess;
import org.geoserver.wps.resource.WPSResourceManager;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.mbtiles.MBTilesFile;
import org.geotools.process.ProcessException;
import org.geotools.process.factory.DescribeParameter;
import org.geotools.process.factory.DescribeProcess;
import org.geotools.process.factory.DescribeResult;
import org.geoserver.wps.gs.GeoServerProcess;
import org.geotools.referencing.CRS;
import org.geotools.styling.Style;
import org.geotools.util.URLs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package org.geoserver.notification;

import org.geoserver.wfs.TransactionPlugin;
import org.geoserver.wfs.TransactionCallback;

public interface INotificationTransactionListener extends TransactionPlugin {
public interface INotificationTransactionListener extends TransactionCallback {

void setMessageMultiplexer(MessageMultiplexer messageMultiplexer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import java.util.HashMap;
import java.util.Map;
import net.opengis.wfs.TransactionResponseType;
import net.opengis.wfs.TransactionType;
import org.geoserver.catalog.Catalog;
import org.geoserver.catalog.CatalogInfo;
import org.geoserver.catalog.FeatureTypeInfo;
Expand All @@ -18,6 +16,8 @@
import org.geoserver.wfs.TransactionEvent;
import org.geoserver.wfs.TransactionEventType;
import org.geoserver.wfs.WFSException;
import org.geoserver.wfs.request.TransactionRequest;
import org.geoserver.wfs.request.TransactionResponse;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.opengis.feature.type.FeatureType;
import org.springframework.security.core.Authentication;
Expand Down Expand Up @@ -47,7 +47,7 @@ public NotificationTransactionListener(Catalog catalog) {
}

@Override
public TransactionType beforeTransaction(TransactionType request) throws WFSException {
public TransactionRequest beforeTransaction(TransactionRequest request) throws WFSException {
layersChangesResume =
new ThreadLocal<Map<String, Map<String, Object>>>() {
@Override
Expand All @@ -59,11 +59,11 @@ protected Map<String, Map<String, Object>> initialValue() {
}

@Override
public void beforeCommit(TransactionType request) throws WFSException {}
public void beforeCommit(TransactionRequest request) throws WFSException {}

@Override
public void afterTransaction(
TransactionType request, TransactionResponseType result, boolean committed) {
TransactionRequest request, TransactionResponse result, boolean committed) {
if (committed) {
String handle = request.getHandle();
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.geoserver.notification.common.NotificationConfiguration;
import org.geoserver.platform.GeoServerExtensions;
import org.geoserver.test.GeoServerSystemTestSupport;
import org.geoserver.wfs.TransactionPlugin;
import org.geoserver.wfs.TransactionCallback;
import org.junit.Test;

public class AnonymousSystemTest extends GeoServerSystemTestSupport {
Expand Down Expand Up @@ -45,7 +45,8 @@ public void testCatalogNotifierIntialization() throws IOException {
public void testTransactionNotifierIntialization() throws IOException {
NotificationConfiguration cfg = null;
int counter = 0;
for (TransactionPlugin listener : GeoServerExtensions.extensions(TransactionPlugin.class)) {
for (TransactionCallback listener :
GeoServerExtensions.extensions(TransactionCallback.class)) {
if (listener instanceof INotificationTransactionListener) {
counter++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.geoserver.notification.common.NotificationConfiguration;
import org.geoserver.platform.GeoServerExtensions;
import org.geoserver.test.GeoServerSystemTestSupport;
import org.geoserver.wfs.TransactionPlugin;
import org.geoserver.wfs.TransactionCallback;
import org.junit.Test;

public class DefaultConfigTest extends GeoServerSystemTestSupport {
Expand All @@ -39,7 +39,8 @@ public void testCatalogNotifierIntialization() throws IOException {
public void testTransactionNotifierIntialization() throws IOException {
NotificationConfiguration cfg = null;
int counter = 0;
for (TransactionPlugin listener : GeoServerExtensions.extensions(TransactionPlugin.class)) {
for (TransactionCallback listener :
GeoServerExtensions.extensions(TransactionCallback.class)) {
if (listener instanceof INotificationTransactionListener) {
counter++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.geoserver.notification.common.NotificationConfiguration;
import org.geoserver.platform.GeoServerExtensions;
import org.geoserver.test.GeoServerSystemTestSupport;
import org.geoserver.wfs.TransactionPlugin;
import org.geoserver.wfs.TransactionCallback;
import org.junit.Test;

public class SystemTest extends GeoServerSystemTestSupport {
Expand Down Expand Up @@ -47,7 +47,8 @@ public void testCatalogNotifierIntialization() throws IOException {
public void testTransactionNotifierIntialization() throws IOException {
NotificationConfiguration cfg = null;
int counter = 0;
for (TransactionPlugin listener : GeoServerExtensions.extensions(TransactionPlugin.class)) {
for (TransactionCallback listener :
GeoServerExtensions.extensions(TransactionCallback.class)) {
if (listener instanceof INotificationTransactionListener) {
counter++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package org.geoserver.params.extractor;

import java.io.Closeable;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Arrays;
import java.util.HashMap;
Expand Down Expand Up @@ -69,7 +70,8 @@ public static <T extends Closeable> void closeQuietly(T closable) {
}
}

public static Map<String, String[]> parseParameters(Optional<String> queryString) {
public static Map<String, String[]> parseParameters(Optional<String> queryString)
throws UnsupportedEncodingException {
Map<String, String[]> parameters = new HashMap<>();
if (!queryString.isPresent()) {
return parameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import org.geoserver.util.IOUtils;
import org.geoserver.platform.resource.FileSystemResourceStore;
import org.geoserver.platform.resource.ResourceStore;
import org.geoserver.util.IOUtils;
import org.junit.After;
import org.junit.Before;
import org.springframework.context.ApplicationContext;
Expand Down

0 comments on commit af2e7ed

Please sign in to comment.