Compare commits

..

105 Commits

Author SHA1 Message Date
Giancarlo Panichi c2bf4e3d2c Update pom.xml
Updated for gCubeRelease 6.0.0
2024-10-16 14:26:48 +02:00
Giancarlo Panichi 444efec4ca Update CHANGELOG.md
Updated to gCubeRelease 6.0.0
2024-10-16 14:25:58 +02:00
Giancarlo Panichi 527f98d0a5 Updated to gcube-bom 2.4.1-SNAPSHOT 2024-09-23 17:18:23 +02:00
Giancarlo Panichi e3280c177b Updated pom.xml 2024-09-18 16:43:04 +02:00
Giancarlo Panichi b2da0eec05 Updated nord52 repo url 2024-09-18 12:14:20 +02:00
Giancarlo Panichi 8f44e05c3e Updated maven-parent 2024-09-18 11:01:17 +02:00
Giancarlo Panichi 31e70c462f Updated 52n-wps-io-impl version 2024-09-18 10:57:24 +02:00
Giancarlo Panichi b0ceadb96d Updated 52n-wps-io-impl version 2024-09-18 10:55:18 +02:00
Giancarlo Panichi 819711eee2 Test maven-parent 2024-09-18 10:48:33 +02:00
Giancarlo Panichi fbee16c8f0 Updated gcube-bom to 2.5.0-SNAPSHOT 2024-09-18 10:23:10 +02:00
Giancarlo Panichi d5ae696ed5 Updated sensitive data 2023-01-18 19:09:39 +01:00
Giancarlo Panichi 3102594039 Updated bom to latest version [#24209] 2022-12-06 12:13:15 +01:00
Giancarlo Panichi 86bb6c207f Updated bom to latest version [#24209] 2022-12-06 11:54:51 +01:00
Giancarlo Panichi 01b71e2715 Merge branch 'master' of https://code-repo.d4science.org/gCubeSystem/dataminer.git 2022-04-07 15:27:02 +02:00
Giancarlo Panichi 561e81d244 Fixed dependencies 2022-04-07 15:25:38 +02:00
Giancarlo Panichi 7a64b7c5be Merge pull request 'feature/23107' (!3) from feature/23107 into master
Reviewed-on: #3
2022-04-07 15:23:24 +02:00
Giancarlo Panichi 8d02cd3e83 Update for gCube Release 5.10.1 2022-04-07 15:18:08 +02:00
Giancarlo Panichi d95a4908ba Updated for pre 2022-04-06 16:39:33 +02:00
Giancarlo Panichi 176b4281ed Updated for Dev Env 2022-04-05 18:27:06 +02:00
Giancarlo Panichi 2585b6142d Updated Changelog 2022-04-05 18:23:49 +02:00
Giancarlo Panichi 91caeb280b Added the support to new JWT token via URI Resolver [#23107] 2022-04-05 18:20:49 +02:00
Giancarlo Panichi 69ee033316 Updated bom for release 2022-04-01 11:55:57 +02:00
Giancarlo Panichi c1921a3762 Updated for Next Release 2022-04-01 10:32:55 +02:00
Giancarlo Panichi 5f1e4f9787 Merge pull request 'feature/23054' (!2) from feature/23054 into master
Reviewed-on: #2
2022-04-01 10:27:41 +02:00
Giancarlo Panichi 7899ababdd Updated Changelog 2022-04-01 10:25:36 +02:00
Giancarlo Panichi d2c45d0c8b Changed DatastapaceManager logs 2022-03-31 16:18:26 +02:00
Giancarlo Panichi e093239c7b Updated write exclusion behavior 2022-03-25 12:47:26 +01:00
Giancarlo Panichi 9aed0df4a4 Updated to fix protocol parameters when persistence is disabled 2022-03-21 15:57:29 +01:00
Giancarlo Panichi 1b7de34407 Minor updated 2022-03-15 17:02:12 +01:00
Giancarlo Panichi 62aa6ba5e1 Updated bom version for release 2022-03-15 17:01:33 +01:00
Giancarlo Panichi e2060ff42d Fixed pom for release 2022-03-15 11:12:16 +01:00
Giancarlo Panichi 6937be301c Merge pull request 'feature/22700' (!1) from feature/22700 into master
Reviewed-on: #1
2022-03-15 11:09:05 +01:00
Giancarlo Panichi 69980a374a Updated for release 2022-03-15 11:04:40 +01:00
Giancarlo Panichi c48f391c87 Updated gcube-bom to 2.1.0-SNAPSHOT for storagehub 2.0.0 2022-01-27 18:33:07 +01:00
Giancarlo Panichi 71f0926993 ref 22700: DataMiner - Check max computations limit
Updated max computations parameter check.
2022-01-24 18:27:56 +01:00
Roberto Cirillo 346e0b7748 Update 'CHANGELOG.md'
snapshot removed from CHANGELOG
2021-10-08 17:30:01 +02:00
Roberto Cirillo 2671a67ac1 Update 'pom.xml'
snapshot removed from pom
2021-10-08 17:29:36 +02:00
Roberto Cirillo 4265ae8e70 Update 'CHANGELOG.md'
add SNAPSHOT to 1.7.1 version
2021-10-06 12:04:25 +02:00
Roberto Cirillo 1e49f1d35d Update 'pom.xml'
add SNAPSHOT to the version
2021-10-06 12:03:56 +02:00
Giancarlo Panichi cfdd266838 Updated for Release Next 2021-06-15 15:40:52 +02:00
Giancarlo Panichi 52d41e889d Updated for accounting-lib 2021-06-15 15:31:18 +02:00
Giancarlo Panichi b800556d6f Updated for Release Next 2021-06-15 15:20:40 +02:00
Giancarlo Panichi 5cb240e97a Rebuild SNAPSHOT 2021-06-15 15:14:36 +02:00
Giancarlo Panichi 7bed8b59e9 ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-25 11:14:58 +02:00
Giancarlo Panichi e3c599d292 ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-25 10:50:17 +02:00
Giancarlo Panichi 9bd2519bbc ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-25 10:24:59 +02:00
Giancarlo Panichi e81d732ea1 ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-24 18:45:35 +02:00
Giancarlo Panichi cbea0b56f5 ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-24 18:22:21 +02:00
Giancarlo Panichi cba597494c ref 20971: ShortLink - Check for obsolete short urls
https://support.d4science.org/issues/20971

Fixed ShortLink urls.
2021-05-24 18:13:29 +02:00
Roberto Cirillo f513238cd0 Update 'pom.xml'
removed snapshot
2021-01-20 15:59:21 +01:00
Roberto Cirillo cc31ba1de2 Update 'pom.xml'
added SNAPSHOT
2021-01-19 17:02:01 +01:00
Roberto Cirillo 2e57aeb630 Update 'pom.xml'
update ecological-engine-smart-executor lower bound range
2021-01-19 16:50:15 +01:00
Roberto Cirillo ac7e337f3e Update 'pom.xml'
update ecological-engine-external-algorithms lower bound range
2021-01-19 09:46:31 +01:00
lucio.lelii bf3f8cd58c pom updated to remove old maven repositories 2021-01-18 20:01:26 +01:00
lucio.lelii a4dbd0fac2 pom updated 2020-11-30 17:48:03 +01:00
lucio.lelii bdf0b492d5 - EnviromentalVariableManager reverted
- import range changed for ecological-engine libraries
2020-11-30 17:39:25 +01:00
user1 95a92df6de config Path can be set from EnvManager 2020-11-20 16:25:19 +01:00
Giancarlo Panichi 4bff1bd79d Updated descriptor.xml 2020-06-11 14:30:40 +02:00
Giancarlo Panichi df38cb0c46 ref 19423: DataMiner - Update DataMiner Service in Dev for support https
https://support.d4science.org/issues/19423

 Updated for support https protocol
2020-06-10 16:53:51 +02:00
Giancarlo Panichi d1251c5b70 Renamed CHANGELOG.md 2020-06-10 15:21:32 +02:00
Giancarlo Panichi c05cce2f82 Renamed CHANGELOG.md 2020-06-10 14:54:38 +02:00
Giancarlo Panichi 0f583d0cc2 Renamed CHANGELOG.md 2020-06-10 14:44:17 +02:00
Giancarlo Panichi 7a4e80f891 Renamed CHANGELOG.md 2020-06-10 14:42:03 +02:00
roberto cirillo 3ab0201546 update to version 1.6.0:
removed snapshot, edit changelog.md
2020-05-14 17:13:57 +02:00
roberto cirillo 089733893e Merge branch 'master' of https://code-repo.d4science.org/gCubeSystem/dataminer.git 2020-05-12 15:23:53 +02:00
roberto cirillo ab13ee6e54 added shub retry on InputManager class, getLocalFile method 2020-05-12 15:23:26 +02:00
roberto cirillo 3a9957d3c5 reverting retry in order to push another retry feature
Revert "Added Retry in Input Parameter URL retrieve for fix StorageHub sync."

This reverts commit 690126d6c0.
2020-05-12 15:18:23 +02:00
Giancarlo Panichi 690126d6c0 Added Retry in Input Parameter URL retrieve for fix StorageHub sync. 2020-05-12 11:24:31 +02:00
Giancarlo Panichi 1dcab757f7 ref 18289: the latest wps doesn't work
https://support.d4science.org/issues/18289

Rebuild Snapshot
2020-04-23 11:22:24 +02:00
Giancarlo Panichi 45701f4941 Updated to Git and Jenkins 2019-11-28 18:50:01 +01:00
Giancarlo Panichi bbec962117 Updated to Git and Jenkins 2019-11-28 11:09:46 +01:00
Giancarlo Panichi 5cdf891f29 Updated to Git and Jenkins 2019-11-26 15:55:00 +01:00
Giancarlo Panichi 56c5d7af14 Updated to support Git and Jenkins 2019-11-26 15:13:55 +01:00
Giancarlo Panichi 3d05e152ac Updated to support Git and Jenkins 2019-11-26 15:11:49 +01:00
Giancarlo Panichi 7f20c6a0b6 Updated to Git and Jenkins 2019-11-25 16:15:04 +01:00
Giancarlo Panichi 0a6e67b98e Updated to Git and Jenkins 2019-11-25 15:52:32 +01:00
Giancarlo Panichi 12370e08e5 Updated to Git and Jenkins 2019-11-25 11:58:58 +01:00
Giancarlo Panichi d56e3ef04f Updated to Git and Jenkins 2019-11-21 17:32:37 +01:00
Giancarlo Panichi fd6ea10bb9 Updated Pom to build the SNAPSHOT 2019-11-21 14:23:41 +01:00
Giancarlo Panichi ac9b4a19fe Updated to support Git and Jenkins 2019-11-20 17:23:42 +01:00
Giancarlo Panichi 215f1a3d21 Updated to support Git and Jenkins 2019-11-20 17:19:23 +01:00
Giancarlo Panichi 1b1117997e ref 18096: DataMiner - HTML file does not open in view widget but in a new browser window
https://support.d4science.org/issues/18096

Fixed Content-Type in output files

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@182280 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-11-20 15:43:27 +00:00
Giancarlo Panichi b1fcb7a96f ref 17659: DataMiner - DataMiner Service - DataMiner service must create https links instead of http links for output parameters to avoid problems with the portal that uses https.
https://support.d4science.org/issues/17659

Fixed https link for output parameter

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@181938 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-10-03 13:26:30 +00:00
Giancarlo Panichi 7c9bfbf4bb ref 13024: DataMiner - The service must support the https protocol
https://support.d4science.org/issues/13024

Updated DataMiner now support https

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@181937 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-10-03 13:14:53 +00:00
Lucio Lelii 281476cb0c git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@179537 82a268e6-3cf1-43bd-a215-b396298e98cf 2019-05-23 14:48:31 +00:00
Lucio Lelii b84c097408 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@179518 82a268e6-3cf1-43bd-a215-b396298e98cf 2019-05-22 15:45:21 +00:00
Lucio Lelii 538db67938 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@179069 82a268e6-3cf1-43bd-a215-b396298e98cf 2019-04-17 15:36:38 +00:00
Lucio Lelii f89709c5bd git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@178855 82a268e6-3cf1-43bd-a215-b396298e98cf 2019-04-04 16:48:29 +00:00
Lucio Lelii 2f72667a0c Added possibility to exclude single or all user to write to workspace
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@178710 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-03-27 17:34:46 +00:00
Giancarlo Panichi d634499e3c Fixed Jersey version in dependencies
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@176633 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-01-17 11:11:46 +00:00
Giancarlo Panichi 1a4c956c34 ref 13024: DataMiner - The service must support the https protocol
https://support.d4science.org/issues/13024

Updated DataMiner now support https

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@174936 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-12-17 15:07:07 +00:00
Giancarlo Panichi 4e50405169 Aligned Trunk to Branch
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@174213 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-11-19 09:03:18 +00:00
Lucio Lelii 703b6803ee git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@174113 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-11-12 17:16:15 +00:00
Giancarlo Panichi 1b4b507cf2 ref 12703: Public pages visualised by data miner services and proxies
https://support.d4science.org/issues/12703

Updated DataMiner service metadata info

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173657 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-10-18 15:38:14 +00:00
Lucio Lelii 13693b56b4 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173645 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-18 08:00:09 +00:00
Lucio Lelii 195c5e18a9 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173523 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-16 13:57:23 +00:00
Lucio Lelii 053e90458f git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173518 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-16 13:27:01 +00:00
Lucio Lelii 2b2d42d120 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173508 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-16 12:35:16 +00:00
Lucio Lelii bb05e9b652 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173507 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-16 12:11:26 +00:00
Lucio Lelii 8447bd6fb5 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173502 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-16 09:57:30 +00:00
Lucio Lelii 7cb8617529 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173499 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-15 17:41:21 +00:00
Lucio Lelii 309f6ea62d git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173393 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-10-12 14:19:28 +00:00
Lucio Lelii a2f124a540 EnvironmentVariableManager added
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173383 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-10-12 13:53:36 +00:00
Lucio Lelii 6d3cab333f Removed special char "["and "]" from output omputation name
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@173249 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-10-11 16:57:04 +00:00
Lucio Lelii c829d56e4d git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@169188 82a268e6-3cf1-43bd-a215-b396298e98cf 2018-06-14 09:29:15 +00:00
75 changed files with 402 additions and 128 deletions

0
.classpath Normal file → Executable file
View File

0
.gitignore vendored Normal file → Executable file
View File

0
.project Normal file → Executable file
View File

2
.settings/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/org.eclipse.ltk.core.refactoring.prefs
/org.eclipse.wst.xsl.core.prefs

0
.settings/org.eclipse.core.resources.prefs Normal file → Executable file
View File

94
.settings/org.eclipse.jdt.core.prefs Normal file → Executable file
View File

@ -1,15 +1,109 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.8

0
.settings/org.eclipse.m2e.core.prefs Normal file → Executable file
View File

0
.settings/org.eclipse.wst.common.component Normal file → Executable file
View File

View File

0
.settings/org.eclipse.wst.validation.prefs Normal file → Executable file
View File

46
CHANGELOG.md Normal file → Executable file
View File

@ -3,76 +3,74 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for "dataminer" # Changelog for "dataminer"
## [v1.7.1] - 2021-05-24 ## [v1.9.1]
### Fixes - Updated gcube-bom to 2.4.1
## [v1.9.0] - 2022-04-05
- Added support to new JWT token via URI Resolver [#23107]
## [v1.8.1] - 2022-03-21
- Update wps service to support not writing of the computation status to the user's workspace [#23054]
- Fixed protocol parameter when persistence is disabled
## [v1.8.0] - 2022-01-24
- Fixed max computations support [#22700]
## [v1.7.1] - 2021-05-24
- Fixed obsolete short urls [#20971] - Fixed obsolete short urls [#20971]
## [v1.7.0] - 2020-11-20 ## [v1.7.0] - 2020-11-20
### Fixes
- import range modified to resolve old repositories invalid url - import range modified to resolve old repositories invalid url
## [v1.6.0] - 2020-05-12
### Fixes ## [v1.6.0] - 2020-05-12
- Added storagehub retry in InputsManager class, getLocalFile method [#19253] - Added storagehub retry in InputsManager class, getLocalFile method [#19253]
## [v1.5.9] - 2019-11-20 ## [v1.5.9] - 2019-11-20
### Fixes
- Fixed Content-Type support for files in the results of computations [#18096] - Fixed Content-Type support for files in the results of computations [#18096]
## [v1.5.8] - 2019-10-01 ## [v1.5.8] - 2019-10-01
### Fixes
- Fixed https link for output parameter [#17659] - Fixed https link for output parameter [#17659]
## [v1.5.7] - 2019-03-01 ## [v1.5.7] - 2019-03-01
### Features
- Updated https support [#13024] - Updated https support [#13024]
## [v1.5.2] - 2017-12-13 ## [v1.5.2] - 2017-12-13
### Fixes
- added the right extension on output file - added the right extension on output file
- lock file created on execution - lock file created on execution
## [v1.5.1] - 2017-09-14 ## [v1.5.1] - 2017-09-14
### Features
- added accounting on algorithm execution - added accounting on algorithm execution
## [v1.5.0] - 2017-07-31 ## [v1.5.0] - 2017-07-31
### Features
- service interface classes moved to wps project - service interface classes moved to wps project
## [v1.1.0] - 2016-10-03 ## [v1.1.0] - 2016-10-03
- First Release - First Release

0
FUNDING.md Normal file → Executable file
View File

0
LICENSE.md Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
descriptor.xml Normal file → Executable file
View File

26
pom.xml Normal file → Executable file
View File

@ -1,15 +1,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>maven-parent</artifactId> <artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId> <groupId>org.gcube.tools</groupId>
<version>1.1.0</version> <version>1.2.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>dataminer</artifactId> <artifactId>dataminer</artifactId>
<version>1.7.1</version> <version>1.9.1</version>
<name>dataminer</name> <name>dataminer</name>
<description>An e-Infrastructure service providing state-of-the art DataMining algorithms and ecological modelling approaches under the Web Processing Service (WPS) standard.</description> <description>An e-Infrastructure service providing state-of-the art DataMining algorithms and ecological modelling approaches under the Web Processing Service (WPS) standard.</description>
@ -21,7 +22,7 @@
<developers> <developers>
<developer> <developer>
<name>Gianpaolo Coro</name> <name>Gianpaolo 52n-wps-io-implCoro</name>
<email>gianpaolo.coro@isti.cnr.it</email> <email>gianpaolo.coro@isti.cnr.it</email>
<organization>CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"</organization> <organization>CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"</organization>
<roles> <roles>
@ -55,7 +56,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId> <artifactId>gcube-bom</artifactId>
<version>2.0.1</version> <version>2.4.1</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -91,12 +92,12 @@
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>52n-wps-algorithm-gcube</artifactId> <artifactId>52n-wps-algorithm-gcube</artifactId>
<version>[3.6.1,3.7.0)</version> <version>[3.6.1,3.7.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>52n-wps-server-gcube</artifactId> <artifactId>52n-wps-server-gcube</artifactId>
<version>[3.6.1, 3.7.0)</version> <version>[3.6.1, 3.7.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
@ -106,7 +107,7 @@
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-geospatial-extensions</artifactId> <artifactId>ecological-engine-geospatial-extensions</artifactId>
<version>[1.5.2-SNAPSHOT,2.0.0-SNAPSHOT)</version> <version>[1.5.2,2.0.0-SNAPSHOT)</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
@ -117,12 +118,12 @@
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-external-algorithms</artifactId> <artifactId>ecological-engine-external-algorithms</artifactId>
<version>[1.2.2-SNAPSHOT,2.0.0-SNAPSHOT)</version> <version>[1.2.2,2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-smart-executor</artifactId> <artifactId>ecological-engine-smart-executor</artifactId>
<version>[1.6.5-SNAPSHOT,2.0.0-SNAPSHOT)</version> <version>[1.6.5,2.0.0-SNAPSHOT)</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.glassfish.jersey.core</groupId> <groupId>org.glassfish.jersey.core</groupId>
@ -145,6 +146,7 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
@ -162,12 +164,10 @@
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId> <artifactId>storagehub-client-library</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>storagehub-model</artifactId> <artifactId>storagehub-model</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
@ -201,7 +201,7 @@
<repository> <repository>
<id>n52-releases</id> <id>n52-releases</id>
<name>52n Releases</name> <name>52n Releases</name>
<url>http://52north.org/maven/repo/releases</url> <url>https://52north.org/maven/repo/releases</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>

0
profile.xml Normal file → Executable file
View File

View File

@ -0,0 +1,67 @@
package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.is;
import java.util.List;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.resources.gcore.ServiceEndpoint.Runtime;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import org.gcube.resources.discovery.icclient.ICFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class InformationSystemUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(InformationSystemUtils.class);
private static final String URI_RESOLVER_SERVICE_CATEGORY = "Service";
private static final String URI_RESOLVER_SERVICE_NAME = "HTTP-URI-Resolver";
public static String retrieveUriResolverOat(String scope) throws Exception {
try {
LOGGER.info("Retrieve URI Resolver Oat Service Info");
if (scope == null || scope.length() == 0) {
String error="Invalid request scope: " + scope;
LOGGER.error(error);
throw new Exception(error);
}
ScopeProvider.instance.set(scope);
SimpleQuery query = ICFactory.queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq '" + URI_RESOLVER_SERVICE_CATEGORY + "'")
.addCondition("$resource/Profile/Name/text() eq '" + URI_RESOLVER_SERVICE_NAME + "'")
.setResult("$resource/Profile/RunTime");
DiscoveryClient<Runtime> client = ICFactory.clientFor(Runtime.class);
List<Runtime> runtimeList = client.submit(query);
String serviceAddress = null;
if (runtimeList != null && !runtimeList.isEmpty()) {
for (int i = 0; i < runtimeList.size(); i++) {
Runtime accessPoint = runtimeList.get(i);
if (accessPoint != null) {
StringBuilder sb=new StringBuilder();
sb.append("https://");
sb.append(accessPoint.hostedOn());
sb.append("/oat/get");
serviceAddress=sb.toString();
break;
}
}
} else {
String error="RuntimeList error: "+runtimeList;
LOGGER.error(error);
throw new Exception(error);
}
LOGGER.info("Uri Resolver Oat Service Info: " + serviceAddress);
return serviceAddress;
} catch (Throwable e) {
LOGGER.error("Error in discovery Uri Resolver Oat Service Endpoint in scope: " + scope);
LOGGER.error(e.getLocalizedMessage(),e);
throw e;
}
}
}

View File

@ -50,13 +50,14 @@ import org.slf4j.LoggerFactory;
public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm implements Observable, Cancellable { public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm implements Observable, Cancellable {
private static final int COMPUTATION_WAIT_FOR_RUN_REQUEST = 20000;
/** /**
* Deploying procedure: 1 - modify configuration files 2 - modify resource * Deploying procedure: 1 - modify configuration files 2 - modify resource file:
* file: resources/templates/setup.cfg 3 - generate classes with * resources/templates/setup.cfg 3 - generate classes with ClassGenerator 4 -
* ClassGenerator 4 - add new classes in the wps_config.xml on the wps web * add new classes in the wps_config.xml on the wps web app config folder 5 -
* app config folder 5 - produce the Jar file of this project 6 - copy the * produce the Jar file of this project 6 - copy the jar file in the lib folder
* jar file in the lib folder of the wps web app change the server * of the wps web app change the server parameters in the wps_config.xml file
* parameters in the wps_config.xml file
*/ */
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractEcologicalEngineMapper.class); private static final Logger LOGGER = LoggerFactory.getLogger(AbstractEcologicalEngineMapper.class);
@ -85,30 +86,41 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
this.wpsExternalID = wpsExternalID; this.wpsExternalID = wpsExternalID;
} }
public static synchronized void addComputation(String session, String user) { private static synchronized void addComputation(String session, String user) {
runningcomputations.put(session, user); runningcomputations.put(session, user);
} }
public static synchronized void removeComputation(String session) { private static synchronized void removeComputation(String session) {
runningcomputations.remove(session); runningcomputations.remove(session);
} }
public static synchronized int getRuningComputations() { private static synchronized int getRuningComputations() {
return runningcomputations.size(); return runningcomputations.size();
} }
public static synchronized String displayRunningComputations() { private static synchronized String displayRunningComputations() {
return runningcomputations.toString(); return runningcomputations.toString();
} }
public void waitForResources() throws Exception { private void waitForResources(String computationSession, String username, String scope) throws Exception {
while (getRuningComputations() > ConfigurationManager.getMaxComputations()) { while (waitCondition(computationSession, username, scope)) {
Thread.sleep(20000); Thread.sleep(COMPUTATION_WAIT_FOR_RUN_REQUEST);
LOGGER.debug("Waiting for resources to be available: " + displayRunningComputations()); LOGGER.debug("Waiting for resources to be available: " + displayRunningComputations());
} }
} }
private static synchronized boolean waitCondition(String computationSession, String username, String scope) {
if (getRuningComputations() >= ConfigurationManager.getMaxComputations()) {
return true;
} else {
// add the computation to the global list of computations
LOGGER.debug("Add computation to run: {}", computationSession);
addComputation(computationSession, username + ":" + scope);
return false;
}
}
// inner objects // inner objects
public AlgorithmConfiguration config; public AlgorithmConfiguration config;
public InfrastructureDialoguer infrastructureDialoguer; public InfrastructureDialoguer infrastructureDialoguer;
@ -366,11 +378,9 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
config = configManager.getConfig(); config = configManager.getConfig();
LOGGER.info("Configured algorithm with session " + computationSession); LOGGER.info("Configured algorithm with session " + computationSession);
time("Configuration"); time("Configuration");
waitForResources(); waitForResources(computationSession, configManager.getUsername(), configManager.getScope());
LOGGER.info("Running algorithm with session " + computationSession); LOGGER.info("Running algorithm with session " + computationSession);
time("Waiting time for resources to be free"); time("Waiting time for resources to be free");
// add the computation to the global list of computations
addComputation(computationSession, configManager.getUsername() + ":" + configManager.getScope());
String scope = configManager.getScope(); String scope = configManager.getScope();
String username = configManager.getUsername(); String username = configManager.getUsername();
@ -502,8 +512,8 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
throw e; throw e;
} finally { } finally {
LOGGER.debug("accounting algorithm"); LOGGER.debug("accounting algorithm");
if(operationResult==null){ if (operationResult == null) {
operationResult=OperationResult.FAILED; operationResult = OperationResult.FAILED;
} }
accountAlgorithmExecution(startTimeLong, System.currentTimeMillis(), operationResult); accountAlgorithmExecution(startTimeLong, System.currentTimeMillis(), operationResult);
LOGGER.debug("Deleting Input Tables"); LOGGER.debug("Deleting Input Tables");
@ -527,15 +537,25 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
} }
private boolean checkWriteAuthorization(String username) { private boolean checkWriteAuthorization(String username) {
if (env != null && env.getShubUsersExcluded() != null) { if (env != null) {
if (env.getShubUsersExcluded().isEmpty()) { if (env.getShubUsersExcluded() != null) {
return false; if (env.getShubUsersExcluded().isEmpty()) {
} // all users write
if (env.getShubUsersExcluded().contains(username)) { return true;
}
if (env.getShubUsersExcluded().contains(username)) {
return false;
} else {
// username write
return true;
}
} else {
//This is the * case, no users write.
return false; return false;
} }
} else {
return false;
} }
return true;
} }
private void accountAlgorithmExecution(long start, long end, OperationResult result) { private void accountAlgorithmExecution(long start, long end, OperationResult result) {

View File

@ -22,25 +22,24 @@ public class ConfigurationManager {
public static String usernameParameter = "user.name"; public static String usernameParameter = "user.name";
public static String scopeParameter = "scope"; public static String scopeParameter = "scope";
public static String tokenParameter = "usertoken"; public static String tokenParameter = "usertoken";
public static String defaultScope= "/gcube/devsec"; public static String defaultScope = "/gcube/devsec";
public static String defaultUsername= "statistical.wps"; public static String defaultUsername = "statistical.wps";
private static Integer maxComputations = null; private static Integer maxComputations = null;
private static Boolean useStorage = null; private static Boolean useStorage = null;
static boolean simulationMode = false; static boolean simulationMode = false;
EnvironmentVariableManager env = null; EnvironmentVariableManager env = null;
public static synchronized Integer getMaxComputations(){ public static synchronized Integer getMaxComputations() {
return maxComputations; return maxComputations;
} }
public static synchronized Boolean useStorage(){ public static synchronized Boolean useStorage() {
return useStorage; return useStorage;
} }
public static synchronized Boolean isSimulationMode(){ public static synchronized Boolean isSimulationMode() {
return simulationMode; return simulationMode;
} }
@ -57,12 +56,12 @@ public class ConfigurationManager {
options.load(is); options.load(is);
is.close(); is.close();
maxComputations = Integer.parseInt(options.getProperty("maxcomputations")); maxComputations = Integer.parseInt(options.getProperty("maxcomputations"));
logger.info("setting max computation to {}",maxComputations); logger.info("setting max computation to {}", maxComputations);
useStorage = Boolean.parseBoolean(options.getProperty("saveond4sstorage")); useStorage = Boolean.parseBoolean(options.getProperty("saveond4sstorage"));
simulationMode=Boolean.parseBoolean(options.getProperty("simulationMode")); simulationMode = Boolean.parseBoolean(options.getProperty("simulationMode"));
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("error initializing properties",e); logger.error("error initializing properties", e);
} }
} }
@ -80,7 +79,8 @@ public class ConfigurationManager {
} }
public ConfigurationManager(EnvironmentVariableManager env) { public ConfigurationManager(EnvironmentVariableManager env) {
if (env == null) inizializePropertiesUsingTemplateFile(); if (env == null)
inizializePropertiesUsingTemplateFile();
else { else {
maxComputations = env.getMaxComputation(); maxComputations = env.getMaxComputation();
useStorage = env.isSaveOnStorage(); useStorage = env.isSaveOnStorage();
@ -92,7 +92,7 @@ public class ConfigurationManager {
return config; return config;
} }
public void setComputationId(String computationId){ public void setComputationId(String computationId) {
config.setTaskID(computationId); config.setTaskID(computationId);
} }
@ -109,28 +109,30 @@ public class ConfigurationManager {
persistencePath = "./"; persistencePath = "./";
} }
logger.debug("Taking configuration from {}", configPath); logger.debug("Taking configuration from {}", configPath);
//+ " and persistence in " + persistencePath); // + " and persistence in " + persistencePath);
// setting configuration and logger // setting configuration and logger
config.setPersistencePath(configPath); config.setPersistencePath(configPath);
config.setConfigPath(configPath); config.setConfigPath(configPath);
config.setNumberOfResources(1); config.setNumberOfResources(1);
// setting application paths // setting application paths
String protocol = WPSConfig.getInstance().getWPSConfig().getServer().getProtocol();
String webapp = WPSConfig.getInstance().getWPSConfig().getServer().getWebappPath(); String webapp = WPSConfig.getInstance().getWPSConfig().getServer().getWebappPath();
String host = WPSConfig.getInstance().getWPSConfig().getServer().getHostname(); String host = WPSConfig.getInstance().getWPSConfig().getServer().getHostname();
String port = WPSConfig.getInstance().getWPSConfig().getServer().getHostport(); String port = WPSConfig.getInstance().getWPSConfig().getServer().getHostport();
logger.debug("Host: {} Port: {} Webapp: {} ", host, port, webapp ); logger.debug("Protocol: {} , Host: {} , Port: {} , Webapp: {} ", protocol, host, port, webapp);
logger.debug("Web persistence path:{} ", webperspath); logger.info("Web Path Persistence: {}", webperspath);
String webPath = "http://" + host + ":" + port + "/" + webapp + "/persistence/"; String webPath = protocol + "://" + host + ":" + port + "/" + webapp + "/persistence/";
// logger.debug("Env Vars: \n"+System.getenv()); // logger.debug("Env Vars: \n"+System.getenv());
logger.debug("Web app path: {} ", webPath); logger.info("Web Path Persistence Url: {}", webPath);
// retrieving scope // retrieving scope
scope = (String) inputs.get(scopeParameter); scope = (String) inputs.get(scopeParameter);
logger.debug("Retrieved scope: {} ", scope); logger.debug("Retrieved scope: {} ", scope);
if (scope == null) if (scope == null)
throw new Exception("Error: scope parameter (scope) not set! This violates e-Infrastructure security policies"); throw new Exception(
"Error: scope parameter (scope) not set! This violates e-Infrastructure security policies");
if (!scope.startsWith("/")) if (!scope.startsWith("/"))
scope = "/" + scope; scope = "/" + scope;
@ -141,7 +143,8 @@ public class ConfigurationManager {
logger.debug("User token used by the client:{} ", token); logger.debug("User token used by the client:{} ", token);
if (username == null || username.trim().length() == 0) if (username == null || username.trim().length() == 0)
throw new Exception("Error: user name parameter (user.name) not set! This violates e-Infrastructure security policies"); throw new Exception(
"Error: user name parameter (user.name) not set! This violates e-Infrastructure security policies");
if (token == null || token.trim().length() == 0) if (token == null || token.trim().length() == 0)
throw new Exception("Error: token parameter not set! This violates e-Infrastructure security policies"); throw new Exception("Error: token parameter not set! This violates e-Infrastructure security policies");

View File

@ -2,30 +2,42 @@ package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping;
import static org.gcube.common.authorization.client.Constants.authorizationService; import static org.gcube.common.authorization.client.Constants.authorizationService;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.ws.rs.core.Response;
import org.gcube.common.authorization.library.AuthorizationEntry; import org.gcube.common.authorization.library.AuthorizationEntry;
import org.gcube.common.authorization.library.provider.AccessTokenProvider;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.is.InformationSystemUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class TokenManager { public class TokenManager {
private static final Logger LOGGER= LoggerFactory.getLogger(TokenManager.class); private static final Logger LOGGER = LoggerFactory.getLogger(TokenManager.class);
String username; String username;
String scope; String scope;
String token; String token;
String tokenQualifier; String tokenQualifier;
public String getScope(){ public String getScope() {
return scope; return scope;
} }
public String getUserName(){ public String getUserName() {
return username; return username;
} }
public String getToken(){ public String getToken() {
return token; return token;
} }
@ -34,27 +46,78 @@ public class TokenManager {
} }
public void getCredentials() { public void getCredentials() {
try{ try {
LOGGER.debug("Retrieving token credentials"); LOGGER.info("Retrieving token credentials");
//get username from SmartGears // get username from SmartGears
username = AuthorizationProvider.instance.get().getClient().getId(); username = AuthorizationProvider.instance.get().getClient().getId();
token = SecurityTokenProvider.instance.get(); token = SecurityTokenProvider.instance.get();
if (token == null || token.isEmpty()) {
String jwtToken = AccessTokenProvider.instance.get();
scope = ScopeProvider.instance.get();
token = getGcubeTokenFromUriResolver(jwtToken, scope);
}
AuthorizationEntry entry = authorizationService().get(token); AuthorizationEntry entry = authorizationService().get(token);
scope = entry.getContext(); scope = entry.getContext();
tokenQualifier = entry.getQualifier(); tokenQualifier = entry.getQualifier();
} catch (Exception e) {
}catch(Exception e){ LOGGER.error("Error Retrieving token credentials: "+e.getLocalizedMessage(),e);
LOGGER.error("Error Retrieving token credentials ",e);
scope = null; scope = null;
username= null; username = null;
} }
if ((scope==null || username==null) && ConfigurationManager.isSimulationMode()){ if ((scope == null || username == null) && ConfigurationManager.isSimulationMode()) {
scope = ConfigurationManager.defaultScope; scope = ConfigurationManager.defaultScope;
username = ConfigurationManager.defaultUsername; username = ConfigurationManager.defaultUsername;
} }
LOGGER.debug("Retrieved scope: {} Username: {} Token {} SIMULATION MODE: {} ",scope, username, token, ConfigurationManager.isSimulationMode()); LOGGER.info("Retrieved scope: {} Username: {} Token {} SIMULATION MODE: {} ", scope, username, token,
ConfigurationManager.isSimulationMode());
} }
public String getGcubeTokenFromUriResolver(String jwtToken, String scope) throws Exception {
String gcubeToken = null;
String uriResolverOatURL = InformationSystemUtils.retrieveUriResolverOat(scope);
try {
LOGGER.info("Create Request: "+ uriResolverOatURL);
URL urlObj = new URL(uriResolverOatURL);
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + jwtToken);
connection.setDoOutput(true);
try (AutoCloseable conc = () -> connection.disconnect()) {
int responseCode = connection.getResponseCode();
LOGGER.info("Response Code: " + responseCode);
if (Response.Status.fromStatusCode(responseCode).compareTo(Response.Status.OK) == 0) {
try (InputStream ins = connection.getInputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(ins))) {
String inputLine = null;
while ((inputLine = in.readLine()) != null) {
break;
}
gcubeToken = inputLine;
}
} else {
String error = "Invalid Response Code retrieving GCube Token from Uri Resolver: " + responseCode;
LOGGER.error(error);
try (InputStream ins = connection.getErrorStream();
BufferedReader in = new BufferedReader(new InputStreamReader(ins))) {
String inputLine = null;
while ((inputLine = in.readLine()) != null) {
LOGGER.error(inputLine);
}
}
throw new Exception(error);
}
}
} catch (IOException e) {
LOGGER.error("Error retrieving GcubeToken from Uri Resolver: "+e.getLocalizedMessage());
e.printStackTrace();
throw e;
}
LOGGER.info("Retrieved GcubeToken: "+gcubeToken);
return gcubeToken;
}
} }

View File

@ -64,7 +64,7 @@ public class DataspaceManager implements Runnable {
public static String payload = "payload"; public static String payload = "payload";
private String statusComputationName; private String statusComputationName;
private static final String STATUS_POSTFIX="-STATUS"; private static final String STATUS_POSTFIX = "-STATUS";
public DataspaceManager(AlgorithmConfiguration config, ComputationData computation, List<StoredData> inputData, public DataspaceManager(AlgorithmConfiguration config, ComputationData computation, List<StoredData> inputData,
List<StoredData> outputData, List<File> generatedFiles) { List<StoredData> outputData, List<File> generatedFiles) {
@ -73,7 +73,7 @@ public class DataspaceManager implements Runnable {
this.inputData = inputData; this.inputData = inputData;
this.outputData = outputData; this.outputData = outputData;
this.generatedFiles = generatedFiles; this.generatedFiles = generatedFiles;
this.statusComputationName = this.computation.id+STATUS_POSTFIX; this.statusComputationName = this.computation.id + STATUS_POSTFIX;
LOGGER.debug("DataspaceManager [config=" + config + ", computation=" + computation + ", inputData=" + inputData LOGGER.debug("DataspaceManager [config=" + config + ", computation=" + computation + ", inputData=" + inputData
+ ", outputData=" + outputData + ", generatedFiles=" + generatedFiles + "]"); + ", outputData=" + outputData + ", generatedFiles=" + generatedFiles + "]");
@ -142,25 +142,26 @@ public class DataspaceManager implements Runnable {
} }
public String uploadData(StoredData data, FolderContainer destinationFolder, boolean changename) throws Exception { public String uploadData(StoredData data, FolderContainer destinationFolder, boolean changename) throws Exception {
LOGGER.debug("Dataspace->Analysing " + data); LOGGER.debug("Dataspace->Uploaddata:"
+ " [data={},destinationFolder={}, changename={}] ", data, destinationFolder,
changename);
// String filenameonwsString = WorkspaceUtil.getUniqueName(data.name, // String filenameonwsString = WorkspaceUtil.getUniqueName(data.name,
// wsFolder); // wsFolder);
String filenameonwsString = data.name; String filenameonwsString = data.name;
if (changename) if (changename)
filenameonwsString = String.format("%s_(%s)%s", data.name, data.computationId, filenameonwsString = String.format("%s_(%s)%s", data.name, data.computationId, getExtension(data.payload));
getExtension(data.payload));
InputStream in = null; InputStream in = null;
String url = ""; String url = "";
try { try {
//long size = 0; // long size = 0;
if (data.type.equals("text/csv") || data.type.equals("application/d4science") if (data.type.equals("text/csv") || data.type.equals("application/d4science")
|| data.type.equals("image/png")) { || data.type.equals("image/png")) {
if (new File(data.payload).exists() || !data.payload.startsWith("http")) { if (new File(data.payload).exists() || !data.payload.startsWith("http")) {
LOGGER.debug("Dataspace->Uploading file {}", data.payload); LOGGER.debug("Dataspace->Uploading file {}", data.payload);
in = new FileInputStream(new File(data.payload)); in = new FileInputStream(new File(data.payload));
//size = new File(data.payload).length(); // size = new File(data.payload).length();
} else { } else {
LOGGER.debug("Dataspace->Uploading via URL {}", data.payload); LOGGER.debug("Dataspace->Uploading via URL {}", data.payload);
int tries = 10; int tries = 10;
@ -188,7 +189,7 @@ public class DataspaceManager implements Runnable {
// LOGGER.debug("Dataspace->final file name on ws " + // LOGGER.debug("Dataspace->final file name on ws " +
// data.name+" description "+data.description); // data.name+" description "+data.description);
LOGGER.debug("Dataspace->WS OP saving the following file on the WS " + filenameonwsString); LOGGER.debug("Dataspace->WS OP saving the following file on the WS: " + filenameonwsString);
Map<String, Object> properties = new LinkedHashMap<String, Object>(); Map<String, Object> properties = new LinkedHashMap<String, Object>();
properties.put(computation_id, data.computationId); properties.put(computation_id, data.computationId);
@ -203,9 +204,11 @@ public class DataspaceManager implements Runnable {
properties.put(payload, url); properties.put(payload, url);
FileContainer fileContainer = destinationFolder.uploadFile(in, filenameonwsString, data.description); FileContainer fileContainer = destinationFolder.uploadFile(in, filenameonwsString, data.description);
fileContainer.setMetadata(new Metadata(properties)); LOGGER.debug("Dataspace->WS OP file uploaded on WS: " + filenameonwsString);
Metadata metadata = new Metadata(properties);
fileContainer.setMetadata(metadata);
LOGGER.debug("Dataspace->WS OP file saved on the WS " + filenameonwsString); LOGGER.debug("Dataspace->WS OP file set metadata: " + metadata);
url = fileContainer.getPublicLink().toString(); url = fileContainer.getPublicLink().toString();
LOGGER.debug("Dataspace->WS OP url produced for the file " + url); LOGGER.debug("Dataspace->WS OP url produced for the file " + url);
@ -395,10 +398,9 @@ public class DataspaceManager implements Runnable {
} }
/* /*
* List<String> scopes = new ArrayList<String>(); * List<String> scopes = new ArrayList<String>();
* scopes.add(config.getGcubeScope()); * scopes.add(config.getGcubeScope()); ws.createGcubeItem(computation.id,
* ws.createGcubeItem(computation.id, computation.operatorDescription, * computation.operatorDescription, scopes, computation.user, itemType,
* scopes, computation.user, itemType, properties, * properties, newcomputationFolder.getId());
* newcomputationFolder.getId());
*/ */
newcomputationFolder.setMetadata(new Metadata(properties)); newcomputationFolder.setMetadata(new Metadata(properties));
@ -466,7 +468,7 @@ public class DataspaceManager implements Runnable {
List<String> scopes = new ArrayList<String>(); List<String> scopes = new ArrayList<String>();
scopes.add(config.getGcubeScope()); scopes.add(config.getGcubeScope());
//TODO: update gcubeItem not recreate it... // TODO: update gcubeItem not recreate it...
GCubeItem gcubeItem = new GCubeItem(); GCubeItem gcubeItem = new GCubeItem();
gcubeItem.setName(this.statusComputationName); gcubeItem.setName(this.statusComputationName);
gcubeItem.setDescription(computation.operatorDescription); gcubeItem.setDescription(computation.operatorDescription);
@ -509,7 +511,8 @@ public class DataspaceManager implements Runnable {
.getContainers().get(0); .getContainers().get(0);
LOGGER.debug("Dataspace->removing computation data"); LOGGER.debug("Dataspace->removing computation data");
List<ItemContainer<? extends Item>> wi = computationContainer.findByName(this.statusComputationName).getContainers(); List<ItemContainer<? extends Item>> wi = computationContainer.findByName(this.statusComputationName)
.getContainers();
if (!wi.isEmpty()) { if (!wi.isEmpty()) {
for (ItemContainer<? extends Item> container : wi) { for (ItemContainer<? extends Item> container : wi) {
boolean retry = false; boolean retry = false;
@ -517,25 +520,23 @@ public class DataspaceManager implements Runnable {
try { try {
container.forceDelete(); container.forceDelete();
retry = false; retry = false;
}catch (ItemLockedException e) { } catch (ItemLockedException e) {
LOGGER.warn("item locked, retrying"); LOGGER.warn("item locked, retrying");
Thread.sleep(1000); Thread.sleep(1000);
retry = true; retry = true;
} }
}while (retry); } while (retry);
} }
} else } else
LOGGER.debug("Dataspace->Warning Could not find {} under {}", this.statusComputationName, LOGGER.debug("Dataspace->Warning Could not find {} under {}", this.statusComputationName,
computationContainer.get().getName()); computationContainer.get().getName());
/* /*
* TODO: ASK GIANPAOLO int maxtries = 3; int i =1; while * TODO: ASK GIANPAOLO int maxtries = 3; int i =1; while
* (ws.exists(computation.id,computationsFolderWs.getId()) && * (ws.exists(computation.id,computationsFolderWs.getId()) && i<maxtries){
* i<maxtries){ * LOGGER.debug("Dataspace->computation data still exist... retrying "+i );
* LOGGER.debug("Dataspace->computation data still exist... retrying "+i * Thread.sleep(1000); computationsFolderWs.find(computation.id).remove(); i++;
* ); Thread.sleep(1000); * }
* computationsFolderWs.find(computation.id).remove(); i++; }
*/ */
LOGGER.debug("Dataspace->finished removing computation data "); LOGGER.debug("Dataspace->finished removing computation data ");
@ -544,7 +545,7 @@ public class DataspaceManager implements Runnable {
// TODO // TODO
public static String getExtension(String payload) { public static String getExtension(String payload) {
LOGGER.debug("DataSpace->Get Extension from: " + payload); LOGGER.debug("DataSpace->Get Extension from: " + payload);
String extension=""; String extension = "";
if (payload.toLowerCase().startsWith("http")) { if (payload.toLowerCase().startsWith("http")) {
try { try {
URL obj = new URL(payload); URL obj = new URL(payload);

0
src/main/resources/templates/classtemplate.properties Normal file → Executable file
View File

0
src/main/resources/templates/setup.cfg Normal file → Executable file
View File

View File

View File

@ -0,0 +1,26 @@
package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping;
import org.apache.log4j.BasicConfigurator;
import org.junit.Test;
public class TokenManagerTest {
private static final String JWT_TOKEN = "";
private static final String SCOPE = "/gcube/devsec/devVRE";
@Test
public void retrieveTokenFromUriResolver() throws Exception {
try {
BasicConfigurator.configure();
System.out.println("Test Retrieve Token From Uri Resolver");
TokenManager tm = new TokenManager();
String token = tm.getGcubeTokenFromUriResolver(JWT_TOKEN, SCOPE);
System.out.println("GcubeToken retrieved: "+token);
} catch (Exception e) {
System.out.println(e.getLocalizedMessage());
e.getStackTrace();
}
}
}

View File

@ -30,7 +30,7 @@ public class AlgorithmTest {
String protocol = "http"; String protocol = "http";
String hostname = "dataminer-genericworkers.d4science.org"; String hostname = "dataminer-genericworkers.d4science.org";
String token = "257800d8-24bf-4bae-83cd-ea99369e7dd6-843339462"; String token = "xxx-xxx-xxx-xxx";
String layerID = "08ee0d70-4d8b-4f42-8b06-d709482bca95"; String layerID = "08ee0d70-4d8b-4f42-8b06-d709482bca95";
Iterator<String> uris = getUrisIterator(); Iterator<String> uris = getUrisIterator();

0
src/test/resources/AlgorithmTestURIs.txt Normal file → Executable file
View File