Commit 10e98433 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

googleLicenseConsent info for overlays is provided via API

parent d12ef350
......@@ -159,7 +159,11 @@ public enum ConfigurationElementType {
SHOW_REACTION_TYPE("Don't touch [12.0.x compatibility]", "true", ConfigurationElementEditType.STRING, true),
GOOGLE_MAPS_API_KEY("Google Maps API key", "", ConfigurationElementEditType.STRING, false),
GOOGLE_MAPS_API_KEY("By providing this Google Maps Platform API key I declare that I am aware that "
+ "I am a Customer of the Google Maps Platform and I agree to the terms of the <a href=\"https://cloud.google.com/maps-platform/terms/\">license of Google Maps Platform</a>." +
"In particular, I warrant that neither any of the maps nor publicly available data overlays "
+ "(\"General overlays\") on this MINERVA server contain Protected Health Information (as defined in and subject to HIPAA).",
"", ConfigurationElementEditType.STRING, false),
;
......
......@@ -161,6 +161,10 @@ public class OverlayRestImpl extends BaseRestImpl {
if (overlayData.containsKey("name")) {
layout.setTitle((String) overlayData.get("name"));
}
if (overlayData.containsKey("googleLicenseConsent")) {
layout.setGoogleLicenseConsent((Boolean) overlayData.get("googleLicenseConsent"));
}
layoutDao.update(layout);
} catch (NumberFormatException e) {
throw new ObjectNotFoundException("overlay doesn't exist");
......
......@@ -493,6 +493,7 @@ public class LayoutService implements ILayoutService {
} else {
topLayout.setPublicLayout(false);
}
topLayout.setGoogleLicenseConsent(params.isGoogleLicenseConsent());
topLayout.setStatus(LayoutStatus.OK);
topLayout.setProgress(0.0);
UploadedFileEntry fileEntry = new UploadedFileEntry();
......
......@@ -97,6 +97,8 @@ public interface ILayoutService {
*/
private boolean async = false;
private boolean googleLicenseConsent = false;
/**
* Type of the uploaded file.
*/
......@@ -229,6 +231,25 @@ public interface ILayoutService {
return this;
}
/**
* @return the googleLicenseConsent
* @see #googleLicenseConsent
*/
public boolean isGoogleLicenseConsent() {
return googleLicenseConsent;
}
/**
* @param googleLicenseConsent
* the googleLicenseConsent to set
* @see #googleLicenseConsent
* @return {@link CreateLayoutParams} object
*/
public CreateLayoutParams googleLicenseConsent(boolean googleLicenseConsent) {
this.googleLicenseConsent = googleLicenseConsent;
return this;
}
/**
* @return the description
* @see #description
......
......@@ -83,6 +83,9 @@ public class LayoutView extends AbstractView<Layout> implements Serializable {
*/
private String inputDataAvailable;
private boolean googleLicenseConsent;
/**
* Default constructor.
*/
......@@ -235,4 +238,12 @@ public class LayoutView extends AbstractView<Layout> implements Serializable {
this.inputDataAvailable = inputDataAvailable;
}
public boolean isGoogleLicenseConsent() {
return googleLicenseConsent;
}
public void setGoogleLicenseConsent(boolean googleLicenseConsent) {
this.googleLicenseConsent = googleLicenseConsent;
}
}
......@@ -51,6 +51,7 @@ public class LayoutViewFactory extends AbstractViewFactory<Layout, LayoutView> {
} else {
result.setInputDataAvailable("false");
}
result.setGoogleLicenseConsent(layout.isGoogleLicenseConsent());
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment