added exclusion parameter for some, no one or all user to write to storageHub
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/wps@178709 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c92e3b98a9
commit
8cd27d78bd
|
@ -4,6 +4,15 @@
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<dependent-module archiveName="dataminer-1.5.6-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/DataMiner_TRUNK/DataMiner_TRUNK">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="storagehub-client-library-1.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-client_TRUNK/storagehub-client_TRUNK">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="storagehub-model-1.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-model_TRUNK/storagehub-model_TRUNK">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<property name="context-root" value="wps"/>
|
<property name="context-root" value="wps"/>
|
||||||
<property name="java-output-path" value="/wps/target/classes"/>
|
<property name="java-output-path" value="/wps/target/classes"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -24,6 +24,15 @@
|
||||||
<param-name>simulationMode</param-name>
|
<param-name>simulationMode</param-name>
|
||||||
<param-value>false</param-value>
|
<param-value>false</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>excludeWritesOnSH</param-name>
|
||||||
|
<!--
|
||||||
|
empty: all users will write on SHub
|
||||||
|
*: no one will write on Shub
|
||||||
|
users list seprated by comma: users reported will not write on Shub
|
||||||
|
-->
|
||||||
|
<param-value>statistical.manager</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
<!-- security-constraint> <web-resource-collection> <web-resource-name>My
|
<!-- security-constraint> <web-resource-collection> <web-resource-name>My
|
||||||
|
|
|
@ -38,6 +38,9 @@ import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.zip.GZIPOutputStream;
|
import java.util.zip.GZIPOutputStream;
|
||||||
|
|
||||||
|
@ -89,6 +92,7 @@ public class WebProcessingService extends HttpServlet {
|
||||||
private static final String MAX_COMPUTATION_PARAM = "maxComputation";
|
private static final String MAX_COMPUTATION_PARAM = "maxComputation";
|
||||||
private static final String SAVEONSTORAGE_PARAM = "saveOnStorage";
|
private static final String SAVEONSTORAGE_PARAM = "saveOnStorage";
|
||||||
private static final String SIMULATION_MODE_PARAM = "simulationMode";
|
private static final String SIMULATION_MODE_PARAM = "simulationMode";
|
||||||
|
private static final String USER_WIRTE_EXCLUDED_PARAM = "excludeWritesOnSH";
|
||||||
|
|
||||||
private ApplicationContext context = ContextProvider.get();
|
private ApplicationContext context = ContextProvider.get();
|
||||||
private EnvironmentVariableManager env ;
|
private EnvironmentVariableManager env ;
|
||||||
|
@ -104,7 +108,17 @@ public class WebProcessingService extends HttpServlet {
|
||||||
boolean saveOnStorage = Boolean.parseBoolean(context.application().getInitParameter(SAVEONSTORAGE_PARAM));
|
boolean saveOnStorage = Boolean.parseBoolean(context.application().getInitParameter(SAVEONSTORAGE_PARAM));
|
||||||
boolean simulationMode = Boolean.parseBoolean(context.application().getInitParameter(SIMULATION_MODE_PARAM));
|
boolean simulationMode = Boolean.parseBoolean(context.application().getInitParameter(SIMULATION_MODE_PARAM));
|
||||||
|
|
||||||
env = new EnvironmentVariableManager(maxComp, saveOnStorage, simulationMode);
|
String userWriteExcludedValue = context.application().getInitParameter(USER_WIRTE_EXCLUDED_PARAM);
|
||||||
|
|
||||||
|
List<String> excludedUserForWrite = null;
|
||||||
|
if (userWriteExcludedValue.isEmpty() || userWriteExcludedValue==null)
|
||||||
|
excludedUserForWrite = Collections.emptyList();
|
||||||
|
else if(!userWriteExcludedValue.equals("*")){
|
||||||
|
excludedUserForWrite = Arrays.asList(userWriteExcludedValue.split(","));
|
||||||
|
excludedUserForWrite.stream().forEach(i -> i.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
env = new EnvironmentVariableManager(maxComp, saveOnStorage, simulationMode, excludedUserForWrite);
|
||||||
LOGGER.info("WPS initialised");
|
LOGGER.info("WPS initialised");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@ demonstration - D4Science (grant no. 212488), D4Science-II (grant no.
|
||||||
(grant no. 283644);
|
(grant no. 283644);
|
||||||
* the H2020 research and innovation programme - BlueBRIDGE (grant no. 675680),
|
* the H2020 research and innovation programme - BlueBRIDGE (grant no. 675680),
|
||||||
EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant
|
EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant
|
||||||
no. 654119), SoBigData (grant no. 654024);
|
no. 654119), SoBigData (grant no. 654024), AGINFRA PLUS (grant no. 731001).
|
||||||
|
|
||||||
|
|
||||||
Version
|
Version
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
1.1.3-SNAPSHOT (2018-12-17)
|
1.1.3-SNAPSHOT (2019-03-27)
|
||||||
|
|
||||||
Please see the file named "changelog.xml" in this directory for the release notes.
|
Please see the file named "changelog.xml" in this directory for the release notes.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<baseDirectory>/</baseDirectory>
|
<baseDirectory>/</baseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>/home/giancarlo/workspaceDataMinerService/wps/distro</directory>
|
<directory>/home/lucio/eclipse-workspace/wps_TRUNK/distro</directory>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
<useDefaultExcludes>true</useDefaultExcludes>
|
||||||
<includes>
|
<includes>
|
||||||
|
|
|
@ -24,6 +24,15 @@
|
||||||
<param-name>simulationMode</param-name>
|
<param-name>simulationMode</param-name>
|
||||||
<param-value>false</param-value>
|
<param-value>false</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>excludeWritesOnSH</param-name>
|
||||||
|
<!--
|
||||||
|
empty: all users will write on SHub
|
||||||
|
*: no one will write on Shub
|
||||||
|
users list seprated by comma: users reported will not write on Shub
|
||||||
|
-->
|
||||||
|
<param-value>statistical.manager</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
<!-- security-constraint> <web-resource-collection> <web-resource-name>My
|
<!-- security-constraint> <web-resource-collection> <web-resource-name>My
|
||||||
|
|
Loading…
Reference in New Issue