Compare commits

...

1959 Commits

Author SHA1 Message Date
Maverick Studer
a441909408 Merge branch 'RE-10691-fp' into 'master'
RED-10691: 500 when approving file in a dossier where dossier owner lost manager role

Closes RE-10691

See merge request redactmanager/persistence-service!930
2025-02-04 09:37:04 +01:00
maverickstuder
a7bdbb5495 RED-10691: 500 when approving file in a dossier where dossier owner lost manager role 2025-01-31 13:35:31 +01:00
Dominique Eifländer
3c0b9d36d4 Merge branch 'OPS-284' into 'master'
OPS-284: add prometheus endpoint

Closes OPS-284

See merge request redactmanager/persistence-service!928
2025-01-24 11:01:07 +01:00
Christoph Schabert
9ff3035730 OPS-284: add prometheus endpoint 2025-01-23 13:34:26 +01:00
Maverick Studer
c933793721 Merge branch 'RED-10731' into 'master'
RED-10731: Zip Bombing (~10.000 files in one zip within file limit) should be detected and aborted

Closes RED-10731

See merge request redactmanager/persistence-service!926
2025-01-21 12:21:11 +01:00
maverickstuder
4746d50627 RED-10731: Zip Bombing (~10.000 files in one zip within file limit) should be detected and aborted 2025-01-21 11:53:57 +01:00
Dominique Eifländer
fdfdba550e Merge branch 'RED-10715-masterA' into 'master'
RED-10715: Remove Saas migration fix

Closes RED-10715

See merge request redactmanager/persistence-service!925
2025-01-17 10:01:29 +01:00
Dominique Eifländer
09d53b7743 RED-10715: Remove Saas migration fix 2025-01-17 09:35:07 +01:00
Maverick Studer
d691164af6 Merge branch 'RED-10728' into 'master'
RED-10728: Endpoint to execute full OCR on specific file

Closes RED-10728

See merge request redactmanager/persistence-service!922
2025-01-16 15:54:23 +01:00
maverickstuder
43f9db59d4 RED-10728: Endpoint to execute full OCR on specific file 2025-01-16 14:38:17 +01:00
Dominique Eifländer
7669d27e7b Merge branch 'RED-10715-master' into 'master'
RED-10715: Remove Saas migration

Closes RED-10715

See merge request redactmanager/persistence-service!921
2025-01-15 13:46:38 +01:00
Dominique Eifländer
d7d46d5429 RED-10715: Remove Saas migration 2025-01-15 13:29:29 +01:00
Maverick Studer
205f9c678e Merge branch 'cleanup-truncated-indices' into 'master'
Migration fixes for 4.3 -> 4.4

See merge request redactmanager/persistence-service!918
2025-01-14 10:42:32 +01:00
Maverick Studer
cf5e235fc9 Migration fixes for 4.3 -> 4.4 2025-01-14 10:42:32 +01:00
Dominique Eifländer
25eb72ee05 Merge branch 'RED-10660' into 'master'
Migration fixes & RED-10660

Closes RED-10660

See merge request redactmanager/persistence-service!916
2025-01-13 09:07:52 +01:00
Maverick Studer
770a489f7f Migration fixes & RED-10660 2025-01-13 09:07:52 +01:00
Dominique Eifländer
18c7875844 Merge branch 'RED-10709-master' into 'master'
RED-10709: MARK_RAN for failed preCondictions in liquibase

Closes RED-10709

See merge request redactmanager/persistence-service!915
2025-01-09 14:08:05 +01:00
Dominique Eifländer
0838f30a24 RED-10709: MARK_RAN for failed preCondictions in liquibase 2025-01-09 13:53:41 +01:00
Kilian Schüttler
15e7417766 Merge branch 'hotfix-index-fp' into 'master'
hotfix: fix index preconditions

See merge request redactmanager/persistence-service!910
2025-01-09 11:31:28 +01:00
Kilian Schuettler
ab112e85c1 hotfix: fix index preconditions 2025-01-07 14:43:21 +01:00
Maverick Studer
2e3833f55d Merge branch 'RED-10669' into 'master'
RED-10669: Unassigned user can alter component values inside file viewer

Closes RED-10669

See merge request redactmanager/persistence-service!909
2025-01-07 14:23:04 +01:00
Maverick Studer
16364671d0 RED-10669: Unassigned user can alter component values inside file viewer 2025-01-07 14:23:03 +01:00
Kevin Tumma
8054806cd3 Merge branch 'hotfix-index-fp' into 'master'
hotfix: precondition check for index creation

See merge request redactmanager/persistence-service!908
2024-12-19 11:52:17 +01:00
Kilian Schuettler
d4396fe6d5 hotfix: precondition check for index creation 2024-12-19 11:31:10 +01:00
Maverick Studer
6d0354946a Merge branch 'RED-10681' into 'master'
RED-10681: Improve tracing to include metadata ids from RequestBody

Closes RED-10681

See merge request redactmanager/persistence-service!905
2024-12-13 14:50:09 +01:00
Maverick Studer
00b4ad800d RED-10681: Improve tracing to include metadata ids from RequestBody 2024-12-13 14:50:09 +01:00
Maverick Studer
34eb724170 Merge branch 'feature/RED-9998' into 'master'
RED-9998: App version history (for conditional re-analyzing the layout of a file)

Closes RED-9998

See merge request redactmanager/persistence-service!901
2024-12-12 09:58:42 +01:00
Maverick Studer
1919b1b306 RED-9998: App version history (for conditional re-analyzing the layout of a file) 2024-12-12 09:58:42 +01:00
Corina Olariu
7dae6d81c5 Merge branch 'RED-10628-fp' into 'master'
RED-10628 - Cloning dossier template after removing and editing component...

Closes RED-10628

See merge request redactmanager/persistence-service!902
2024-12-11 09:58:40 +01:00
corinaolariu
2b27e39234 RED-10628 - Cloning dossier template after removing and editing component definitions causes chain of issues
- when cloning a dossier template clone only the component definitions which are not soft deleted
- unit test added
2024-12-10 20:06:04 +02:00
Yannik Hampe
9718f8d3fd Merge branch 'feature/red-9393' into 'master'
RED-9393 user stats controller

See merge request redactmanager/persistence-service!880
2024-12-06 16:45:16 +01:00
yhampe
1a5ae41001 Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393 2024-12-06 10:04:35 +01:00
yhampe
8ed5f3388b RED-9393 user stats controller 2024-12-06 10:04:20 +01:00
yhampe
77483b6bd0 RED-9393 user stats controller 2024-12-06 10:04:19 +01:00
yhampe
c32c2cdab0 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 10:04:19 +01:00
yhampe
fbb8a7b519 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:04:02 +01:00
yhampe
61e557712b RED-9393 user stats controller 2024-12-06 10:04:00 +01:00
yhampe
c28076df68 RED-9393 user stats controller 2024-12-06 10:03:59 +01:00
yhampe
032f6f87c9 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 10:03:59 +01:00
yhampe
cfac2bcc6b RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:03:59 +01:00
yhampe
c420bda820 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 10:03:59 +01:00
yhampe
9fc3aef669 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 10:03:59 +01:00
yhampe
f55ebd9ecc RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:03:57 +01:00
yhampe
a3a1ee67fc RED-9393 user stats controller 2024-12-06 10:03:48 +01:00
yhampe
945e402639 RED-9393 user stats controller 2024-12-06 10:03:48 +01:00
yhampe
3624a6e49a RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 10:03:48 +01:00
yhampe
850e85ffdb RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:03:48 +01:00
yhampe
6b885f3212 RED-9393 user stats controller 2024-12-06 10:03:48 +01:00
yhampe
87ba79905c RED-9393 user stats controller 2024-12-06 10:03:48 +01:00
yhampe
ae8aecc005 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 10:03:47 +01:00
yhampe
45c0c3d902 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:03:47 +01:00
yhampe
3610e6c76f RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 10:03:47 +01:00
yhampe
7d07b1c882 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 10:03:47 +01:00
yhampe
abfc9eed95 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 10:03:40 +01:00
yhampe
d3e0d8f52c Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/roles/ApplicationRoles.java
2024-12-06 09:34:27 +01:00
yhampe
1967468fec RED-9393 user stats controller 2024-12-06 09:33:39 +01:00
yhampe
569c24924a RED-9393 user stats controller 2024-12-06 09:33:39 +01:00
yhampe
091a648a82 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 09:33:39 +01:00
yhampe
7a087764c1 RED-9393 user stats controller
added action roles
2024-12-06 09:33:01 +01:00
yhampe
5e60074d2f RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:50 +01:00
yhampe
635925b3fc RED-9393 user stats controller 2024-12-06 09:32:48 +01:00
yhampe
fad8fb3af2 RED-9393 user stats controller 2024-12-06 09:32:48 +01:00
yhampe
b3b547914b RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 09:32:48 +01:00
yhampe
556e6a4f6b RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:48 +01:00
yhampe
14143c9356 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:48 +01:00
yhampe
34680a3972 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:48 +01:00
yhampe
6068c39c33 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:46 +01:00
yhampe
e0717e3466 RED-9393 user stats controller 2024-12-06 09:32:39 +01:00
yhampe
bde5c88471 RED-9393 user stats controller 2024-12-06 09:32:38 +01:00
yhampe
84c1d037c6 RED-9393 user stats controller 2024-12-06 09:32:38 +01:00
yhampe
dba47d0f0f RED-9393 user stats controller 2024-12-06 09:32:38 +01:00
yhampe
298ccff842 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 09:32:38 +01:00
yhampe
ab7f6a1470 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
bc1b6b9e6d RED-9393 user stats controller 2024-12-06 09:32:38 +01:00
yhampe
5425e06399 RED-9393 user stats controller 2024-12-06 09:32:38 +01:00
yhampe
5d0b26aca6 RED-9393 user stats controller
added filter for hard deleted files
2024-12-06 09:32:38 +01:00
yhampe
1d595eb1f0 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-06 09:32:38 +01:00
yhampe
a7db55cb13 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
d2fdba5658 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
d1883fc5b6 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
a875f94ca4 RED-9393 user stats controller
added authority check
2024-12-06 09:32:38 +01:00
yhampe
df65dac4cb RED-9393 user stats controller
added action roles
2024-12-06 09:32:38 +01:00
yhampe
9667144c9b RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
8548dcaf66 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:38 +01:00
yhampe
52c5dbea1f RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-06 09:32:38 +01:00
Corina Olariu
65ccf32346 Merge branch 'feature/RED-10342' into 'master'
RED-10342 - File attributes in CSV export

Closes RED-10342

See merge request redactmanager/persistence-service!893
2024-12-06 09:29:56 +01:00
corinaolariu
fac80bbc5c Merge branch 'master' into feature/RED-10342
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/persistence/FileAttributeConfigPersistenceService.java
#	persistence-service-v1/persistence-service-server-v1/src/test/java/com/iqser/red/service/peristence/v1/server/integration/tests/FileAttributeTest.java
2024-12-06 10:04:35 +02:00
Maverick Studer
ad20597434 Merge branch 'RED-5997' into 'master'
RED-5997: dossierTemplateId property null in fileAttributes- & dossierAttributes-config

Closes RED-5997

See merge request redactmanager/persistence-service!900
2024-12-06 08:10:42 +01:00
maverickstuder
66809bb136 RED-5997: dossierTemplateId property null in fileAttributes- & dossierAttributes-config 2024-12-05 15:40:50 +01:00
Maverick Studer
c7a74fed78 Merge branch 'RED-9056' into 'master'
RED-9056: Change flag name and decline requests except dossierDictionaryOnly is true

Closes RED-9056

See merge request redactmanager/persistence-service!899
2024-12-05 15:03:45 +01:00
Maverick Studer
8a5e97b9ce RED-9056: Change flag name and decline requests except dossierDictionaryOnly is true 2024-12-05 15:03:45 +01:00
Maverick Studer
08671583fe Merge branch 'RED-10615' into 'master'
RED-10615: Full Analysis loop in DM

Closes RED-10615

See merge request redactmanager/persistence-service!898
2024-12-05 11:54:56 +01:00
Corina Olariu
e7f3b47bb6 Merge branch 'feature/RED-10543' into 'master'
RED-10343 - User should be able to set own placerholder value

Closes RED-10543

See merge request redactmanager/persistence-service!897
2024-12-05 11:51:12 +01:00
maverickstuder
00b47d21dc RED-10615: Full Analysis loop in DM 2024-12-05 11:35:15 +01:00
corinaolariu
ef86d1909d RED-10342 - File attributes in CSV export
- update the dv changelog
2024-12-05 12:15:20 +02:00
corinaolariu
793444b96e RED-10342 - File attributes in CSV export
- renaumber the yaml script
2024-12-05 11:30:52 +02:00
corinaolariu
11d97683d0 RED-10342 - File attributes in CSV export
- merge master
2024-12-05 10:59:58 +02:00
corinaolariu
e3eff19de4 Merge branch 'master' into feature/RED-10342
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/db.changelog-tenant.yaml
2024-12-05 10:58:10 +02:00
corinaolariu
c65a62e9ac RED-10343 - User should be able to set own placerholder value
- remove old function
2024-12-05 10:31:37 +02:00
yhampe
867f0a9c02 Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393 2024-12-05 09:17:49 +01:00
yhampe
d55a72e57a RED-9393 user stats controller 2024-12-05 09:17:39 +01:00
yhampe
f3fc2e2ce2 RED-9393 user stats controller 2024-12-05 09:17:39 +01:00
yhampe
3507130e64 RED-9393 user stats controller 2024-12-05 09:17:39 +01:00
yhampe
6a5792adf6 RED-9393 user stats controller 2024-12-05 09:17:39 +01:00
yhampe
d0c79c87cf RED-9393 user stats controller
removed filter for soft deleted files
2024-12-05 09:17:39 +01:00
yhampe
c95a5f027c RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-05 09:17:05 +01:00
yhampe
4f289c359f RED-9393 user stats controller 2024-12-05 09:16:48 +01:00
yhampe
4efc1b897a RED-9393 user stats controller 2024-12-05 09:16:48 +01:00
yhampe
0584172bbd RED-9393 user stats controller
added filter for hard deleted files
2024-12-05 09:16:48 +01:00
yhampe
295839c048 RED-9393 user stats controller
removed filter for soft deleted files
2024-12-05 09:16:48 +01:00
yhampe
5767e3465e RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-05 09:16:48 +01:00
yhampe
6f6095990f RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-05 09:16:48 +01:00
yhampe
f3032becf4 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-05 09:16:48 +01:00
yhampe
96a8575cb6 RED-9393 user stats controller
added authority check
2024-12-05 09:16:48 +01:00
yhampe
86ff048c6b RED-9393 user stats controller
added action roles
2024-12-05 09:16:48 +01:00
yhampe
0d3e3051ab RED-9393 user stats controller
added filter for soft deleted dossiers
2024-12-05 09:16:48 +01:00
yhampe
0d7b57dd6a RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-05 09:16:48 +01:00
yhampe
15f05624ca RED-9393 user stats controller
added filter for hard deleted dossiers
2024-12-05 09:16:48 +01:00
corinaolariu
47052745c7 Merge branch 'master' into feature/RED-10543
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/persistence/DossierAttributeConfigPersistenceService.java
2024-12-05 09:39:29 +02:00
corinaolariu
83668117da RED-10342 - File attributes in CSV export
- add includeToCsvExport field to FileAttributeDefinition
2024-12-05 09:27:49 +02:00
Dominique Eifländer
63c72bc613 Merge branch 'RED-9844' into 'master'
RED-9844: Added endpoint for get components with fileIds

Closes RED-9844

See merge request redactmanager/persistence-service!896
2024-12-04 12:06:12 +01:00
Dominique Eifländer
4453eab3bf RED-9844: Added endpoint for get components with fileIds 2024-12-04 11:45:20 +01:00
Maverick Studer
e700f8b785 Merge branch 'feature/RED-10135' into 'master'
RED-10135: Dossier attributes have fields displayed_in_file_list and filterable

Closes RED-10135

See merge request redactmanager/persistence-service!785
2024-12-03 09:30:25 +01:00
Maverick Studer
4adebda2ab RED-10135: Dossier attributes have fields displayed_in_file_list and filterable 2024-12-03 09:30:25 +01:00
Dominique Eifländer
bdaac65afe Merge branch 'RED-10526' into 'master'
RED-10526: Set liquibase to 4.29.2 as 4.30.0 is 3 times slower

Closes RED-10526

See merge request redactmanager/persistence-service!895
2024-12-02 10:07:34 +01:00
Dominique Eifländer
9956348a06 RED-10526: Set liquibase to 4.29.2 as 4.30.0 is 3 times slower 2024-12-02 09:48:57 +01:00
corinaolariu
0e08794271 RED-10343 - User should be able to set own placerholder value
- when placeholder is set, the placeholder is checked to be unique (conflict otherwise) and then used
- when placeholder is not set, the current behaviour is in place(with generated placeholder)
- update unit tests
2024-11-28 21:30:15 +02:00
yhampe
10f69631b0 RED-9393 user stats controller 2024-11-28 20:16:28 +01:00
Maverick Studer
d3f0d1bc87 Merge branch 'feature/RED-10347' into 'master'
RED-10347: Last download time field for approved files

Closes RED-10347

See merge request redactmanager/persistence-service!823
2024-11-28 10:02:59 +01:00
Maverick Studer
f2c41d5191 RED-10347: Last download time field for approved files 2024-11-28 10:02:58 +01:00
yhampe
28c97b446c RED-9393 user stats controller 2024-11-28 08:48:07 +01:00
corinaolariu
b461f95638 RED-10342 - File attributes in CSV export
- add includeToCsvExport field to FileAttributeConfig
- update unit test
2024-11-27 15:19:26 +02:00
yhampe
969004b542 Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393 2024-11-27 12:12:45 +01:00
yhampe
ce27ac8d17 RED-9393 user stats controller 2024-11-27 12:12:21 +01:00
yhampe
b04bad6057 RED-9393 user stats controller 2024-11-27 12:12:21 +01:00
yhampe
5f98b16bc1 RED-9393 user stats controller
added filter for hard deleted files
2024-11-27 12:12:21 +01:00
yhampe
71f4a78a16 RED-9393 user stats controller
removed filter for soft deleted files
2024-11-27 12:12:21 +01:00
yhampe
f9a5b5aa01 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-11-27 12:12:20 +01:00
yhampe
efbfd26363 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-27 12:11:56 +01:00
yhampe
46cab2786a RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-27 12:11:51 +01:00
yhampe
17b90b1b67 RED-9393 user stats controller
added authority check
2024-11-27 12:11:16 +01:00
yhampe
59933f4a88 RED-9393 user stats controller
added action roles
2024-11-27 12:11:16 +01:00
yhampe
d36cf3c7f2 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-11-27 12:11:15 +01:00
yhampe
861f1e559f RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-27 12:11:15 +01:00
yhampe
9b74db96ba RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-27 12:11:15 +01:00
yhampe
684dc3418d RED-9393 user stats controller 2024-11-27 12:10:43 +01:00
yhampe
b3bc7bb0ac RED-9393 user stats controller 2024-11-27 11:40:10 +01:00
yhampe
03d4f04b15 RED-9393 user stats controller
added filter for hard deleted files
2024-11-26 15:22:50 +01:00
Dominique Eifländer
95f1ea4a00 Merge branch 'RED-10526' into 'master'
Resolve RED-10526

Closes RED-10526

See merge request redactmanager/persistence-service!892
2024-11-26 15:21:10 +01:00
yhampe
5bbcfdffc0 RED-9393 user stats controller
removed filter for soft deleted files
2024-11-26 15:19:37 +01:00
Dominique Eifländer
5409b432d6 RED-10526: Upgrade liquibase to 4.30.0 2024-11-26 14:32:06 +01:00
Dominique Eifländer
292c92c827 RED-10526: Upgrade liquibase to 4.30.0 2024-11-26 10:51:01 +01:00
Maverick Studer
9ce067bd80 Merge branch 'RED-10529' into 'master'
RED-10529: Primary attribute removed after changing encoding type

Closes RED-10529

See merge request redactmanager/persistence-service!890
2024-11-26 09:41:43 +01:00
maverickstuder
5210b8ec40 RED-10529: Primary attribute removed after changing encoding type 2024-11-25 17:23:35 +01:00
Maverick Studer
15ca9ade53 Merge branch 'feature/RED-10514' into 'master'
RED-10514: Different issues with specific download endpoints (incl. customer api endpoint)

Closes RED-10514

See merge request redactmanager/persistence-service!889
2024-11-25 10:21:15 +01:00
Maverick Studer
8b1f63bf45 RED-10514: Different issues with specific download endpoints (incl. customer api endpoint) 2024-11-25 10:21:15 +01:00
Corina Olariu
c9b8be9405 Merge branch 'RED-10443' into 'master'
RED-10443 - 500 Error occurs when selecting ISO-8859-1 as Encoding Type for any CSV File Format

Closes RED-10443

See merge request redactmanager/persistence-service!887
2024-11-22 11:49:31 +01:00
Maverick Studer
af234311e6 Merge branch 'RED-10518' into 'master'
RED-10518: System-managed entity has not defined rank after import

Closes RED-10518

See merge request redactmanager/persistence-service!886
2024-11-22 10:52:24 +01:00
corinaolariu
e5ea667ea1 RED-10443 - 500 Error occurs when selecting ISO-8859-1 as Encoding Type for any CSV File Format
- accept only the IS-8859-1 as encoding. Meaningful message (400) is returned in case of bad encoding
- update unit tests and add unit test
2024-11-22 11:32:18 +02:00
maverickstuder
7ff7222072 RED-10518: System-managed entity has not defined rank after import 2024-11-22 10:22:30 +01:00
yhampe
d8b1a32783 Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393 2024-11-22 08:44:38 +01:00
yhampe
3315a679a8 RED-9393 user stats controller
added authority check
2024-11-22 08:44:24 +01:00
yhampe
013d61b0d0 RED-9393 user stats controller
added action roles
2024-11-22 08:44:24 +01:00
yhampe
afe793a523 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-11-22 08:44:24 +01:00
yhampe
23078c0b66 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-22 08:44:00 +01:00
yhampe
c1fafaee6e RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-22 08:44:00 +01:00
yhampe
fa0e29095f RED-9393 user stats controller
added authority check
2024-11-22 08:43:29 +01:00
yhampe
c7a9c2ff11 RED-9393 user stats controller
added action roles
2024-11-22 08:38:51 +01:00
Maverick Studer
3be9566a2e Merge branch 'RED-8811' into 'master'
RED-8811: Merge in recreated type does not work properly

Closes RED-8811

See merge request redactmanager/persistence-service!884
2024-11-21 16:06:38 +01:00
Maverick Studer
b62a9b9ae6 RED-8811: Merge in recreated type does not work properly 2024-11-21 16:06:38 +01:00
Maverick Studer
f08a2d512a Merge branch 'RED-10511' into 'master'
RED-10511: False warnings when approving file appears after justification refactoring

Closes RED-10511

See merge request redactmanager/persistence-service!885
2024-11-21 14:54:01 +01:00
Maverick Studer
95cd4edebb Merge branch 'RED-9059-fp' into 'master'
RED-9059: Change dictionary diff status code for successful request

Closes RED-9059

See merge request redactmanager/persistence-service!882
2024-11-21 14:53:55 +01:00
maverickstuder
21b184d97a RED-10511: False warnings when approving file appears after justification refactoring 2024-11-21 14:30:08 +01:00
maverickstuder
e393d70186 RED-10511: False warnings when approving file appears after justification refactoring 2024-11-21 13:51:21 +01:00
maverickstuder
511f392203 RED-9059: Change dictionary diff status code for successful request 2024-11-21 09:34:54 +01:00
yhampe
072c965593 RED-9393 user stats controller
added filter for soft deleted dossiers
2024-11-21 09:00:30 +01:00
Corina Olariu
65041c2b7a Merge branch 'RED-10202' into 'master'
RED-10202 - Fix ComponentOverrideTest for persistence-service pipeline

Closes RED-10202

See merge request redactmanager/persistence-service!881
2024-11-21 07:48:12 +01:00
corinaolariu
a5004c6d26 RED-10202 - Fix ComponentOverrideTest for persistence-service pipeline
- revert the file name
2024-11-20 16:21:17 +02:00
corinaolariu
58d11fc7b9 RED-10202 - Fix ComponentOverrideTest for persistence-service pipeline
- include ruleFileType.Component when the application type is documine
2024-11-20 15:33:09 +02:00
yhampe
8e40b77c70 Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393 2024-11-20 11:31:06 +01:00
yhampe
4a32f55b61 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-20 11:31:00 +01:00
yhampe
12136e0fdc RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-20 11:31:00 +01:00
Maverick Studer
2bb20ef7fa Merge branch 'feature/RED-10115' into 'master'
RED-10115: Refactoring of justifications

Closes RED-10115

See merge request redactmanager/persistence-service!841
2024-11-20 10:59:39 +01:00
Maverick Studer
2e83a72f29 RED-10115: Refactoring of justifications 2024-11-20 10:59:39 +01:00
corinaolariu
19d7670ada RED-10202 - Fix ComponentOverrideTest for persistence-service pipeline
- enable tests from component overrides
2024-11-20 11:30:42 +02:00
yhampe
8c7e64ffad RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-20 08:57:49 +01:00
yhampe
edd6b87566 RED-9393 user stats controller
added filter for hard deleted dossiers
2024-11-20 08:57:30 +01:00
Maverick Studer
b21e34ec84 Merge branch 'RED-10415-fp' into 'master'
RED-10415: Error when deleting entities from Templates without dossiers

Closes RED-10415

See merge request redactmanager/persistence-service!879
2024-11-20 01:08:47 +01:00
maverickstuder
215afe0834 RED-10415: Error when deleting entities from Templates without dossiers 2024-11-19 15:37:47 +01:00
Yannik Hampe
70d55ac6c3 Merge branch 'feature/RED-10268' into 'master'
RED-10268:

Closes RED-10268

See merge request redactmanager/persistence-service!875
2024-11-19 10:11:51 +01:00
yhampe
39e78cb033 RED-10268:
added new filter that also removes soft and hard deleted files on download preperations
2024-11-19 09:11:57 +01:00
yhampe
d4da6befb4 RED-10268:
added new filter that also removes soft and hard deleted files on download preperations
2024-11-19 08:14:50 +01:00
Kilian Schüttler
d4448fa798 Merge branch 'RED-10463' into 'master'
RED-10463: update path slightly

Closes RED-10463

See merge request redactmanager/persistence-service!872
2024-11-18 12:10:00 +01:00
Kilian Schuettler
0f72b876d0 RED-10463: update path slightly 2024-11-18 11:41:26 +01:00
Corina Olariu
ff603599b9 Merge branch 'RED-10381' into 'master'
RED-10381 - Include system-managed entities in dossier template export

Closes RED-10381

See merge request redactmanager/persistence-service!871
2024-11-15 10:30:48 +01:00
corinaolariu
2aa354dd3a RED-10381 - Include system-managed entities in dossier template export
- The system manager entities will be exported.
- At import dossier template if system managed are present in the import then they should be used and not ignored
- update unit tests
2024-11-14 23:39:14 +02:00
Corina Olariu
a1a7f4f568 Merge branch 'RED-10425' into 'master'
RED-10425 - Annotation added twice when bulk-force while auto-analysis is disabled

Closes RED-10425

See merge request redactmanager/persistence-service!857
2024-11-14 21:46:03 +01:00
corinaolariu
bf69b806de RED-10425 - Annotation added twice when bulk-force while auto-analysis is disabled
- delete unnecessary mongo xml file
2024-11-14 19:34:49 +02:00
corinaolariu
9cabeef5d5 Merge branch 'master' into RED-10425
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/resources/mongo/changelog/mongo.changelog-tenant.xml
2024-11-14 19:32:41 +02:00
Maverick Studer
4eff4803c6 Merge branch 'RED-10482' into 'master'
RED-10482: Indices not created correctly via liquibase

Closes RED-10482

See merge request redactmanager/persistence-service!867
2024-11-14 18:25:48 +01:00
Kilian Schüttler
81cee51661 Merge branch 'feature/RED-9139' into 'master'
RED-9139: move document to its own module, rename import migration

Closes RED-9139

See merge request redactmanager/persistence-service!858
2024-11-14 16:40:53 +01:00
Kilian Schüttler
357743e1d6 RED-9139: move document to its own module, rename import migration 2024-11-14 16:40:52 +01:00
maverickstuder
0afb6ca4f2 RED-10482: Indices not created correctly via liquibase 2024-11-14 16:07:02 +01:00
Kilian Schüttler
0fc9d40155 Merge branch 'RED-10463' into 'master'
RED-10463: added permission

Closes RED-10463

See merge request redactmanager/persistence-service!866
2024-11-14 13:51:16 +01:00
Kilian Schuettler
d61eee0a93 RED-10463: added permission 2024-11-14 12:23:19 +01:00
Kilian Schüttler
5563c19dca Merge branch 'RED-10463' into 'master'
RED-10463: unlock rule file endpoint

Closes RED-10463

See merge request redactmanager/persistence-service!860
2024-11-14 11:51:23 +01:00
Kilian Schuettler
491c57667b RED-10463: unlock rule file endpoint 2024-11-14 11:25:16 +01:00
corinaolariu
a1de121109 RED-10425 - Annotation added twice when bulk-force while auto-analysis is disabled
- use a custom query to get the dictionary entity log entries with the found value and positions list needed instead of the entire entity log
- add index for entityLogId and value
2024-11-13 16:20:01 +02:00
Maverick Studer
894be159f5 Merge branch 'hotfix-missing-dm-migration-fp' into 'master'
migration hotfixes

See merge request redactmanager/persistence-service!855
2024-11-13 11:20:47 +01:00
Maverick Studer
7e78063a0b migration hotfixes 2024-11-13 11:20:44 +01:00
corinaolariu
6ea68ccef4 RED-10425 - Annotation added twice when bulk-force while auto-analysis is disabled
- check for link with dictionary entry in the entity log after the found terms are received for an addbulklocal
- unit test added
2024-11-13 11:25:35 +02:00
Maverick Studer
632cfdb5f6 Merge branch 'RED-10442-fp' into 'master'
RED-10442: Migration Issue: False Warnings appears when re-approve migrated...

Closes RED-10442

See merge request redactmanager/persistence-service!853
2024-11-12 12:49:25 +01:00
maverickstuder
e37bdaabdb RED-10442: Migration Issue: False Warnings appears when re-approve migrated files with UNMAPPED_JUSTIFICATIONS 2024-11-12 12:31:00 +01:00
Maverick Studer
aa5ff0daf1 Merge branch 'RED-10444' into 'master'
RED-10444: Update Value/Classification for bulk-local rectangle redactions

Closes RED-10444

See merge request redactmanager/persistence-service!850
2024-11-12 11:02:06 +01:00
Maverick Studer
ee687e42b5 RED-10444: Update Value/Classification for bulk-local rectangle redactions 2024-11-12 11:02:06 +01:00
Maverick Studer
a599021b31 Merge branch 'feature/RED-10196' into 'master'
RED-10196: Backend adaptions for RM/DM unification

Closes RED-10196

See merge request redactmanager/persistence-service!788
2024-11-11 12:54:31 +01:00
Maverick Studer
4d36a3d813 RED-10196: Backend adaptions for RM/DM unification 2024-11-11 12:54:31 +01:00
Corina Olariu
b8710d57b3 Merge branch 'RED-9588' into 'master'
RED-9588 - No "You have been unassigned..." Notification after setting file status to back to new

Closes RED-9588

See merge request redactmanager/persistence-service!577
2024-11-08 19:52:18 +01:00
corinaolariu
bb5e7f5be7 RED-9588 - No "You have been unassigned..." Notification after setting file status to back to new
- update the condition for sending unassigned notification
- unit test added
2024-11-08 15:03:37 +02:00
Dominique Eifländer
01ab05b52e Merge branch 'RED-10353-master' into 'master'
RED-10353: Renealyse files in error state after rule change is no rules...

Closes RED-10353

See merge request redactmanager/persistence-service!575
2024-11-08 13:19:55 +01:00
Dominique Eifländer
0761ef6676 RED-10353: Renealyse files in error state after rule change is no rules exection timeout, fixed migration 2024-11-08 12:56:36 +01:00
Maverick Studer
f9183054f3 Merge branch 'feature/RED-10072' into 'master'
RED-10072: AI description field and toggle for entities

Closes RED-10072

See merge request redactmanager/persistence-service!784
2024-11-07 14:43:54 +01:00
Maverick Studer
31c3ce45f0 RED-10072: AI description field and toggle for entities 2024-11-07 14:43:54 +01:00
Timo Bejan
939ebe426b Merge branch 'feature/RED-10422' into 'master'
RED-10422 - New changes and get by ids endpoints

Closes RED-10422

See merge request redactmanager/persistence-service!846
2024-11-07 13:20:31 +01:00
Timo Bejan
f01ea9f6da RED-10422 - New changes and get by ids endpoints 2024-11-07 13:38:39 +02:00
Dominique Eifländer
25cc17bf09 Merge branch 'RED-4732-master' into 'master'
RED-4732: Fixed some auditlog messages

Closes RED-4732

See merge request redactmanager/persistence-service!845
2024-11-07 11:58:07 +01:00
Dominique Eifländer
1f60256117 RED-4732: Fixed some auditlog messages 2024-11-07 11:33:13 +01:00
Kilian Schüttler
584473565f Merge branch 'RED-10418' into 'master'
RED-10418: improve unprocessed merge performance

Closes RED-10418

See merge request redactmanager/persistence-service!842
2024-11-07 07:18:13 +01:00
Kilian Schuettler
508ac2d677 RED-10418: improve unprocessed merge performance 2024-11-06 15:51:11 +01:00
Kilian Schüttler
bb9bdabbae Merge branch 'RED-10264' into 'master'
RED-10264: reorder migrations for backport

Closes RED-10264

See merge request redactmanager/persistence-service!838
2024-11-06 10:32:13 +01:00
Yannik Hampe
f6caa94136 Merge branch 'feature/red-9393' into 'master'
RED-9393: user stats endpoint

See merge request redactmanager/persistence-service!789
2024-11-06 10:29:03 +01:00
yhampe
43d37b67b3 RED-9393: user stats endpoint
checkstyle
2024-11-06 09:48:50 +01:00
Kilian Schuettler
92aa781a8f RED-10264: reorder migrations for backport 2024-11-06 09:44:42 +01:00
yhampe
f23548adcf Merge remote-tracking branch 'origin/feature/red-9393' into feature/red-9393
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/persistence/FileStatusPersistenceService.java
2024-11-06 09:02:03 +01:00
yhampe
c21a97420d RED-9393: user stats endpoint
added endpoint with discussed path
2024-11-06 09:00:58 +01:00
Dominique Eifländer
48a7d05ba1 Merge branch 'RED-10353-master' into 'master'
RED-10353: Added error code to file

Closes RED-10353

See merge request redactmanager/persistence-service!832
2024-11-05 16:33:22 +01:00
Dominique Eifländer
1b8b828f3d RED-10353: Added error code to file 2024-11-05 15:19:43 +01:00
Timo Bejan
1e552d22c0 Merge branch 'feature/RED-10392' into 'master'
Indexes for queries that happen often

Closes RED-10392

See merge request redactmanager/persistence-service!829
2024-11-05 14:40:08 +01:00
Timo Bejan
227dd092b4 Merge branch 'master' into 'feature/RED-10392'
# Conflicts:
#   persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/db.changelog-tenant.yaml
2024-11-05 14:23:07 +01:00
Timo Bejan
a36fcff7b6 Merge branch 'feature/RED-10395' into 'master'
RED-10395 Improved component mapping query speed and performance for analysisRequired on FileStatus

Closes RED-10395

See merge request redactmanager/persistence-service!828
2024-11-05 14:22:08 +01:00
Timo Bejan
b30531f552 RED-10395 Improved component mapping query speed and performance for analysisRequired on FileStatus 2024-11-05 14:38:15 +02:00
Timo Bejan
c99f90546c Indexes for queries that happen often 2024-11-05 14:27:19 +02:00
Maverick Studer
0a8ed5d2c8 Merge branch 'RED-10354' into 'master'
RED-10354: File viewer inconsistent after selecting "Overwrite and keep manual...

Closes RED-10354

See merge request redactmanager/persistence-service!824
2024-11-05 11:27:19 +01:00
Maverick Studer
2d68469d8d RED-10354: File viewer inconsistent after selecting "Overwrite and keep manual... 2024-11-05 11:27:18 +01:00
Corina Olariu
ade8e7ed9d Merge branch 'RED-10186-fb' into 'master'
RED-10186 - Unlinked annotation with manual changes still linked and removed...

Closes RED-10186

See merge request redactmanager/persistence-service!822
2024-11-04 20:21:44 +01:00
corinaolariu
51b5201677 RED-10186 - Unlinked annotation with manual changes still linked and removed in specific corner case
- remove commented code
2024-11-04 11:23:26 +02:00
corinaolariu
1664820a82 RED-10186 - Unlinked annotation with manual changes still linked and removed in specific corner case
- update unit test
2024-11-01 15:34:00 +02:00
corinaolariu
f2df7fe783 RED-10186 - Unlinked annotation with manual changes still linked and removed in specific corner case
- when a local removal is done the MANUAL engine is not added anymore.
- removed basedOnDictAnnotationId from manual changes. The add which is always created at a local change with unlink with save the dictionary annotation id in the source id
- unit tests updated
2024-11-01 14:59:02 +02:00
Maverick Studer
48a0637fba Merge branch 'RED-10334' into 'master'
RED-10334: Wrong engine for add-to-dict dossier-level while auto-analysis is disabled

Closes RED-10334

See merge request redactmanager/persistence-service!818
2024-10-31 14:40:41 +01:00
maverickstuder
fa83069ff0 RED-10334: Wrong engine for add-to-dict dossier-level while auto-analysis is disabled 2024-10-31 12:47:27 +01:00
Dominique Eifländer
22a7f2c3af Merge branch 'RED-10353-master' into 'master'
RED-10353: Reset processingErrorCounter when rules are updated

Closes RED-10353

See merge request redactmanager/persistence-service!816
2024-10-31 11:28:59 +01:00
Dominique Eifländer
3df86ade4a RED-10353: Reset processingErrorCounter when rules are updated 2024-10-31 11:03:57 +01:00
Kilian Schüttler
a23aa12527 Merge branch 'RED-10264' into 'master'
RED-10264: add migration fixing missing legalbasis

Closes RED-10264

See merge request redactmanager/persistence-service!812
2024-10-30 14:20:21 +01:00
Kilian Schüttler
dddc608c34 RED-10264: add migration fixing missing legalbasis 2024-10-30 14:20:20 +01:00
Dominique Eifländer
b174ca57b1 Merge branch 'RED-4732-master' into 'master'
RED-4732: Added missing audit logs

Closes RED-4732

See merge request redactmanager/persistence-service!813
2024-10-30 13:21:04 +01:00
Dominique Eifländer
1fe8170ec0 RED-4732: Added missing audit logs 2024-10-30 13:00:31 +01:00
Maverick Studer
bbd8d5be9b Merge branch 'feature/RED-10297' into 'master'
RED-10297: Provide default date format file when missing on dossier template import

Closes RED-10297

See merge request redactmanager/persistence-service!808
2024-10-30 12:36:15 +01:00
Maverick Studer
258d26ede0 RED-10297: Provide default date format file when missing on dossier template import 2024-10-30 12:36:14 +01:00
Dominique Eifländer
437941fc6c Merge branch 'RED-10315-master' into 'master'
RED-10315: hardDeleteCleanupRetryTime in app config endpoint optional

Closes RED-10315

See merge request redactmanager/persistence-service!806
2024-10-30 09:56:44 +01:00
Dominique Eifländer
bb40b3fa20 RED-10315: Fixed unittest 2024-10-30 09:27:59 +01:00
Dominique Eifländer
34346b149b RED-10315: hardDeleteCleanupRetryTime in app config endpoint optional 2024-10-30 09:27:59 +01:00
Corina Olariu
0f8e78a1aa Merge branch 'RED-10071_fix' into 'master'
RED-10071 - Create system-managed entities automatically - fix component definitions

Closes RED-10071

See merge request redactmanager/persistence-service!810
2024-10-30 09:25:38 +01:00
corinaolariu
4c5f164f2e RED-10071 - Create system-managed entities automatically - fix component definitions
- when import dossier template with update before inserting component definitions, remove the existing ones
- unit test added
2024-10-29 18:51:01 +02:00
Kilian Schüttler
a2e1b4367a Merge branch 'RED-10286' into 'master'
RED-10286: handle manual changes == null

Closes RED-10286

See merge request redactmanager/persistence-service!804
2024-10-28 12:41:50 +01:00
Kilian Schuettler
b574df51bf RED-10286: handle manual changes == null 2024-10-28 12:21:38 +01:00
Kilian Schüttler
bc057e73de Merge branch 'RED-10286' into 'master'
RED-10286: Don't request all dossiers/files during file exchange

Closes RED-10286

See merge request redactmanager/persistence-service!802
2024-10-25 14:18:21 +02:00
Kilian Schüttler
13fd797148 RED-10286: Don't request all dossiers/files during file exchange 2024-10-25 14:18:21 +02:00
Kilian Schüttler
ca75ee9607 Merge branch 'mergeErrorHotfix' into 'master'
hotfix: fix merge errors

See merge request redactmanager/persistence-service!800
2024-10-25 12:52:46 +02:00
Kilian Schuettler
0f651d6a67 hotfix: fix merge errors 2024-10-25 12:28:18 +02:00
Kilian Schüttler
f69921fe59 Merge branch 'RED-10264' into 'master'
RED-10264: always include unprocessed during manual change insertion to avoid...

Closes RED-10264

See merge request redactmanager/persistence-service!796
2024-10-25 11:14:16 +02:00
Kilian Schüttler
88c5e43e51 RED-10264: always include unprocessed during manual change insertion to avoid... 2024-10-25 11:14:15 +02:00
Maverick Studer
34c1c4f51c Merge branch 'RED-10259' into 'master'
RED-10259: Failed recategorize on annotation after re-upload file without keeping changes

Closes RED-10259

See merge request redactmanager/persistence-service!798
2024-10-24 14:21:02 +02:00
maverickstuder
de0d4294ea RED-10259: Failed recategorize on annotation after re-upload file without keeping changes 2024-10-24 13:52:54 +02:00
Kilian Schüttler
3ccbac4b0e Merge branch 'feature/RED-10260-bp' into 'master'
Resolve RED-10260-bp

Closes RED-10260

See merge request redactmanager/persistence-service!794
2024-10-24 11:02:43 +02:00
Kilian Schüttler
cdde8a7da6 Resolve RED-10260-bp 2024-10-24 11:02:42 +02:00
Kilian Schüttler
ccbf977e01 Merge branch 'feature/RED-10260' into 'master'
RED-10260: add quote char to component mapping

Closes RED-10260

See merge request redactmanager/persistence-service!793
2024-10-24 11:00:59 +02:00
Kilian Schuettler
9a99398961 RED-10260: add quote char to component mapping 2024-10-23 13:56:26 +02:00
Kilian Schuettler
f86c925835 RED-10260: add quote char to component mapping 2024-10-23 13:38:53 +02:00
Kilian Schuettler
d26d24271a RED-10260: add quote char to component mapping 2024-10-23 12:11:05 +02:00
Kilian Schuettler
0ad3973d23 RED-10260: add quote char to component mapping 2024-10-23 12:09:25 +02:00
Kilian Schuettler
3fe009512f RED-10260: add quote char to component mapping 2024-10-23 12:05:22 +02:00
Kilian Schüttler
f3823a9acd Merge branch 'RED-10127' into 'master'
RED-10127: enable ocr rerun via support controller

Closes RED-10127

See merge request redactmanager/persistence-service!787
2024-10-23 10:35:12 +02:00
Kilian Schüttler
e3e3d5bc58 RED-10127: enable ocr rerun via support controller 2024-10-23 10:35:11 +02:00
Maverick Studer
60e042587e Merge branch 'RED-10224-fp2' into 'master'
RED-10224: Editing entities - Access is denied but updates value anyway

Closes RED-10224

See merge request redactmanager/persistence-service!792
2024-10-23 09:57:00 +02:00
maverickstuder
9c4804d239 RED-10224: Editing entities - Access is denied but updates value anyway 2024-10-23 09:30:36 +02:00
yhampe
f5f9247834 RED-9393: user stats endpoint
added endpoint with discussed path
2024-10-23 09:10:11 +02:00
Maverick Studer
9203993d6e Merge branch 'feature/RED-10106' into 'master'
Resolve RED-10106 "Feature/"

Closes RED-10106

See merge request redactmanager/persistence-service!765
2024-10-18 15:12:58 +02:00
maverickstuder
260851661b Merge branch 'master' into feature/RED-10106
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/build.gradle.kts
#	persistence-service-v1/persistence-service-shared-mongo-v1/build.gradle.kts
2024-10-18 14:59:35 +02:00
Maverick Studer
0ce2b1644c Merge branch 'RED-10197' into 'master'
RED-10197: Migration preparations for RM/DM unification

Closes RED-10197

See merge request redactmanager/persistence-service!786
2024-10-17 16:32:52 +02:00
Maverick Studer
5e215c2649 RED-10197: Migration preparations for RM/DM unification 2024-10-17 16:32:52 +02:00
Corina Olariu
53bb752002 Merge branch 'feature/RED-10071' into 'master'
RED-10071 - Create system-managed entities automatically

Closes RED-10071

See merge request redactmanager/persistence-service!779
2024-10-15 10:48:05 +02:00
corinaolariu
ffca299cb4 RED-10071 - Create system-managed entities automatically
- remove commented code
2024-10-15 10:56:53 +03:00
corinaolariu
a65e9e1086 Merge branch 'master' into feature/RED-10071
# Conflicts:
#	persistence-service-v1/persistence-service-server-v1/src/test/java/com/iqser/red/service/peristence/v1/server/integration/tests/ManualRedactionTest.java
2024-10-15 10:34:12 +03:00
Kilian Schüttler
abda71fca3 Merge branch 'RED-10127' into 'master'
RED-10127: Import/Export of dossiertemplate with preview files

Closes RED-10127

See merge request redactmanager/persistence-service!782
2024-10-14 15:30:18 +02:00
Kilian Schüttler
c52dfbdf5a RED-10127: Import/Export of dossiertemplate with preview files 2024-10-14 15:30:18 +02:00
Maverick Studer
fef66f92b2 Merge branch 'RED-10104-10178' into 'master'
RED-10104 && RED-10178

Closes RED-10104

See merge request redactmanager/persistence-service!783
2024-10-14 14:30:46 +02:00
Maverick Studer
cdbf69abbf RED-10104 && RED-10178 2024-10-14 14:30:46 +02:00
Dominique Eifländer
e5bac8f964 RED-10071: Fixed archive 2024-10-10 15:16:01 +02:00
Dominique Eifländer
06f5f4f241 Merge branch 'RED-10149-master' into 'master'
RED-10149: Do not re- ocr file after pages rotations; RED-10083: Minor fix in openapi spec

Closes RED-10149

See merge request redactmanager/persistence-service!778
2024-10-10 12:18:18 +02:00
Dominique Eifländer
82661dcaf2 RED-10149: Do not re- ocr file after pages rotations; RED-10083: Minor fix in openapi spec 2024-10-10 11:23:09 +02:00
corinaolariu
0ed4759266 RED-10071 - Create system-managed entities automatically
- when exporting the types, do not export system managed types
- when importing a dossier template, ignore the system managed types from the archive
- when importing a dossier template as new or a new dossier template is created, also create the system managed types.
- unit tests updated
2024-10-10 11:16:33 +03:00
Maverick Studer
15be976352 Merge branch 'RED-10112' into 'master'
RED-10112: Wrong role permissions in API endpoints for GUEST and RED_USER_ADMIN role

Closes RED-10112

See merge request redactmanager/persistence-service!775
2024-10-09 14:40:20 +02:00
Maverick Studer
9b07def91d RED-10112: Wrong role permissions in API endpoints for GUEST and RED_USER_ADMIN role 2024-10-09 14:40:20 +02:00
Maverick Studer
ec10bbdf8b Merge branch 'hotfix-rm-migration' into 'master'
RM migration creating unnecessary date formats table entries

See merge request redactmanager/persistence-service!772
2024-10-09 10:34:39 +02:00
Maverick Studer
b184217099 RM migration creating unnecessary date formats table entries 2024-10-09 10:34:39 +02:00
Dominique Eifländer
71a895f3a2 Merge branch 'RED-9823-master' into 'master'
RED-9823: Changed audit message for force annotation

Closes RED-9823

See merge request redactmanager/persistence-service!774
2024-10-09 09:14:34 +02:00
Dominique Eifländer
ac41a902a1 RED-9823: Changed audit message for force annotation 2024-10-09 08:56:03 +02:00
Timo Bejan
4397cddcc1 Merge branch 'feature/RED-10034' into 'master'
RED-10034 Improved dossier stats performance

Closes RED-10034

See merge request redactmanager/persistence-service!764
2024-10-07 15:10:23 +02:00
Timo Bejan
a557f0ab25 RED-10034 Improved dossier stats performance 2024-10-07 15:10:22 +02:00
Maverick Studer
7d52b4b0a0 Merge branch 'RED-9123' into 'master'
RED-9123: Improve performance of re-analysis (Spike)

Closes RED-9123

See merge request redactmanager/persistence-service!771
2024-10-07 13:31:16 +02:00
Maverick Studer
d794245409 RED-9123: Improve performance of re-analysis (Spike) 2024-10-07 13:31:15 +02:00
Maverick Studer
dbe7949a1c Merge branch 'RED-10146' into 'master'
RED-10146: Include defined components in component log

Closes RED-10146

See merge request redactmanager/persistence-service!769
2024-10-07 11:08:24 +02:00
Maverick Studer
4c79b8c2f4 RED-10146: Include defined components in component log 2024-10-07 11:08:24 +02:00
Maverick Studer
2ac82ab8e7 Merge branch 'RED-10104' into 'master'
RED-10104: add comments when automatic analysis enabled

Closes RED-10104

See merge request redactmanager/persistence-service!768
2024-10-07 09:22:30 +02:00
maverickstuder
44419f2c6c RED-10104: add comments when automatic analysis enabled 2024-10-02 14:28:04 +02:00
Maverick Studer
7a13b6adc2 Merge branch 'fix-migration-version-duplicate' into 'master'
fix duplicated migration version

See merge request redactmanager/persistence-service!767
2024-09-30 17:00:49 +02:00
Maverick Studer
45e67b8796 fix duplicated migration version 2024-09-30 17:00:49 +02:00
Maverick Studer
87eeddded3 Merge branch 'RED-9933' into 'master'
RED-9933: DocuMine DateFormat config in dossier templates

Closes RED-9933

See merge request redactmanager/persistence-service!766
2024-09-30 11:33:05 +02:00
Maverick Studer
e213127b25 RED-9933: DocuMine DateFormat config in dossier templates 2024-09-30 11:33:05 +02:00
Timo Bejan
adab452380 Removed allow bean override with latest deps this now works 2024-09-28 16:08:51 +03:00
Timo Bejan
f7612ac89f Renabled missing changelog 2024-09-28 16:08:51 +03:00
Timo Bejan
8d33f19453 RED-10106 - adjusted code to work with latest common deps 2024-09-28 16:08:51 +03:00
Maverick Studer
5d704e08f9 Merge branch 'RED-10117' into 'master'
RED-10117: 500 Error in Dossier Template Admin Page

Closes RED-10117

See merge request redactmanager/persistence-service!762
2024-09-27 13:50:48 +02:00
Maverick Studer
7ea1a87567 Merge branch 'RED-10114' into 'master'
RED-10114: Download fails when multiple document versions are selected...

Closes RED-10114

See merge request redactmanager/persistence-service!760
2024-09-27 13:39:18 +02:00
Maverick Studer
1c56c4665e RED-10114: Download fails when multiple document versions are selected... 2024-09-27 13:39:17 +02:00
maverickstuder
50831dabfa RED-10117: 500 Error in Dossier Template Admin Page
* remove transactional from getAllRelevantStatusesForReanalysisScheduler and addToAnalysisQueue
2024-09-27 13:26:51 +02:00
Maverick Studer
dc42fcad40 Merge branch 'RED-9947-fix2' into 'master'
RED-9947 && RED-10104

See merge request redactmanager/persistence-service!759
2024-09-27 09:25:00 +02:00
Maverick Studer
0bc8bac5d3 RED-9947 && RED-10104 2024-09-27 09:25:00 +02:00
Dominique Eifländer
0a09725ebe Merge branch 'RED-10094' into 'master'
RED-10094: Revert back migration for technical name of justifiactions

Closes RED-10094

See merge request redactmanager/persistence-service!756
2024-09-24 16:27:55 +02:00
Dominique Eifländer
bea853cbf2 RED-10094: Revert back migration for technical name of justifiactions 2024-09-24 15:53:11 +02:00
Maverick Studer
88ae52dd52 Merge branch 'RED-9933' into 'master'
RED-9933: DocuMine DateFormat config in dossier templates

Closes RED-9933

See merge request redactmanager/persistence-service!755
2024-09-24 09:28:36 +02:00
Maverick Studer
77c2f9b9a7 RED-9933: DocuMine DateFormat config in dossier templates 2024-09-24 09:28:35 +02:00
Maverick Studer
876ee17469 Merge branch 'feature/RED-9348' into 'master'
RED-9348: move component log to mongodb

Closes RED-9348

See merge request redactmanager/persistence-service!742
2024-09-23 16:05:18 +02:00
Maverick Studer
36eed8d0a1 RED-9348: move component log to mongodb 2024-09-23 16:05:17 +02:00
Maverick Studer
0f935fcba3 Merge branch 'RED-10088' into 'master'
RED-10088: Reanalyze all files in ERROR should ignore files from deleted dossiers

Closes RED-10088

See merge request redactmanager/persistence-service!754
2024-09-20 13:42:18 +02:00
Maverick Studer
a57aedf52c RED-10088: Reanalyze all files in ERROR should ignore files from deleted dossiers 2024-09-20 13:42:17 +02:00
Dominique Eifländer
63129d7727 Merge branch 'RED-10077-master' into 'master'
RED-10077: Switch cv analysis request type to table_cells to be compatible...

Closes RED-10077

See merge request redactmanager/persistence-service!752
2024-09-20 10:12:55 +02:00
Maverick Studer
82da9860ce Merge branch 'RED-10081' into 'master'
RED-10081: Update RM API specs after adding new download file type

Closes RED-10081

See merge request redactmanager/persistence-service!750
2024-09-20 10:00:38 +02:00
Dominique Eifländer
25a8bb0610 RED-10077: Switch cv analysis request type to table_cells to be compatible with new cv analysis service version 2024-09-20 09:43:07 +02:00
Maverick Studer
47ce4fab61 Merge branch 'RED-9925' into 'master'
RED-9925: 500 when creating justification without technical name or name

Closes RED-9925

See merge request redactmanager/persistence-service!748
2024-09-20 09:39:59 +02:00
Maverick Studer
09a060e1a7 RED-9925: 500 when creating justification without technical name or name 2024-09-20 09:39:59 +02:00
maverickstuder
68937f298b RED-10081: Update RM API specs after adding new download file type 2024-09-20 09:35:28 +02:00
Maverick Studer
c6110a6d65 Merge branch 'feature/RED-9010' into 'master'
RED-9010: Remove redaction log

Closes RED-9010

See merge request redactmanager/persistence-service!745
2024-09-19 11:34:42 +02:00
Maverick Studer
62719aec6f RED-9010: Remove redaction log 2024-09-19 11:34:42 +02:00
Maverick Studer
a96372e542 Merge branch 'RED-10057' into 'master'
RED-10057: legalBasisMapVersion missing in /status endpoint

Closes RED-10057

See merge request redactmanager/persistence-service!746
2024-09-19 09:41:46 +02:00
maverickstuder
3a113207d8 RED-10057: legalBasisMapVersion missing in /status endpoint 2024-09-18 16:39:10 +02:00
Maverick Studer
cbce87430f Merge branch 'RED-9925' into 'master'
RED-9925: 500 when creating justification without technical name or name

Closes RED-9925

See merge request redactmanager/persistence-service!743
2024-09-18 13:29:39 +02:00
maverickstuder
7ce90c1986 RED-9925: 500 when creating justification without technical name or name 2024-09-18 12:00:31 +02:00
Christoph Schabert
318883981e Update .gitlab-ci.yml file 2024-09-17 12:51:16 +02:00
Maverick Studer
e08690f7ee Merge branch 'RED-9947-fix' into 'master'
RED-9947: different logic in case of disabled auto analysis

Closes RED-9947

See merge request redactmanager/persistence-service!738
2024-09-13 14:29:33 +02:00
Maverick Studer
1abcd56e97 RED-9947: different logic in case of disabled auto analysis 2024-09-13 14:29:33 +02:00
Andrei Isvoran
1de9d75883 Merge branch 'RED-9394' into 'master'
RED-9394 - Add CONFIGURABLE_SMTP_SERVER license feature flag

Closes RED-9394

See merge request redactmanager/persistence-service!737
2024-09-13 12:30:02 +02:00
Andrei Isvoran
80cbda22bf RED-9394 - Add CONFIGURABLE_SMTP_SERVER license feature flag 2024-09-13 12:30:02 +02:00
Christoph Schabert
256a50775d Merge branch 'apidocs-redocly' into 'master'
Fixed some errors in the API specification.

See merge request redactmanager/persistence-service!736
2024-09-11 12:44:37 +02:00
Kresnadi Budisantoso
635dc05bde Fixed some errors in the API specification.
Additionally, added configuration and template files for Redocly API linting and docs generation, and added instructions how to use Redocly CLI.
2024-09-10 17:58:30 +02:00
Kresnadi Budisantoso
979e6a6650 Merge branch 'RED-9782-apispec-fp' into 'master'
RED-9782 Updated DocuMine and RedactManager OpenAPI spec (forward port from release/2.465.x)

See merge request redactmanager/persistence-service!645
2024-09-10 17:55:53 +02:00
Maverick Studer
361f899c70 Merge branch 'RED-9849' into 'master'
RED-9849: Counter for re-uploaded files

Closes RED-9849

See merge request redactmanager/persistence-service!731
2024-09-10 09:58:02 +02:00
Maverick Studer
04def902cd RED-9849: Counter for re-uploaded files 2024-09-10 09:58:01 +02:00
Maverick Studer
156337b82c Merge branch 'RED-9936' into 'master'
RED-9936: Clean-up job to delete all files related to hard-deleted files

Closes RED-9936

See merge request redactmanager/persistence-service!729
2024-09-10 09:26:22 +02:00
Maverick Studer
a5dea2acf1 RED-9936: Clean-up job to delete all files related to hard-deleted files 2024-09-10 09:26:22 +02:00
Andrei Isvoran
366b737e11 Merge branch 'RED-9541' into 'master'
RED-9541 - Add extra CSV validation

Closes RED-9541

See merge request redactmanager/persistence-service!733
2024-09-10 08:00:15 +02:00
Andrei Isvoran
874fdc85ee RED-9541 - Add extra CSV validation 2024-09-09 16:10:06 +03:00
Kilian Schüttler
d144b31747 Merge branch 'RED-9995' into 'master'
RED-9995: reset document_chunks in repeatStructureAnalysis

Closes RED-9995

See merge request redactmanager/persistence-service!732
2024-09-09 13:33:26 +02:00
Kilian Schuettler
5e7627862e RED-9995: reset document_chunks in repeatStructureAnalysis 2024-09-09 13:19:23 +02:00
Kilian Schüttler
e379e9b636 Merge branch 'RED-9995' into 'master'
RED-9995: fix error handling for llm-ner

Closes RED-9995

See merge request redactmanager/persistence-service!730
2024-09-06 16:17:01 +02:00
Kilian Schuettler
44f5a45887 RED-9995: fix error handling for llm-ner 2024-09-06 15:37:02 +02:00
Kilian Schüttler
9143292e0f Merge branch 'RED-9850-fp' into 'master'
RED-9850: 500 from duplicate entityLogEntries

Closes RED-9850

See merge request redactmanager/persistence-service!727
2024-09-06 14:38:15 +02:00
Kilian Schüttler
7dc6a56902 RED-9850: 500 from duplicate entityLogEntries 2024-09-06 14:38:15 +02:00
Maverick Studer
48eadc410d Merge branch 'RED-9947' into 'master'
RED-9947: bulk-local redactions

Closes RED-9947

See merge request redactmanager/persistence-service!725
2024-09-06 10:02:35 +02:00
Maverick Studer
bf5a2dd6f6 RED-9947: bulk-local redactions 2024-09-06 10:02:35 +02:00
Corina Olariu
d7ea4214ed Merge branch 'RED-9548-update' into 'master'
RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly

Closes RED-9548

See merge request redactmanager/persistence-service!726
2024-09-06 09:55:12 +02:00
corinaolariu
38a6ca6a82 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- update the merge of entity log for force redactions
- add DICTIONARY engine to the local entry if based on DICT entry
2024-09-05 18:32:19 +03:00
Maverick Studer
d7694b37a2 Merge branch 'RED-9796' into 'master'
RED-9796: Links should not be removed on upload

Closes RED-9796

See merge request redactmanager/persistence-service!723
2024-09-05 16:29:49 +02:00
Maverick Studer
32e0436f9e RED-9796: Links should not be removed on upload 2024-09-05 16:29:49 +02:00
Maverick Studer
84d2a6fac0 Merge branch 'RED-9540' into 'master'
RED-9540: Workload columns in dossier are not showing the "R" (redacted)...

Closes RED-9540

See merge request redactmanager/persistence-service!721
2024-09-05 15:51:53 +02:00
Maverick Studer
c03b489650 RED-9540: Workload columns in dossier are not showing the "R" (redacted)... 2024-09-05 15:51:53 +02:00
Maverick Studer
05676c7fa2 Merge branch 'RED-9796' into 'master'
RED-9796: Links should not be removed on upload

Closes RED-9796

See merge request redactmanager/persistence-service!720
2024-09-05 14:25:34 +02:00
Maverick Studer
8831a9b24e RED-9796: Links should not be removed on upload 2024-09-05 14:25:34 +02:00
Kilian Schüttler
e37947fb7a Merge branch 'RED-9995' into 'master'
RED-9995: fix queue names

Closes RED-9995

See merge request redactmanager/persistence-service!719
2024-09-04 14:00:47 +02:00
Kilian Schuettler
99b6310d60 RED-9995: fix queue names 2024-09-04 12:45:18 +02:00
Yannik Hampe
60371fb34b Merge branch 'RED-9958-fix' into 'master'
RED-9958:Several problems after technical_name refactoring

Closes RED-9958

See merge request redactmanager/persistence-service!717
2024-09-04 12:10:42 +02:00
yhampe
0d4c005862 RED-9958:Several problems after technical_name refactoring
changed it so name and technical name are unique, rest is optional
2024-09-04 11:57:50 +02:00
Maverick Studer
149ce5144d Merge branch 'RED-9947' into 'master'
RED-9947: added record for positions list for code readability

Closes RED-9947

See merge request redactmanager/persistence-service!718
2024-09-04 10:51:28 +02:00
maverickstuder
9c0c442eb6 RED-9947: added record for positions list for code readability 2024-09-04 10:38:51 +02:00
yhampe
e5271c928e RED-9958:Several problems after technical_name refactoring
changed it so name and technical name are unique, rest is optional
2024-09-04 10:28:14 +02:00
Maverick Studer
dd0096a04c Merge branch 'RED-9947' into 'master'
RED-9947: case sensitivity can now be set as param

Closes RED-9947

See merge request redactmanager/persistence-service!716
2024-09-03 15:49:16 +02:00
Maverick Studer
52bd1dea3c RED-9947: case sensitivity can now be set as param 2024-09-03 15:49:16 +02:00
Maverick Studer
11088ddfef Merge branch 'RED-9947' into 'master'
RED-9947: Bulk-local redactions (replacement for group redactions)

Closes RED-9947

See merge request redactmanager/persistence-service!714
2024-09-03 13:49:47 +02:00
Maverick Studer
342257a9c6 RED-9947: Bulk-local redactions (replacement for group redactions) 2024-09-03 13:49:47 +02:00
Dominique Eifländer
8e2bf84a9d Merge branch 'RED-9994-master' into 'master'
RED-9994: Removed not working transactions to avoid long open db connections...

Closes RED-9994

See merge request redactmanager/persistence-service!713
2024-09-03 12:27:04 +02:00
Dominique Eifländer
4349fdc152 RED-9994: Removed not working transactions to avoid long open db connections in SyncUserPermissionsJob 2024-09-03 12:11:34 +02:00
Corina Olariu
6957857b42 Merge branch 'RED-9548' into 'master'
RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly

Closes RED-9548

See merge request redactmanager/persistence-service!709
2024-08-30 09:46:10 +02:00
Yannik Hampe
3d9b7fc03f Merge branch 'RED-9958' into 'master'
RED-9958:Several problems after technical_name refactoring

Closes RED-9958

See merge request redactmanager/persistence-service!711
2024-08-29 15:16:13 +02:00
Maverick Studer
ff04d2a5ef Merge branch 'tenants-retry' into 'master'
Tenant retry and queue renames

See merge request redactmanager/persistence-service!710
2024-08-29 15:11:04 +02:00
Maverick Studer
4789a89257 Tenant retry and queue renames 2024-08-29 15:11:03 +02:00
yhampe
c506aefdb4 RED-9958:Several problems after technical_name refactoring
fixed tests
2024-08-29 13:51:35 +02:00
yhampe
3f9afa49e8 RED-9958:Several problems after technical_name refactoring
changed a lot of filtering from name to technical name
2024-08-29 13:31:22 +02:00
Kilian Schüttler
cfcff1f069 Merge branch 'RED-9864' into 'master'
RED-9864: prevent ocr being queued multiple times

Closes RED-9864

See merge request redactmanager/persistence-service!701
2024-08-29 12:14:21 +02:00
Kilian Schüttler
5188ab416e RED-9864: prevent ocr being queued multiple times 2024-08-29 12:14:20 +02:00
corinaolariu
a42e24d7f4 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- update db.changelog
2024-08-29 11:43:30 +03:00
Corina Olariu
65c6cdb3c9 Merge branch 'RED-9868-update' into 'master'
RED-9868 - Import older template zip with incompatible component rules breaks the stack

Closes RED-9868

See merge request redactmanager/persistence-service!702
2024-08-29 10:40:35 +02:00
corinaolariu
78e0859c02 Merge branch 'master' into RED-9548
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/EntityLogMergeService.java
#	persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/db.changelog-tenant.yaml
2024-08-29 11:16:18 +03:00
Maverick Studer
0cc48f8dfd Merge branch 'REVERT-RED-7237' into 'master'
Revert "RED-7237 - Change to group annotation"

Closes RED-7237

See merge request redactmanager/persistence-service!708
2024-08-29 09:24:00 +02:00
Maverick Studer
f1b1f270d6 Revert "RED-7237 - Change to group annotation" 2024-08-29 09:24:00 +02:00
corinaolariu
5fdb7d3773 RED-9548 - Actions results in wrong results for deadlocked annotation
- fix unit test
2024-08-29 09:34:26 +03:00
corinaolariu
a8af78c501 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- update unit test
2024-08-28 14:53:41 +03:00
corinaolariu
84ebccfe79 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- update unit test
2024-08-28 13:45:06 +03:00
corinaolariu
2ad5232e41 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- any force made to a dictionary entry will be unlinked and will create a new id to be used and will introduce 2 manual changes: local add and the manual change.
- unit tests updated
2024-08-28 11:11:46 +03:00
Dominique Eifländer
daf6f835c1 Merge branch 'RED-9959-master' into 'master'
RED-9959: Delete and recreate acl entries that can not be created after they are not found.

Closes RED-9959

See merge request redactmanager/persistence-service!706
2024-08-28 09:56:46 +02:00
Dominique Eifländer
1377394d6a RED-9959: Delete and recreate acl entries that can not be created after they are not found. 2024-08-28 09:42:28 +02:00
Yannik Hampe
98bd00a89c Merge branch 'RED-9790-logging' into 'master'
RED-9790: manual changes not applied

Closes RED-9790

See merge request redactmanager/persistence-service!704
2024-08-28 08:44:30 +02:00
yhampe
06f7e57a74 RED-9790: manual changes not applied
added logging
2024-08-27 15:03:26 +02:00
corinaolariu
8683480c40 RED-9868 - Import older template zip with incompatible component rules breaks the stack
- specify the step in which the import process failed.
- unit test updated
2024-08-27 15:03:55 +03:00
Yannik Hampe
33cec84890 Merge branch 'RED-9717' into 'master'
Resolve RED-9717

Closes RED-9717

See merge request redactmanager/persistence-service!700
2024-08-27 12:53:49 +02:00
yhampe
6feb0d2a58 RED-9717: made fileId field required and removed it from WarningModel
fixed tests
2024-08-27 12:36:57 +02:00
Maverick Studer
7a209664cb Merge branch 'RED-9331' into 'master'
RED-9331: Explore possibilities for fair upload / analysis processing per tenant

Closes RED-9331

See merge request redactmanager/persistence-service!610
2024-08-27 11:29:14 +02:00
Maverick Studer
22bf27dd73 RED-9331: Explore possibilities for fair upload / analysis processing per tenant 2024-08-27 11:29:14 +02:00
Kilian Schüttler
bb4af4c1ce Merge branch 'SPIKE-LLM_NER' into 'master'
Spike: LLM NER

See merge request redactmanager/persistence-service!699
2024-08-27 10:28:29 +02:00
Kilian Schüttler
a99b2e8165 Spike: LLM NER 2024-08-27 10:28:29 +02:00
yhampe
2908477ce8 RED-9717: made fileId field required and removed it from WarningModel 2024-08-27 09:53:58 +02:00
yhampe
b977a2e46e RED-9717: added fileId to approveresponse 2024-08-27 09:44:47 +02:00
Kilian Schüttler
9eb3ef0181 Merge branch 'RED-9965' into 'master'
RED-9965: component definitions are outside of template folder for file export

Closes RED-9965

See merge request redactmanager/persistence-service!697
2024-08-26 17:26:13 +02:00
Kilian Schuettler
a377270141 RED-9965: component definitions are outside of template folder for file export 2024-08-26 16:10:02 +02:00
Maverick Studer
5e8d8ea6f6 Merge branch 'AZURE_NER_FP' into 'master'
RED-9918: Azure entity recognition (Spike)

See merge request redactmanager/persistence-service!696
2024-08-26 11:39:08 +02:00
Maverick Studer
5494d92f39 RED-9918: Azure entity recognition (Spike) 2024-08-26 11:39:07 +02:00
Maverick Studer
1edbf8ae56 Merge branch 'RED-9865' into 'master'
RED-9865: fix for case 2

Closes RED-9865

See merge request redactmanager/persistence-service!694
2024-08-23 15:16:08 +02:00
Yannik Hampe
3adb35bec4 Merge branch 'RED-9790' into 'master'
RED-9790: manual changes not applied when too many redaction requests was sent

Closes RED-9790

See merge request redactmanager/persistence-service!691
2024-08-23 14:28:58 +02:00
maverickstuder
2697f014e6 RED-9865: fix 2024-08-23 13:19:08 +02:00
yhampe
1ac9f7ebcf RED-9790: manual changes not applied when too many redaction requests was sent
added an exception to more easily filter the traces for the cases were no exception is produced, but the manualredactions are ignored/not processed
2024-08-23 10:30:08 +02:00
Andrei Isvoran
7a9bffa3c5 Merge branch 'RED-7327-update' into 'master'
RED-7237 - Change to group annotation

Closes RED-7327

See merge request redactmanager/persistence-service!686
2024-08-22 09:24:33 +02:00
Yannik Hampe
fd910bf189 Merge branch 'RED-3813-refactoring' into 'master'
RED-3813: image similarity refactoring

Closes RED-3813

See merge request redactmanager/persistence-service!690
2024-08-21 11:20:36 +02:00
yhampe
963cf0137b RED-3813: image similarity refactoring
seperated logic for image similarity search to service

changed some logic when filtering for scope

changed some logic for filtering bad request
2024-08-21 11:05:20 +02:00
Kilian Schüttler
1037178711 Merge branch 'RED-9902-fp' into 'master'
RED-9902: fix applicationtype check

Closes RED-9902

See merge request redactmanager/persistence-service!688
2024-08-20 17:12:51 +02:00
Kilian Schuettler
a3d15f59c1 RED-9902: fix applicationtype check 2024-08-20 16:56:28 +02:00
Andrei Isvoran
555dd3330a RED-7237 - Change to group annotation 2024-08-20 17:20:50 +03:00
Yannik Hampe
9caa1f3068 Merge branch 'RED-3813-hotfix' into 'master'
RED-3813: image similarity hotifx

Closes RED-3813

See merge request redactmanager/persistence-service!685
2024-08-20 15:48:46 +02:00
yhampe
1f5c9f12ff Merge remote-tracking branch 'origin/RED-3813-hotfix' into RED-3813-hotfix 2024-08-20 14:15:17 +02:00
yhampe
833b391f47 RED-3813: image similarity hotifx
fixed mistake in spelling
2024-08-20 14:15:05 +02:00
yhampe
630cde1f8f RED-3813: image similarity hotifx
added action role to red_admin_action_roles
2024-08-20 14:15:05 +02:00
yhampe
b6b6fad242 RED-3813: image similarity hotifx
fixed mistake in spelling
2024-08-20 13:59:58 +02:00
yhampe
1253d7d0b4 RED-3813: image similarity hotifx
added action role to red_admin_action_roles
2024-08-20 11:36:59 +02:00
Kilian Schüttler
c57e4c507e Merge branch 'RED-9902-fp' into 'master'
RED-9902: create component definitions in migration

Closes RED-9902

See merge request redactmanager/persistence-service!684
2024-08-20 11:07:20 +02:00
Kilian Schuettler
7eea40cc6c RED-9902: create component definitions in migration 2024-08-20 10:52:17 +02:00
Maverick Studer
c2ed3eeff9 Merge branch 'RED-9888-9891' into 'master'
RED-9888 && RED-9891

Closes RED-9888

See merge request redactmanager/persistence-service!681
2024-08-19 16:46:14 +02:00
Maverick Studer
4beb6e0647 RED-9888 && RED-9891 2024-08-19 16:46:14 +02:00
Andrei Isvoran
ef98112871 Merge branch 'RED-7327' into 'master'
RED-7327 - Add group redactions

Closes RED-7327

See merge request redactmanager/persistence-service!662
2024-08-19 15:17:49 +02:00
Andrei Isvoran
6d1b1ca31b RED-7327 - Add group redactions 2024-08-19 15:17:48 +02:00
Andrei Isvoran
4eeee75f33 Merge branch 'RED-9717' into 'master'
RED-9717 - Add warnings on approval

Closes RED-9717

See merge request redactmanager/persistence-service!632
2024-08-19 14:27:38 +02:00
Andrei Isvoran
2a0d9ce3f9 RED-9717 - Add warnings on approval 2024-08-19 14:27:38 +02:00
Yannik Hampe
9bcf2d177e Merge branch 'RED-3813-hotfix' into 'master'
RED-3813: image similarity hotifx

Closes RED-3813

See merge request redactmanager/persistence-service!675
2024-08-19 09:00:19 +02:00
Kilian Schüttler
53c624c2c9 Merge branch 'RED-9902-fp' into 'master'
RED-9902: copy overrides to mongo

See merge request redactmanager/persistence-service!677
2024-08-16 14:58:41 +02:00
Kilian Schüttler
b8f64a1c86 RED-9902: copy overrides to mongo 2024-08-16 14:58:41 +02:00
Kilian Schüttler
2c2347f5f0 Merge branch 'RED-9843-master' into 'master'
Resolve RED-9843 "Master"

Closes RED-9843

See merge request redactmanager/persistence-service!669
2024-08-16 14:14:16 +02:00
yhampe
91e317057d RED-3813: image similarity hotifx
renaming centroId to annotationId
2024-08-16 08:54:57 +02:00
Maverick Studer
399ad6e4a1 Merge branch 'RED-9782-fix2' into 'master'
RED-9782: fix for ignored flag excludeFromAutomaticAnalysis when overriding...

Closes RED-9782

See merge request redactmanager/persistence-service!674
2024-08-15 17:00:06 +02:00
maverickstuder
829dc2f4b3 RED-9782: fix for ignored flag excludeFromAutomaticAnalysis when overriding files that are hard deleted 2024-08-15 16:26:20 +02:00
Maverick Studer
804ad3cf88 Merge branch 'RED-9891' into 'master'
RED-9891: Re-creation of component-definition does not work

Closes RED-9891

See merge request redactmanager/persistence-service!670
2024-08-15 15:26:06 +02:00
Maverick Studer
2b7be87985 RED-9891: Re-creation of component-definition does not work 2024-08-15 15:26:06 +02:00
Maverick Studer
9c539ffd21 Merge branch 'RED-9888' into 'master'
RED-9888: DM: Components not restored after file re-upload

Closes RED-9888

See merge request redactmanager/persistence-service!665
2024-08-15 15:25:54 +02:00
Maverick Studer
e4ec187c2f RED-9888: DM: Components not restored after file re-upload 2024-08-15 15:25:54 +02:00
Dominique Eifländer
8dd9a73694 RED-9843: Changed version for AddTechnicalNameToJustifications 2024-08-15 12:38:16 +02:00
Dominique Eifländer
495ed75fc3 RED-9843: Added migration for documine to reanalyse layout on not approved files 2024-08-15 12:38:16 +02:00
Maverick Studer
dc8abbba58 Merge branch 'RED-9782-fix' into 'master'
RED-9782:Automated Analysis should be disabled when uploading a document that...

See merge request redactmanager/persistence-service!667
2024-08-15 12:34:40 +02:00
Maverick Studer
13b92135ae RED-9782:Automated Analysis should be disabled when uploading a document that... 2024-08-15 12:34:40 +02:00
Dominique Eifländer
fd8da20e72 Merge branch 'RED-9868' into 'master'
RED-9868 - Import older template zip with incompatible component rules breaks the stack

Closes RED-9868

See merge request redactmanager/persistence-service!664
2024-08-15 09:20:27 +02:00
corinaolariu
6d428cd15c RED-9868 - Import older template zip with incompatible component rules breaks the stack
- fix some sonar issues
2024-08-14 12:26:51 +03:00
corinaolariu
3c32201e94 RED-9868 - Import older template zip with incompatible component rules breaks the stack
- throwing and catching an exception inside a transaction will cause the rollback.
- return the optional rules instead of throwing an error in case they are missing. update the code
- add unit test.
2024-08-14 12:09:05 +03:00
Maverick Studer
48ce264967 Merge branch 'RED-9782-fix' into 'master'
RED-9782:Automated Analysis should be disabled when uploading a document that...

Closes RED-9782

See merge request redactmanager/persistence-service!661
2024-08-12 18:40:51 +02:00
Maverick Studer
c6faa877a1 RED-9782:Automated Analysis should be disabled when uploading a document that... 2024-08-12 18:40:51 +02:00
Yannik Hampe
b1549ba775 Merge branch 'RED-5624-migration' into 'master'
RED-5624: migration

Closes RED-5624

See merge request redactmanager/persistence-service!655
2024-08-12 11:37:31 +02:00
Corina Olariu
9be0fad408 Merge branch 'RED-9832' into 'master'
RED-9832 - FalsePositives and FalseRecommendations not imported

Closes RED-9832

See merge request redactmanager/persistence-service!658
2024-08-09 13:40:17 +02:00
yhampe
b24dcdaa86 RED-5624: migration
migration is working
2024-08-09 13:29:23 +02:00
corinaolariu
00f1b8e495 RED-9832 - FalsePositives and FalseRecommendations not imported
- update the corresponding functions for entity type import
- fix the problem for upload a dossier template and update its name because of duplicate
- added unit test for duplicate names
2024-08-09 13:17:35 +03:00
yhampe
96eef1a7a2 RED-5624: migration
working on migration
2024-08-09 10:10:06 +02:00
yhampe
79fec2e9c9 RED-5624: migration
working on migration
2024-08-09 09:38:23 +02:00
Maverick Studer
8c96f75d3a Merge branch 'RED-9802' into 'master'
RED-9802: Disable Imported Redactions Flow in DM

Closes RED-9802

See merge request redactmanager/persistence-service!656
2024-08-09 09:21:53 +02:00
maverickstuder
675e9e0c42 RED-9802: Disable Imported Redactions Flow in DM 2024-08-08 17:20:32 +02:00
yhampe
cff6826424 RED-5624: migration
working on migration
2024-08-08 16:00:36 +02:00
yhampe
535f9ce8da RED-5624: migration
added class for migration
2024-08-08 14:36:54 +02:00
Andrei Isvoran
034c880e4f Merge branch 'RED-9771-delimiter-issues-fp' into 'master'
RED-9771 - Fix CSV mapping file changing delimiter and adding quotes

Closes RED-9771

See merge request redactmanager/persistence-service!654
2024-08-08 09:57:09 +02:00
Maverick Studer
8198d6cfaa Merge branch 'RED-9376' into 'master'
RED-9736: Valid file formats cache will not scale with persistence-service

Closes RED-9376

See merge request redactmanager/persistence-service!652
2024-08-08 09:24:38 +02:00
Andrei Isvoran
c80008cbb3 RED-9771 - Fix CSV mapping file changing delimiter and adding quotes 2024-08-08 10:22:44 +03:00
maverickstuder
4016a26c2c RED-9736: Valid file formats cache will not scale with persistence-service
* add redis caching for valid file formats
2024-08-07 14:59:32 +02:00
Kilian Schüttler
3af71f2760 Merge branch 'RED-5624' into 'master'
RED-5624: Refactoring of justifications

Closes RED-5624

See merge request redactmanager/persistence-service!605
2024-08-07 13:26:29 +02:00
Corina Olariu
2361d483f0 Merge branch 'RED-9474-analyze-after-undo' into 'master'
RED-9474 - Revert only local manual changes for an annotation

Closes RED-9474

See merge request redactmanager/persistence-service!651
2024-08-07 12:19:06 +02:00
corinaolariu
ff4b3369c9 RED-9474 - Revert only local manual changes for an annotation
- trigger an analysis instead of a reanalysis after an undo call
2024-08-07 12:43:54 +03:00
yhampe
043d9ca299 RED-5624: Refactoring of justifications
fixing migration
2024-08-07 11:09:49 +02:00
Maverick Studer
4351f67d16 Merge branch 'RED-9782-fp' into 'master'
RED-9782: Automated Analysis should be disabled when uploading a document that...

Closes RED-9782

See merge request redactmanager/persistence-service!650
2024-08-07 10:05:33 +02:00
Maverick Studer
5f2b851efb RED-9782: Automated Analysis should be disabled when uploading a document that... 2024-08-07 10:05:33 +02:00
yhampe
f4a7a9a25e RED-5624: Refactoring of justifications
fixing migration
2024-08-07 09:18:38 +02:00
Christoph Schabert
514cae7fe5 Update .gitlab-ci.yml file 2024-08-06 14:50:38 +02:00
Christoph Schabert
39ac84566a publish only select projects 2024-08-06 14:40:24 +02:00
Christoph Schabert
f1058caeed Update .gitlab-ci.yml file 2024-08-06 14:28:06 +02:00
Christoph Schabert
dfc1f6016c Update .gitlab-ci.yml file 2024-08-06 14:23:12 +02:00
Christoph Schabert
81099adf64 Update .gitlab-ci.yml file 2024-08-06 14:18:31 +02:00
Christoph Schabert
47e8bee9db Update .gitlab-ci.yml file 2024-08-06 13:38:43 +02:00
yhampe
c9e3a9d086 RED-5624: Refactoring of justifications
fixed ManualRedactionTest
2024-08-06 12:58:39 +02:00
yhampe
801dc52cd2 RED-5624: Refactoring of justifications
added field for technical name to EntityLogLegalBasis
2024-08-06 12:51:14 +02:00
Dominique Eifländer
cc969350f8 Merge branch 'RED-9782-master' into 'master'
RED-9782: Enabled to upload file and import only imported redactions with...

Closes RED-9782

See merge request redactmanager/persistence-service!648
2024-08-06 12:39:21 +02:00
Kilian Schüttler
a94e4a6caf Merge branch 'hotfix-duplicate-entries-fp' into 'master'
migration-hotfix: remove duplicate entries from entityLog if present

See merge request redactmanager/persistence-service!647
2024-08-06 11:35:49 +02:00
Dominique Eifländer
b72e432741 RED-9782: Fixed bugs in upload with disabledAutomaticAnalysis 2024-08-06 11:18:09 +02:00
Dominique Eifländer
b1fb547b0e RED-9782: Enabled to upload file and import only imported redactions with disabled automatic analysis 2024-08-06 11:17:57 +02:00
Kilian Schuettler
fdf3fe5b4f migration-hotfix: remove duplicate entries from entityLog if present 2024-08-06 11:03:41 +02:00
Kresnadi Budisantoso
f5b26deb4c RED-9782 Updated DocuMine and RedactManager OpenAPI spec (forward port from release/2.465.x) 2024-08-05 13:46:55 +02:00
Christoph Schabert
b7e88e4ec1 Merge branch 'hotfix-buildpacks' into 'master'
hotfix: Load buildpacks from docker-proxy.knecon.com

See merge request redactmanager/persistence-service!639
2024-08-01 13:51:16 +02:00
Dominique Eifländer
e7ae91af47 hotfix: Load buildpacks from docker-proxy.knecon.com 2024-08-01 13:39:28 +02:00
Dominique Eifländer
f760598d8f Merge branch 'RED-9255-master' into 'master'
RED-9255: Fixed possible higher versions in entityLogs than in dictionaries or...

Closes RED-9255

See merge request redactmanager/persistence-service!638
2024-08-01 11:30:20 +02:00
Dominique Eifländer
13dbd04084 RED-9255: Fixed possible higher versions in entityLogs than in dictionaries or rules when importing existing dossier templates 2024-08-01 11:16:54 +02:00
Andrei Isvoran
6a918bf939 Merge branch 'RED-9771-fp' into 'master'
RED-9771 - Fixes for updating component mappings

Closes RED-9771

See merge request redactmanager/persistence-service!636
2024-07-31 10:32:37 +02:00
Andrei Isvoran
0f15e68623 RED-9771 - Fixes for updating component mappings 2024-07-31 10:32:36 +02:00
Ali Oezyetimoglu
66f1a86c77 Merge branch 'RED-8951' into 'master'
RED-8951: added some JUnit tests

Closes RED-8951

See merge request redactmanager/persistence-service!633
2024-07-30 16:27:54 +02:00
alioezyetimoglu
09749e8344 RED-8951: added some JUnit tests 2024-07-30 15:58:27 +02:00
Andrei Isvoran
2916c19cb1 Merge branch 'RED-8749-fix-npe' into 'master'
RED-9749 - Fix NPE

Closes RED-8749

See merge request redactmanager/persistence-service!630
2024-07-29 10:40:00 +02:00
Andrei Isvoran
3a463e1ed1 RED-9749 - Fix NPE 2024-07-29 11:06:26 +03:00
Andrei Isvoran
cd899b2774 Merge branch 'RED-9749-fp' into 'master'
RED-9749 - Remove notnull constraint

Closes RED-9749

See merge request redactmanager/persistence-service!629
2024-07-29 08:15:09 +02:00
Andrei Isvoran
e73a4cb8a3 RED-9749 - Remove notnull constraint 2024-07-26 17:04:01 +03:00
Kilian Schüttler
b7c8c2b668 Merge branch 'hotfix-migration-fp' into 'master'
migration-fp-hotfix

See merge request redactmanager/persistence-service!617
2024-07-26 14:54:00 +02:00
Kilian Schuettler
844ceb66c1 fix pipeline 2024-07-26 13:31:01 +02:00
Dominique Eifländer
32aa88f6b4 Merge branch 'RED-9740-master' into 'master'
RED-9740: Added migration to add graphic type

Closes RED-9740

See merge request redactmanager/persistence-service!624
2024-07-26 12:35:27 +02:00
Dominique Eifländer
1fcd3ecd6b RED-9740: Added migration to add graphic type 2024-07-26 12:19:48 +02:00
Andrei Isvoran
6e2c2dfbdc Merge branch 'RED-9749' into 'master'
RED-9749 - Fix various issues with component definitions

Closes RED-9749

See merge request redactmanager/persistence-service!621
2024-07-26 10:42:28 +02:00
Andrei Isvoran
8b746a5db5 RED-9749 - Fix various issues with component definitions 2024-07-26 10:42:28 +02:00
Ali Oezyetimoglu
193dfaca67 Merge branch 'RED-8951' into 'master'
RED-8951: made it possible to import entities with dictionary but hasDictionary=false

Closes RED-8951

See merge request redactmanager/persistence-service!619
2024-07-24 09:02:11 +02:00
Ali Oezyetimoglu
784b67ee5a RED-8951: made it possible to import entities with dictionary but hasDictionary=false 2024-07-24 08:00:28 +02:00
Andrei Isvoran
f72ca45689 Merge branch 'RED-9140-fix-ignored' into 'master'
RED-9140 - Correctly distinct between ChangeType REMOVED and IGNORED during EntityLog merge

Closes RED-9140

See merge request redactmanager/persistence-service!616
2024-07-23 11:48:47 +02:00
Andrei Isvoran
0c4ebbd6b9 RED-9140 - Correctly distinct between ChangeType REMOVED and IGNORED during EntityLog merge 2024-07-23 11:48:46 +02:00
yhampe
bbaaa6f952 RED-5624: Refactoring of justifications
added changelog
2024-07-23 11:45:08 +02:00
yhampe
7245f71acb RED-5624: Refactoring of justifications
refactored constructor calls
2024-07-23 10:05:01 +02:00
Kilian Schuettler
b6c8ec2f7c migration-fp-hotfix 2024-07-23 09:59:18 +02:00
Kilian Schuettler
fe3b437b80 migration-fp-hotfix 2024-07-23 09:55:19 +02:00
Kilian Schüttler
2f35d2b218 Merge branch 'RED-9272-fp' into 'master'
RED-9272: increase storageToMongoDb performance

Closes RED-9272

See merge request redactmanager/persistence-service!615
2024-07-23 00:10:29 +02:00
Kilian Schuettler
2af5e9fea7 RED-9272: increase storageToMongoDb performance 2024-07-22 16:45:25 +02:00
Andrei Isvoran
e120ff589b Merge branch 'RED-9140-add-ignored' into 'master'
RED-9140 - Add ChangeType IGNORED

Closes RED-9140

See merge request redactmanager/persistence-service!613
2024-07-22 15:47:03 +02:00
Andrei Isvoran
aa1f3e0a8b RED-9140 - Add ChangeType IGNORED 2024-07-22 16:15:40 +03:00
Kilian Schüttler
8ef1c7187d Merge branch 'RED-9255' into 'master'
Resolve RED-9255

Closes RED-9255

See merge request redactmanager/persistence-service!611
2024-07-19 11:53:04 +02:00
Kilian Schüttler
15ab5d4215 Resolve RED-9255 2024-07-19 11:53:04 +02:00
Maverick Studer
20f760b37c Merge branch 'document-data-markdown' into 'master'
CLARI: document-data-markdown

See merge request redactmanager/persistence-service!609
2024-07-19 10:35:37 +02:00
Maverick Studer
8006a4c374 CLARI: document-data-markdown 2024-07-19 10:35:36 +02:00
Dominique Eifländer
3430288026 Merge branch 'RED-9658-master' into 'master'
RED-9658: Fixed wrong mongo database name

Closes RED-9658

See merge request redactmanager/persistence-service!607
2024-07-17 11:05:35 +02:00
Dominique Eifländer
5cf4c034eb RED-9658: Fixed wrong mongo database name 2024-07-17 10:51:25 +02:00
yhampe
8d340057a4 RED-5624: Refactoring of justifications
added technicalname field to entity
2024-07-17 10:13:58 +02:00
Corina Olariu
f266582f48 Merge branch 'RED-9608' into 'master'
RED-9608 - Comments not removed after uploading multiple files via ZIP-Archive...

Closes RED-9608

See merge request redactmanager/persistence-service!601
2024-07-16 16:49:24 +02:00
Kilian Schüttler
a8ead5bea4 Merge branch 'RED-9255' into 'master'
RED-9255: return imported dossier template id

Closes RED-9255

See merge request redactmanager/persistence-service!602
2024-07-16 15:43:48 +02:00
Kilian Schüttler
5f0e4b381c RED-9255: return imported dossier template id 2024-07-16 15:43:48 +02:00
Andrei Isvoran
31c2b596be Merge branch 'RED-9606-fp' into 'master'
RED-9606 - Bulk actions on many annotations

Closes RED-9606

See merge request redactmanager/persistence-service!600
2024-07-16 13:25:17 +02:00
corinaolariu
5cfb45d3d2 RED-9608 - Comments not removed after uploading multiple files via ZIP-Archive with "Overwrite and start over" selected
- update repository
2024-07-16 14:14:34 +03:00
Andrei Isvoran
14da82e2b7 RED-9606 - Bulk actions on many annotations 2024-07-16 14:01:44 +03:00
corinaolariu
552d760ead RED-9608 - Comments not removed after uploading multiple files via ZIP-Archive with "Overwrite and start over" selected
- remove (soft-delete) all comments, not just the ones related to the manual redactions at overwrite
- restore back all comments (not just the ones related to the manual redactions) when file is restored
- unit tests added
2024-07-16 13:48:25 +03:00
Andrei Isvoran
55c6b7419d Merge branch 'RED-9555-analysis-disabled-fp' into 'master'
RED-9555 - Keep force redacted image applied after changing legal basis

Closes RED-9555

See merge request redactmanager/persistence-service!596
2024-07-15 15:43:32 +02:00
Corina Olariu
b83207f715 Merge branch 'RED-9474' into 'master'
RED-9474 - Revert only local manual changes for an annotation

Closes RED-9474

See merge request redactmanager/persistence-service!590
2024-07-15 15:02:20 +02:00
Andrei Isvoran
99c7ef2529 RED-9555 - Keep force redacted image applied after changing legal basis 2024-07-15 15:47:46 +03:00
Dominique Eifländer
89446913b1 Merge branch 'RED-9658-fp' into 'master'
RED-9658: Fixed changed order of liquibase migrations

Closes RED-9658

See merge request redactmanager/persistence-service!594
2024-07-15 13:56:56 +02:00
Dominique Eifländer
e44646234e RED-9658: Fixed changed order of liquibase migrations 2024-07-15 13:45:04 +02:00
Andrei Isvoran
30c982f2c8 Merge branch 'RED-9622-fp' into 'master'
RED-9622 - Introduce csv validation

Closes RED-9622

See merge request redactmanager/persistence-service!592
2024-07-15 10:41:17 +02:00
Andrei Isvoran
7539aa4510 RED-9622 - Introduce csv validation 2024-07-15 10:53:34 +03:00
corinaolariu
c9389e04fa RED-9474 - Revert only local manual changes for an annotation
- rework the undo logic. Introduced new flag includeOnlyLocal to filter out the local changes. Now all manual changes will be reverted for the annotations provided.
- unit tests added
2024-07-12 15:59:22 +03:00
Andrei Isvoran
6f5174cc4b Merge branch 'RED-9606' into 'master'
RED-9606 - Fix removal

Closes RED-9606

See merge request redactmanager/persistence-service!586
2024-07-11 14:36:33 +02:00
Corina Olariu
1a156e0b76 Merge branch 'RED-9495' into 'master'
RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly

Closes RED-9495

See merge request redactmanager/persistence-service!583
2024-07-11 14:34:55 +02:00
Andrei Isvoran
0f3434bca1 RED-9606 - Fix removal 2024-07-11 15:11:52 +03:00
Kilian Schüttler
b5405370f4 Merge branch 'RED-8876' into 'master'
RED-8876: updated pending dictionary reasons

Closes RED-8876

See merge request redactmanager/persistence-service!409
2024-07-11 11:07:19 +02:00
Kilian Schüttler
e644afb8e6 RED-8876: updated pending dictionary reasons 2024-07-11 11:07:18 +02:00
Kilian Schüttler
cb93273528 Merge branch 'renovate/master-plugins-(non-major)' into 'master'
Update Plugins (non-major) (master)

See merge request redactmanager/persistence-service!244
2024-07-11 10:51:38 +02:00
Kilian Schüttler
67e42dc4e0 Merge branch 'renovate/master-com.fasterxml.jackson.dataformat-jackson-dataformat-xml-2.x' into 'master'
Update dependency com.fasterxml.jackson.dataformat:jackson-dataformat-xml to v2.17.2 (master)

See merge request redactmanager/persistence-service!245
2024-07-11 10:51:25 +02:00
Kilian Schüttler
84ef6e6f4c Merge branch 'renovate/master-com.iqser.red.commons-metric-commons-2.x' into 'master'
Update dependency com.iqser.red.commons:metric-commons to v2.3.0 (master)

See merge request redactmanager/persistence-service!250
2024-07-11 10:50:23 +02:00
Kilian Schüttler
4a56bbc07f Merge branch 'RED-9255' into 'master'
Some NPE fixes

Closes RED-9255

See merge request redactmanager/persistence-service!574
2024-07-11 10:44:06 +02:00
Kilian Schüttler
562e9d0761 Some NPE fixes 2024-07-11 10:44:06 +02:00
corinaolariu
3fefb8efab RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- update unit tests
2024-07-11 10:50:51 +03:00
Andrei Isvoran
57871d11c9 Merge branch 'RED-9604-42' into 'master'
RED-9604 - Don't check that removed entries still have comments

Closes RED-9604

See merge request redactmanager/persistence-service!580
2024-07-11 08:57:44 +02:00
Renovate Bot
26cba53508 Update dependency com.iqser.red.commons:metric-commons to v2.3.0 2024-07-10 17:12:51 +00:00
Renovate Bot
49fe599c35 Update dependency com.fasterxml.jackson.dataformat:jackson-dataformat-xml to v2.17.2 2024-07-10 17:12:43 +00:00
Renovate Bot
71ffb03dfc Update Plugins (non-major) 2024-07-10 17:12:40 +00:00
Andrei Isvoran
bc760a6870 RED-9604 - Don't check that removed entries still have comments 2024-07-10 17:37:21 +03:00
corinaolariu
0bf85842c1 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- rollback changes for another ticket
2024-07-10 16:03:09 +03:00
corinaolariu
4fbea2e3e7 RED-9495 - Remove here for locally resized dictionary entry should remove the entry completly
- any local resize, legal basis change and recategorization made to a dictionary entry will be unlinked and will create a new id to be used and will introduce 2 manual changes: local add and the manual change.
- unit tests added
2024-07-10 15:55:57 +03:00
Ali Oezyetimoglu
fd021041f7 Merge branch 'RED-9517' into 'master'
RED-9517: Use redis for chaching report templates

Closes RED-9517

See merge request redactmanager/persistence-service!579
2024-07-10 14:54:53 +02:00
Ali Oezyetimoglu
a40962085c RED-9573: updated redaction-report-service version to enable updated cache mechanism 2024-07-10 14:43:35 +02:00
Dominique Eifländer
3d73c6f496 RED-9517: Use redis for chaching report templates 2024-07-10 13:31:51 +02:00
Corina Olariu
6cdd888967 Merge branch 'RED-9515' into 'master'
RED-9515 - When locally added annotations are locally removed while...

Closes RED-9515

See merge request redactmanager/persistence-service!577
2024-07-10 13:03:59 +02:00
corinaolariu
e631281156 RED-9515 - When locally added annotations are locally removed while auto-analysis is off, its skipped
- fix sonar issues
2024-07-10 13:19:42 +03:00
corinaolariu
a0eee59ced RED-9515 - When locally added annotations are locally removed while auto-analysis is off, its skipped
- update unit test
2024-07-10 12:53:16 +03:00
corinaolariu
531524be1e RED-9515 - When locally added annotations are locally removed while auto-analysis is off, its skipped
- removed special character from tests
2024-07-09 12:55:30 +03:00
corinaolariu
369cc6340a RED-9515 - When locally added annotations are locally removed while auto-analysis is off, its skipped
- special case when removing local add (and other local changes to this add annotation) annotations to set the state to REMOVED instead of IGNORED.
- unit tests done
2024-07-09 12:52:49 +03:00
Andrei Isvoran
539da8d80e Merge branch 'RED-9496-fix-shutdown' into 'master'
RED-9496 - Implement graceful shutdown

Closes RED-9496

See merge request redactmanager/persistence-service!571
2024-07-04 16:07:35 +02:00
Andrei Isvoran
3ad5e0300c RED-9496 - Implement graceful shutdown 2024-07-04 16:51:40 +03:00
Dominique Eifländer
9d4a942a48 Merge branch 'RED-9551' into 'master'
RED-9551: Fixed multiple analysis on upload

Closes RED-9551

See merge request redactmanager/persistence-service!569
2024-07-04 14:18:05 +02:00
Dominique Eifländer
84fb04fb30 RED-9551: Fixed multiple analysis on upload 2024-07-04 12:51:38 +02:00
Andrei Isvoran
dc20d2c2c8 Merge branch 'RED-9498-shutdown' into 'master'
RED-9496 - Implement graceful shutdown

Closes RED-9498

See merge request redactmanager/persistence-service!567
2024-07-04 12:35:00 +02:00
Andrei Isvoran
52c564b5e3 RED-9496 - Implement graceful shutdown 2024-07-04 12:50:37 +03:00
Ali Oezyetimoglu
62852d48df Merge branch 'RED-9499' into 'master'
RED-9499: increased id size of entity fo fit typeId length of a created entity

Closes RED-9499

See merge request redactmanager/persistence-service!576
2024-07-04 09:46:07 +02:00
Ali Oezyetimoglu
d8c5668a38 Update TypeTest.java 2024-07-03 16:17:30 +02:00
Ali Oezyetimoglu
6157154378 RED-9499: increased id size of entity fo fit typeId length of a created entity
* catch too long names
* added JUnit test
2024-07-03 15:42:55 +02:00
Dominique Eifländer
1c896f72e1 Merge branch 'RED-9530' into 'master'
RED-9530: Fixed single and bulk create download endpoints in api v2

Closes RED-9530

See merge request redactmanager/persistence-service!573
2024-07-03 11:31:57 +02:00
Dominique Eifländer
db09744506 RED-9530: Fixed single and bulk create download endpoints in api v2 2024-07-03 11:19:22 +02:00
Dominique Eifländer
7326a387ca Merge branch 'RED-9500' into 'master'
RED-9500: Use Redis pub/sub to syncronize websocket topic messages accross multiple pods

Closes RED-9500

See merge request redactmanager/persistence-service!572
2024-07-02 13:18:20 +02:00
Dominique Eifländer
887e56b98e RED-9500: Use Redis pub/sub to syncronize websocket topic messages accross multiple pods 2024-07-02 13:01:23 +02:00
Maverick Studer
a8a9232c4c Merge branch 'RED-9123' into 'master'
RED-9123: Improve performance of re-analysis (Spike)

Closes RED-9123

See merge request redactmanager/persistence-service!571
2024-07-02 10:56:44 +02:00
Maverick Studer
a8b7a835c0 RED-9123: Improve performance of re-analysis (Spike) 2024-07-02 10:56:44 +02:00
Dominique Eifländer
bab96ba58d Merge branch 'RED-9487' into 'master'
RED-9487: Fixed resizing of manual redactions when auto analysis is disabled

Closes RED-9487

See merge request redactmanager/persistence-service!569
2024-07-01 12:11:42 +02:00
Dominique Eifländer
9f4edce48a RED-9487: Fixed resizing of manual redactions when auto analysis is disabled 2024-07-01 11:58:09 +02:00
Andrei Isvoran
6c857290b8 Merge branch 'RED-9349-dossier' into 'master'
RED-9349 - Add check for dossier template length

Closes RED-9349

See merge request redactmanager/persistence-service!567
2024-07-01 09:33:45 +02:00
Andrei Isvoran
f12b5d8e98 RED-9349 - Add check for dossier template length 2024-07-01 10:21:47 +03:00
Kilian Schüttler
740e88fd1b Merge branch 'hotfix-logging' into 'master'
hotfix: Fixed logging

See merge request redactmanager/persistence-service!565
2024-06-28 10:31:13 +02:00
Dominique Eifländer
c4e682254b hotfix: Fixed logging 2024-06-28 10:13:48 +02:00
Kilian Schüttler
bbb2a1b464 Merge branch 'RED-9255' into 'master'
RED-9255: fix annotations, refactor for observability

Closes RED-9255

See merge request redactmanager/persistence-service!562
2024-06-28 09:55:33 +02:00
Yannik Hampe
cc9daf9180 Merge branch 'RED-3813' into 'master'
RED-3813: image recategorization

Closes RED-3813

See merge request redactmanager/persistence-service!482
2024-06-28 08:40:39 +02:00
Kilian Schuettler
41a8a3c32a RED-9255: fix annotations, refactor for observability 2024-06-27 19:06:54 +02:00
yhampe
361b11ca2b RED-3813: image recategorization
checkstyle
2024-06-27 12:44:12 +02:00
yhampe
c3aaba45cc RED-3813: image recategorization
refactor checkstyle
2024-06-27 12:20:55 +02:00
yhampe
44bce39a2a RED-3813: image recategorization
refactor checkstyle
2024-06-27 12:19:45 +02:00
yhampe
7a24702c47 RED-3813: image recategorization
readded deleted service
2024-06-27 12:16:43 +02:00
Andrei Isvoran
7a86b37c13 Merge branch 'RED-9140' into 'master'
RED-9140 - Add more information to changes

Closes RED-9140

See merge request redactmanager/persistence-service!541
2024-06-27 11:53:35 +02:00
Andrei Isvoran
e0d00dcc48 RED-9140 - Add more information to changes 2024-06-27 11:53:35 +02:00
Kilian Schüttler
c34af58aa0 Merge branch 'RED-9375' into 'master'
RED-9375: fix component mapping endpoint validation

Closes RED-9375

See merge request redactmanager/persistence-service!561
2024-06-27 09:42:21 +02:00
Kilian Schüttler
c55aa9d206 RED-9375: fix component mapping endpoint validation 2024-06-27 09:42:21 +02:00
Corina Olariu
6956e49f4a Merge branch 'RED-9347' into 'master'
RED-9347 - Make /rss controller unavailable

Closes RED-9347

See merge request redactmanager/persistence-service!560
2024-06-27 07:18:00 +02:00
yhampe
767f77f261 RED-3813: image recategorization
removed not used changes
2024-06-26 15:28:47 +02:00
yhampe
80be82e361 RED-3813: image recategorization
removed not used changes
2024-06-26 15:27:07 +02:00
yhampe
fed0caa8d2 Merge remote-tracking branch 'origin/RED-3813' into RED-3813
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/queue/LayoutParsingFinishedMessageReceiver.java
2024-06-26 15:24:25 +02:00
yhampe
c2c6438187 RED-3813: image recategorization
merged with main
2024-06-26 15:23:36 +02:00
yhampe
7e65396ffe RED-3813: image recategorization
added saving images after layout parsing finishes

added endpoint for querying similiar images
2024-06-26 15:22:36 +02:00
yhampe
18a8f5215f RED-3813: image recategorization
added first simple clustering service
2024-06-26 15:21:32 +02:00
yhampe
0cdd10e985 RED-3813: image recategorization
fixed merge with main
2024-06-26 15:19:10 +02:00
yhampe
87cd0b06e1 Merge remote-tracking branch 'origin/RED-3813' into RED-3813
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/queue/LayoutParsingFinishedMessageReceiver.java
2024-06-26 15:06:46 +02:00
yhampe
23b437e60a RED-3813: image recategorization
added saving images after layout parsing finishes

added endpoint for querying similiar images
2024-06-26 15:05:42 +02:00
yhampe
9c48547c36 RED-3813: image recategorization
added first simple clustering service
2024-06-26 15:04:14 +02:00
yhampe
a4426e87ce RED-3813: image recategorization
added saving images after layout parsing finishes

added endpoint for querying similiar images
2024-06-26 15:03:13 +02:00
corinaolariu
94ecfbd1b4 RED-9347 - Make /rss controller unavailable
- delete unused rss files
2024-06-26 11:40:32 +03:00
Ali Oezyetimoglu
71c81631f9 Merge branch 'RED-9392-fp' into 'master'
RED-9392: added JUnit test

Closes RED-9392

See merge request redactmanager/persistence-service!559
2024-06-21 17:33:07 +02:00
Ali Oezyetimoglu
a05bbc9c7f RED-9392: added JUnit test 2024-06-21 17:22:04 +02:00
Ali Oezyetimoglu
649b8b6a46 Merge branch 'RED-9392-fp' into 'master'
RED-9392: added new entity DownloadStatusReportEntity and corresponding...

Closes RED-9392

See merge request redactmanager/persistence-service!558
2024-06-21 16:33:49 +02:00
Ali Oezyetimoglu
4af3ada659 RED-9392: added new entity DownloadStatusReportEntity and corresponding repository DownloadStatusReportRepository 2024-06-21 16:03:07 +02:00
Maverick Studer
aafe9fa31a Merge branch 'migration-version-fix' into 'master'
fixed duplicate version numbers in migrations

See merge request redactmanager/persistence-service!556
2024-06-21 12:12:40 +02:00
maverickstuder
808ce8cbaf fixed duplicate version numbers in migrations 2024-06-21 12:00:39 +02:00
Kilian Schüttler
436368b5e6 Merge branch 'RED-9255' into 'master'
RED-9255: implement file exchange

Closes RED-9255

See merge request redactmanager/persistence-service!554
2024-06-20 16:49:00 +02:00
Kilian Schuettler
07a0bacf55 RED-9375: fix component mapping endpoint validation 2024-06-20 14:31:05 +02:00
Kilian Schuettler
a1b224adbd RED-9375: fix component mapping endpoint validation 2024-06-20 13:53:51 +02:00
Kilian Schuettler
23929d2772 RED-9375: fix component mapping endpoint validation 2024-06-20 13:43:20 +02:00
Kilian Schuettler
1a585e9fe3 RED-9375: fix component mapping endpoint validation 2024-06-20 13:42:29 +02:00
Kilian Schuettler
5dd27f682b RED-9375: fix component mapping endpoint validation 2024-06-20 11:57:18 +02:00
Kilian Schuettler
e382e4e833 RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:55:48 +02:00
Kilian Schuettler
4b61a19a95 RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:46:13 +02:00
Kilian Schuettler
fbf9320f6c RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:42:51 +02:00
Kilian Schuettler
46f9523b2c RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:40:52 +02:00
Kilian Schuettler
cdece93037 RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:22:39 +02:00
Kilian Schuettler
999ecafdf8 RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:21:34 +02:00
Kilian Schuettler
f77c08aac8 RED-9255: implement file exchange
* add simplified text file to layoutparsing file export
* add validation for fileId/dossierId combinations
2024-06-20 11:13:28 +02:00
Kilian Schuettler
27d2208a72 RED-9255: give reanalysis endpoint a request model 2024-06-20 11:13:28 +02:00
Ali Oezyetimoglu
856f09583a Merge branch 'RED-8339' into 'master'
RED-8339: added NonNull constraints

Closes RED-8339

See merge request redactmanager/persistence-service!553
2024-06-19 17:49:02 +02:00
Maverick Studer
596a8dba31 Merge branch 'RED-9374' into 'master'
RED-9374: Ner Entities are at wrong locations

Closes RED-9374

See merge request redactmanager/persistence-service!552
2024-06-19 16:41:30 +02:00
maverickstuder
5e5b8e54ca RED-9374: Ner Entities are at wrong locations
* upgraded search-service version
2024-06-19 16:26:37 +02:00
Ali Oezyetimoglu
d6b95dad3e RED-8339: added NonNull constraints 2024-06-19 15:27:45 +02:00
Andrei Isvoran
2b574b502e Merge branch 'RED-9387-comments' into 'master'
RED-9387 - Update hasComments flag based on entity log entries number of comments

Closes RED-9387

See merge request redactmanager/persistence-service!551
2024-06-19 12:17:53 +02:00
Andrei Isvoran
e5b23b2df7 RED-9387 - Update hasComments flag based on entity log entries number of comments 2024-06-19 12:30:43 +03:00
Ali Oezyetimoglu
dc96ff8439 Merge branch 'RED-9369' into 'master'
RED-9369: changed status code from 200 to 204 for endpoints with no response content

Closes RED-9369

See merge request redactmanager/persistence-service!549
2024-06-18 13:06:58 +02:00
Ali Oezyetimoglu
111f79a1d8 RED-9369: changed status code from 200 to 204 for endpoints with no response content 2024-06-18 11:00:12 +02:00
Corina Olariu
08c8d65f3c Merge branch 'RED-9351' into 'master'
RED-9351 - Redaction skipped after changing only type + paragraph

Closes RED-9351

See merge request redactmanager/persistence-service!546
2024-06-18 07:36:30 +02:00
Ali Oezyetimoglu
81c21b1cbe Merge branch 'RED-9360' into 'master'
RED-9360: changed "redaction" to "annotation" for manual redactions to make it DM-conform

Closes RED-9360

See merge request redactmanager/persistence-service!548
2024-06-17 17:00:30 +02:00
Ali Oezyetimoglu
ce6ec13b4c RED-9360: changed "redaction" to "annotation" for manual redactions to make it DM-conform 2024-06-17 16:49:08 +02:00
Dominique Eifländer
0d5d6a1c7a Merge branch 'RED-9297' into 'master'
RED-9297: When removing annotation with dictionary and manual always add a local remove as well

Closes RED-9297

See merge request redactmanager/persistence-service!547
2024-06-17 15:10:56 +02:00
Dominique Eifländer
c28dcbfe40 RED-9297: When removing annotation with dictionary and manual always add a local remove as well 2024-06-17 14:58:51 +02:00
Corina Olariu
11d050a92e RED-9351 - Redaction skipped after changing only type + paragraph
- add junit test

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-06-17 14:37:53 +03:00
Corina Olariu
0f782c802d RED-9351 - Redaction skipped after changing only type + paragraph
- only on this endpoint: /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/components check if the user has a valid role (RED_USER or RED_MANAGER)

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-06-17 10:29:34 +03:00
Kilian Schüttler
e00e5043c2 Merge branch 'RED-9255' into 'master'
RED-9255: implement full file exchange between stacks

Closes RED-9255

See merge request redactmanager/persistence-service!544
2024-06-14 09:48:24 +02:00
Kilian Schüttler
e94ff93c7d RED-9255: implement full file exchange between stacks 2024-06-14 09:48:24 +02:00
Dominique Eifländer
a58bfa2f54 Merge branch 'RED-9334-obj-master' into 'master'
RED-9334: Fixed wrong objectmapper

Closes RED-9334

See merge request redactmanager/persistence-service!543
2024-06-13 13:49:37 +02:00
Dominique Eifländer
00052b7a43 RED-9334: Fixed wrong objectmapper 2024-06-13 13:36:41 +02:00
Ali Oezyetimoglu
e8202a5dae Merge branch 'RED-8339' into 'master'
RED-8339: prevent component name being null

Closes RED-8339

See merge request redactmanager/persistence-service!539
2024-06-13 11:14:01 +02:00
Ali Oezyetimoglu
0dd9d0ed07 RED-8339: prevent component name being null 2024-06-12 17:11:46 +02:00
Dominique Eifländer
057b6d805a Merge branch 'RED-9334' into 'master'
RED-9334: Enabled to stream downloads > 2gb from blob storage

Closes RED-9334

See merge request redactmanager/persistence-service!538
2024-06-12 15:46:42 +02:00
Dominique Eifländer
c90606f4c0 RED-9334: Fixed missing dependencies 2024-06-12 15:26:27 +02:00
Dominique Eifländer
63253581a3 RED-9334: Enabled to stream downloads > 2gb from blob storage 2024-06-12 11:22:45 +02:00
Andrei Isvoran
a586ec0eeb Merge branch 'RED-9290' into 'master'
RED-9290 - Component management for dossier template clone/import/export

Closes RED-9290

See merge request redactmanager/persistence-service!529
2024-06-12 08:12:23 +02:00
Andrei Isvoran
9e1189726d RED-9290 - Component management for dossier template clone/import/export 2024-06-12 08:12:23 +02:00
Dominique Eifländer
65ca13089b Merge branch 'RED-9250-fp' into 'master'
RED-9250: Do not run any scheduled jobs in parallel

Closes RED-9250

See merge request redactmanager/persistence-service!537
2024-06-11 10:58:18 +02:00
Dominique Eifländer
4451c07f02 RED-9250: Do not run any scheduled jobs in parallel 2024-06-11 10:45:34 +02:00
Christoph Schabert
d0faf8a33d Merge branch 'RED-9114-apispec' into 'master'
RED-9225 / RED-9114: Added resource owner password credentials grant (password flow).

See merge request redactmanager/persistence-service!535
2024-06-11 07:48:40 +02:00
Kresnadi Budisantoso
78e82020ab RED-9225: Added resource owner password credentials grant (password flow). 2024-06-07 13:19:22 +02:00
Dominique Eifländer
5baaa71933 Merge branch 'RED-9225-findings-3-fp' into 'master'
RED-9225: Fixed not validated dossier template id in create download dossier

Closes RED-9225

See merge request redactmanager/persistence-service!533
2024-06-07 11:06:52 +02:00
Dominique Eifländer
16c3388ffe RED-9225: Fixed not validated dossier template id in create download dossier 2024-06-07 10:51:05 +02:00
Kilian Schüttler
2ef9800eae Merge branch 'RED-9145' into 'master'
RED-9145: remove EXPERIMENTAL role which no user has

Closes RED-9145

See merge request redactmanager/persistence-service!531
2024-06-07 10:44:53 +02:00
Kilian Schuettler
4843f79466 RED-9145: remove EXPERIMENTAL role which no user has 2024-06-07 10:32:35 +02:00
Ali Oezyetimoglu
a6c6a4111c Merge branch 'RED-8339-7' into 'master'
RED-8339: fixed misbehaving when adding an override in old endpoint

Closes RED-8339

See merge request redactmanager/persistence-service!530
2024-06-07 09:59:50 +02:00
Ali Oezyetimoglu
abccf8ca82 RED-8339: fixed misbehaving when adding an override in old endpoint 2024-06-07 08:36:10 +02:00
Dominique Eifländer
26d03e6b6f Merge branch 'RED-9225-findings2-fp' into 'master'
Resolve RED-9225 "Findings2 fp"

Closes RED-9225

See merge request redactmanager/persistence-service!528
2024-06-06 15:21:00 +02:00
Dominique Eifländer
c67fa5926b RED-9225: Added endpoint to get report templates in new customer api, fixed some bugs 2024-06-06 15:05:49 +02:00
Dominique Eifländer
0f203d39a4 RED-9270: Fixed download of report template, RED-9225: Minor fixes for new customer api 2024-06-06 14:55:42 +02:00
Dominique Eifländer
dae360a7ac Merge branch 'RED-9114-apispec' into 'master'
RED-9225 / RED-9114 RedactManager API Specs for BASF - Added possibility to...

Closes RED-9114

See merge request redactmanager/persistence-service!526
2024-06-06 14:53:26 +02:00
Kresnadi Budisantoso
64f519f100 RED-9225 / RED-9114 RedactManager API Specs for BASF - Added possibility to retrieve the available report templates
Additionally:
* Added `approverIds` to `DossierRequest` schema
* Harmonized some descriptions between RedactManager and DocuMine specs
2024-06-06 12:39:10 +02:00
Ali Oezyetimoglu
e377df12a0 Merge branch 'RED-8339-6' into 'master'
RED-8339: rolled back signature changes in old component log endpoints

Closes RED-8339

See merge request redactmanager/persistence-service!524
2024-06-06 12:30:57 +02:00
Ali Oezyetimoglu
62c81c3654 RED-8339: rolled back signature changes in old component log endpoints 2024-06-06 12:02:58 +02:00
Maverick Studer
a4683a4eed Merge branch 'RED-9254' into 'master'
RED-9254: Support Controller (Part 1)

Closes RED-9254

See merge request redactmanager/persistence-service!523
2024-06-06 10:21:26 +02:00
Maverick Studer
f9090cfa3f RED-9254: Support Controller (Part 1) 2024-06-06 10:21:26 +02:00
Andrei Isvoran
398ec390b7 Merge branch 'RED-9221-mongo' into 'master'
RED-9221 - Add duplicated text ranges for entity log in mongo

Closes RED-9221

See merge request redactmanager/persistence-service!522
2024-06-05 13:24:47 +02:00
Andrei Isvoran
b52ac441e9 RED-9221 - Add duplicated text ranges for entity log in mongo 2024-06-05 14:12:48 +03:00
Dominique Eifländer
b08a666022 Merge branch 'RED-9225-fp' into 'master'
RED-9225: Fixed findings in new customer api

Closes RED-9225

See merge request redactmanager/persistence-service!521
2024-06-05 11:23:42 +02:00
Dominique Eifländer
088a4ac21b RED-9225: Fixed findings in new customer api 2024-06-05 10:50:17 +02:00
Andrei Isvoran
06b3d236c8 Merge branch 'RED-9221' into 'master'
RED-9221 - Add duplicated text ranges to EntityLogEntry

Closes RED-9221

See merge request redactmanager/persistence-service!520
2024-06-05 10:32:38 +02:00
Andrei Isvoran
a18f9d11b8 RED-9221 - Add duplicated text ranges to EntityLogEntry 2024-06-05 10:32:38 +02:00
Andrei Isvoran
fb133a4770 Merge branch 'RED-9142' into 'master'
RED-9142 - Basic component management

Closes RED-9142

See merge request redactmanager/persistence-service!515
2024-06-05 08:13:25 +02:00
Andrei Isvoran
bb9e977e78 RED-9142 - Basic component management 2024-06-05 08:13:25 +02:00
Ali Oezyetimoglu
581206bd16 Merge branch 'RED-8339-5' into 'master'
RED-8339: rolled back signature changes in old component log endpoints

Closes RED-8339

See merge request redactmanager/persistence-service!519
2024-06-04 17:29:20 +02:00
Kilian Schüttler
46123e179d Merge branch 'RED-9145' into 'master'
RED-9145: revert accidental changes

Closes RED-9145

See merge request redactmanager/persistence-service!518
2024-06-04 17:29:17 +02:00
Ali Oezyetimoglu
6a4047effb RED-8339: rolled back signature changes in old component log endpoints 2024-06-04 17:13:58 +02:00
Kilian Schuettler
01747eab4f RED-9145: remove unnecessary logs
* revert accidental remove of retry
2024-06-04 17:13:56 +02:00
Christoph Schabert
4b6cfbb66d Update .gitlab-ci.yml file 2024-06-04 09:49:18 +02:00
Christoph Schabert
e4a5e6efb7 Update .gitlab-ci.yml file 2024-06-04 09:23:44 +02:00
Christoph Schabert
cf124d1326 add custom sonar token 2024-06-04 08:09:27 +02:00
Ali Oezyetimoglu
fe777da0f5 Merge branch 'RED-8339-4' into 'master'
Resolve RED-8339 "4"

Closes RED-8339

See merge request redactmanager/persistence-service!511
2024-06-03 15:38:31 +02:00
Dominique Eifländer
b66e436058 Merge branch 'RED-9114-apispec' into 'master'
RED-9114 - RedactManager API Specs for BASF (Cherry-picked merge-commit...

See merge request redactmanager/persistence-service!505
2024-06-03 14:54:11 +02:00
Kresnadi Budisantoso
1622228613 Fixed missing path parameter reference and removed wrong endpoint tags 2024-06-03 14:41:20 +02:00
Ali Oezyetimoglu
a5866b36c8 RED-8339: some refactoring 2024-06-03 13:13:25 +02:00
Ali Oezyetimoglu
efd777acd8 RED-8339: some refactoring 2024-06-03 13:09:45 +02:00
Maverick Studer
05faad96bc Merge branch 'RED-9254' into 'master'
RED-9254: Support Controller (Part 1)

Closes RED-9254

See merge request redactmanager/persistence-service!512
2024-06-03 12:36:20 +02:00
Maverick Studer
cfda6a8217 RED-9254: Support Controller (Part 1) 2024-06-03 12:36:20 +02:00
Ali Oezyetimoglu
f4bdff1901 Merge branch 'RED-9280' into 'master'
RED-9280: added permission check for updateFlag endpoint

Closes RED-9280

See merge request redactmanager/persistence-service!514
2024-06-03 12:17:50 +02:00
Kresnadi Budisantoso
55922a85e8 RedactManager API Specs for BASF - Improved descriptions 2024-06-03 12:02:56 +02:00
Kresnadi Budisantoso
f3758fb003 RedactManager API Specs for BASF - Fixed missing property, fields and examples
* Added missing userId property definition
* Added dossierCount to DossierStatusDefinition schema
* Added IMAGE value to type enum of DossierAttributeDefinition schema
* Added missing dossierAttributes to examples of the Dossier and DossierList schemas
* Fixed examples of fileAttributes in FileStatus and FileStatusList schemas
2024-06-03 12:02:56 +02:00
Dominique Eifländer
00a1cadb83 RED-9114 - RedactManager API Specs for BASF (Cherry-picked merge-commit 0ecd23304 from release/2.349.x) 2024-06-03 12:02:40 +02:00
Dominique Eifländer
fac9544864 Merge branch 'RED-9225-fp' into 'master'
RED-9225: Implemented new endpoints for api v2

Closes RED-9225

See merge request redactmanager/persistence-service!513
2024-06-03 11:55:36 +02:00
Ali Oezyetimoglu
5d480887a2 RED-9280: added permission check for updateFlag endpoint 2024-06-03 11:53:12 +02:00
Dominique Eifländer
3e205d0b1b RED-9225: Implemented new endpoints for api v2 2024-06-03 10:43:11 +02:00
Ali Oezyetimoglu
adb6332bf5 RED-8339: Fixes 2024-06-03 10:24:10 +02:00
Ali Oezyetimoglu
23cf4cf5e9 RED-8339: Fixes 2024-06-02 11:22:31 +02:00
Ali Oezyetimoglu
2ae40e6403 RED-8339: Updated OpenApi Specs 2024-05-29 18:24:40 +02:00
Ali Oezyetimoglu
1a4d97a14f RED-8339: Updated OpenApi Specs 2024-05-29 18:24:40 +02:00
Ali Oezyetimoglu
d921c3f6a0 RED-8339: Updated OpenApi Specs 2024-05-29 18:24:40 +02:00
Ali Oezyetimoglu
9079ae18af RED-8339: Component Overrides in DocuMine 2024-05-29 18:24:29 +02:00
Kilian Schüttler
9e70d9e199 Merge branch 'RED-9145' into 'master'
RED-9145: add component mappings

Closes RED-9145

See merge request redactmanager/persistence-service!485
2024-05-29 12:49:21 +02:00
Kilian Schüttler
6412f58d58 RED-9145: add component mappings 2024-05-29 12:49:21 +02:00
Maverick Studer
c2d02b3faa Merge branch 'RED-6821-9210' into 'master'
RED-6821: Dossier templates only soft-deleted, cannot create new template with same name && RED-9210: RED_USER and RED_MANAGER can bulk-delete dossier-templates - should return 403

Closes RED-6821

See merge request redactmanager/persistence-service!509
2024-05-29 11:58:53 +02:00
Maverick Studer
aabfd5d8b5 RED-6821: Dossier templates only soft-deleted, cannot create new template with same name && RED-9210: RED_USER and RED_MANAGER can bulk-delete dossier-templates - should return 403 2024-05-29 11:58:53 +02:00
Andrei Isvoran
1387065784 Merge branch 'RED-9164' into 'master'
RED-9164 - Change back OCR queues

Closes RED-9164

See merge request redactmanager/persistence-service!506
2024-05-28 13:18:17 +02:00
Andrei Isvoran
afa61062e4 RED-9164 - Change back OCR queues 2024-05-28 11:51:05 +03:00
Andrei Isvoran
efdf6a8868 Merge branch 'RED-9164' into 'master'
RED-9164 - Change OCR queues to match with older OCR version

Closes RED-9164

See merge request redactmanager/persistence-service!504
2024-05-27 11:27:08 +02:00
Andrei Isvoran
a71ee404ed RED-9164 - Change OCR queues to match with older OCR version 2024-05-27 12:03:35 +03:00
Maverick Studer
8485a6b48a Merge branch 'RED-8848' into 'master'
RED-8848: When cloning a dossier template some flags are not set correctly

Closes RED-8848

See merge request redactmanager/persistence-service!500
2024-05-24 13:56:47 +02:00
Maverick Studer
f0160df8d1 RED-8848: When cloning a dossier template some flags are not set correctly 2024-05-24 13:56:46 +02:00
Andrei Isvoran
f962037aaa Merge branch 'RED-9205' into 'master'
RED-9205 - Fix download job failing

Closes RED-9205

See merge request redactmanager/persistence-service!498
2024-05-24 13:43:42 +02:00
Andrei Isvoran
2a4c8c2b19 RED-9205 - Fix download job failing 2024-05-24 13:43:42 +02:00
Maverick Studer
d24ab46616 Merge branch 'RED-5870-rollback' into 'master'
Revert "RED-5870: Enable force redaction of hints"

Closes RED-5870

See merge request redactmanager/persistence-service!502
2024-05-24 13:30:19 +02:00
Maverick Studer
e723550b53 Revert "RED-5870: Enable force redaction of hints" 2024-05-24 13:30:19 +02:00
Dominique Eifländer
8f4f95b166 Merge branch 'RED-9147' into 'master'
RED-9147: Deny websocket subscription between different tenants

Closes RED-9147

See merge request redactmanager/persistence-service!496
2024-05-23 14:20:27 +02:00
Dominique Eifländer
e9ba3c8da1 RED-9147: Deny websocket subscription between different tenants 2024-05-23 13:49:51 +02:00
Maverick Studer
84d033ff54 Merge branch 'RED-5870' into 'master'
RED-5870: Enable force redaction of hints

Closes RED-5870

See merge request redactmanager/persistence-service!495
2024-05-23 10:45:58 +02:00
maverickstuder
1f6339f71d RED-5870: Enable force redaction of hints
* mergeForceRedaction no longer sets hints to skipped, now all entries are set to applied instead
2024-05-23 09:24:00 +02:00
Dominique Eifländer
64a7d24639 Merge branch 'RED-9147' into 'master'
RED-9147: Provide events via websocket

Closes RED-9147

See merge request redactmanager/persistence-service!493
2024-05-22 15:21:59 +02:00
Dominique Eifländer
2c604b1aa3 RED-9147: Removed unused class 2024-05-22 15:07:07 +02:00
Dominique Eifländer
7d875ee7eb RED-9147: Provide events via websocket 2024-05-22 14:48:54 +02:00
Maverick Studer
edb333aa29 Merge branch 'RED-8848' into 'master'
RED-8848: When cloning a dossier template some flags are not set correctly

Closes RED-8848

See merge request redactmanager/persistence-service!489
2024-05-22 11:03:51 +02:00
maverickstuder
38d3832732 RED-8848: When cloning a dossier template some flags are not set correctly
* setting the missing flags from present dossier template when cloning
2024-05-22 10:52:33 +02:00
Andrei Isvoran
0408e3986e Merge branch 'RED-9148' into 'master'
RED-9148 - Add paragraph page index to entity log

Closes RED-9148

See merge request redactmanager/persistence-service!488
2024-05-21 13:40:41 +02:00
Andrei Isvoran
1a0cea1332 RED-9148 - Add paragraph page index to entity log 2024-05-21 14:30:00 +03:00
Andrei Isvoran
05153504d3 Merge branch 'RED-9148' into 'master'
RED-9148 - Add paragraph page index to entity log

Closes RED-9148

See merge request redactmanager/persistence-service!487
2024-05-21 08:44:34 +02:00
Andrei Isvoran
5da98461f0 RED-9148 - Add paragraph page index to entity log 2024-05-20 17:02:58 +03:00
Andrei Isvoran
f5c2a115f4 Merge branch 'RED-9148' into 'master'
RED-9148 - Add paragraph page index to entity log

Closes RED-9148

See merge request redactmanager/persistence-service!486
2024-05-20 14:17:53 +02:00
Andrei Isvoran
08c6f11e88 RED-9148 - Add paragraph page index to entity log 2024-05-20 15:07:28 +03:00
Andrei Isvoran
03dc5f2d50 Merge branch 'RED-6853' into 'master'
RED-6853 - Update dictionary entries

Closes RED-6853

See merge request redactmanager/persistence-service!484
2024-05-17 11:08:47 +02:00
Andrei Isvoran
32411a668f RED-6853 - Update dictionary entries 2024-05-16 16:03:30 +03:00
yhampe
20ca0cd798 Merge remote-tracking branch 'origin/RED-3813' into RED-3813 2024-05-13 15:08:21 +02:00
yhampe
4f1c926a17 RED-3813: image recategorization
added first simple clustering service
2024-05-13 15:07:52 +02:00
yhampe
6110dd1497 RED-3813: image recategorization
added first simple clustering service
2024-05-13 15:06:25 +02:00
Andrei Isvoran
63dbc073c7 Merge branch 'RED-9146' into 'master'
RED-9146 - Change response for manual redaction endpoints to an object wrapping the list

Closes RED-9146

See merge request redactmanager/persistence-service!481
2024-05-13 12:24:56 +02:00
Andrei Isvoran
926e8b6b6b RED-9146 - Change response for manual redaction endpoints to an object wrapping the list 2024-05-13 12:42:42 +03:00
Andrei Isvoran
31165bd8f6 Merge branch 'RED-6853' into 'master'
RED-6853 - Add update entries endpoint for dictionary entries

Closes RED-6853

See merge request redactmanager/persistence-service!480
2024-05-09 13:22:50 +02:00
Andrei Isvoran
6b2fa6b9b6 RED-6853 - Add update entries endpoint for dictionary entries 2024-05-09 12:21:07 +03:00
Corina Olariu
141bf035ad Merge branch 'RED-9094' into 'master'
RED-9094 - Redaction skipped after changing only type + paragraph

Closes RED-9094

See merge request redactmanager/persistence-service!478
2024-05-07 15:25:27 +02:00
Corina Olariu
8c3d2266ba RED-9094 - Redaction skipped after changing only type + paragraph
- changed from Skipped state to Applied since it is a local recategorization (based on hint)
- add unit test

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-05-07 16:12:55 +03:00
Andrei Isvoran
c1dda3cd26 Merge branch 'RED-8998-fix' into 'master'
RED-8998 - Return merged entities or pending entries for manual changes.

Closes RED-8998

See merge request redactmanager/persistence-service!473
2024-05-07 10:11:35 +02:00
Andrei Isvoran
a300f61609 RED-8998 - Return merged entities or pending entries for manual changes. 2024-05-07 10:11:35 +02:00
Maverick Studer
4935d81b0c Merge branch 'RED-8908' into 'master'
RED-8908: DM: Opening a file in error state triggers reanalysis

Closes RED-8908

See merge request redactmanager/persistence-service!476
2024-05-07 09:58:30 +02:00
maverickstuder
a655100ec4 RED-8908: DM: Opening a file in error state triggers reanalysis
* disable reanalysis on error state
2024-05-07 09:22:12 +02:00
Maverick Studer
1e64903352 Merge branch 'RED-9084' into 'master'
RED-9084: Paragraph/Location value missing for manual redaction on re-uploaded preview file

Closes RED-9084

See merge request redactmanager/persistence-service!475
2024-05-06 15:33:15 +02:00
maverickstuder
16a31bfb65 RED-9084: Paragraph/Location value missing for manual redaction on re-uploaded preview file
* renamed to manualOverwriteSection
2024-05-06 09:58:51 +02:00
maverickstuder
24e3771b08 RED-9084: Paragraph/Location value missing for manual redaction on re-uploaded preview file
* added section to ImportedRedaction
2024-05-03 15:30:46 +02:00
Maverick Studer
8d2091edc4 Merge branch 'RED-9104' into 'master'
RED-9104: Rectangle redaction cannot be removed

Closes RED-9104

See merge request redactmanager/persistence-service!474
2024-05-03 12:50:41 +02:00
maverickstuder
7998b81bb6 RED-9104: Rectangle redaction cannot be removed
* fixed and improved mongodb queries empty array comparison
2024-05-03 12:36:50 +02:00
Andrei Isvoran
4763e6db89 Merge branch 'RED-8998' into 'master'
RED-8998 - Get specific entry from entitylog and return the merged entry on manual changes endpoints

Closes RED-8998

See merge request redactmanager/persistence-service!468
2024-04-29 10:37:07 +02:00
Andrei Isvoran
6280e342eb RED-8998 - Get specific entry from entitylog and return the merged entry on manual changes endpoints 2024-04-29 10:37:07 +02:00
Corina Olariu
83d6ef71ef Merge branch 'RED-9063' into 'master'
RED-9063 - Error 409 when requesting deleted types

Closes RED-9063

See merge request redactmanager/persistence-service!470
2024-04-26 12:37:02 +02:00
Kilian Schüttler
9ac1545fe8 Merge branch 'RED-9042' into 'master'
RED-9042: forward port for merge of legalbasis and recategorize

Closes RED-9042

See merge request redactmanager/persistence-service!464
2024-04-25 18:27:37 +02:00
Ali Oezyetimoglu
59c1401053 RED-9042: forward port for merge of legalbasis and recategorize 2024-04-25 18:27:37 +02:00
Corina Olariu
033493aaee RED-9063 - Error 409 when requesting deleted types
- add a check before creating dossier level types on the fly if the dossier template type is not deleted
- add unit test

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-04-25 15:43:18 +03:00
Dominique Eifländer
7acc0889b7 Merge branch 'RED-8826' into 'master'
RED-8826: Added experimetal flag to entity types

Closes RED-8826

See merge request redactmanager/persistence-service!462
2024-04-23 14:23:25 +02:00
Dominique Eifländer
01ca31fbbf RED-8826: Fixed old codestyle 2024-04-23 13:34:06 +02:00
Dominique Eifländer
4a6777be71 RED-8826: Added experimetal flag to entity types 2024-04-23 13:34:04 +02:00
Andrei Isvoran
7c37c16be7 Merge branch 'RED-8823' into 'master'
RED-8823 - Add soft deleted time to type response

Closes RED-8823

See merge request redactmanager/persistence-service!463
2024-04-23 13:17:31 +02:00
Andrei Isvoran
d5494660bc RED-8823 - fix pmd 2024-04-23 14:01:26 +03:00
Andrei Isvoran
2aff32f33e RED-8894 - Add soft deleted time to type response 2024-04-23 13:45:15 +03:00
Andrei Isvoran
3a93c1f715 Merge branch 'RED-8894' into 'master'
RED-8894 - Add dictionary difference endpoint

Closes RED-8894

See merge request redactmanager/persistence-service!460
2024-04-22 14:57:15 +02:00
Andrei Isvoran
1adf46179e RED-8894 - Add dictionary difference endpoint 2024-04-22 14:57:15 +02:00
Ali Oezyetimoglu
bf10c3baf0 Merge branch 'RED-8480-3' into 'master'
Resolve RED-8480 "3"

Closes RED-8480

See merge request redactmanager/persistence-service!459
2024-04-18 15:41:06 +02:00
Ali Oezyetimoglu
1d47744b30 RED-8480: small fixes and tests 2024-04-17 16:14:35 +02:00
Ali Oezyetimoglu
dcb5c0e03e RED-8480: differenciate between recategorize and legal basis change 2024-04-17 16:14:35 +02:00
Ali Oezyetimoglu
b11c95dd39 RED-8480: differenciate between recategorize and legal basis change 2024-04-17 16:14:35 +02:00
Timo Bejan
6b82815b7a Merge branch 'RED-8966' into 'master'
RED-8966 Improved performance of soft and hard delete files and dossirs, and...

Closes RED-8966

See merge request redactmanager/persistence-service!456
2024-04-17 10:05:21 +02:00
Ali Oezyetimoglu
ef18d68102 Merge branch 'RED-8762' into 'master'
RED-8762: fixed path variable

Closes RED-8762

See merge request redactmanager/persistence-service!458
2024-04-17 09:50:05 +02:00
Ali Oezyetimoglu
7f4a53ba5f RED-8762: fixed path variable 2024-04-17 09:36:57 +02:00
Timo Bejan
5a526484d6 REd-8966 - added missing transactional 2024-04-16 18:35:08 +03:00
Timo Bejan
fac8a1ac85 RED-8966 Improved performance of soft and hard delete files and dossirs, and undelete - split transaction and vastly improved query performance 2024-04-16 18:25:07 +03:00
Andrei Isvoran
11dcb2fb93 Merge branch 'RED-8768' into 'master'
RED-8768 - Validate redaction value does not contain over 4000 characters

Closes RED-8768

See merge request redactmanager/persistence-service!453
2024-04-16 14:06:40 +02:00
Andrei Isvoran
c8244781b4 RED-8768 - Validate redaction value does not contain over 4000 characters 2024-04-16 14:06:40 +02:00
Maverick Studer
a086a71833 Merge branch 'RED-8972' into 'master'
RED-8972: numberOfComments missing in entityLog

Closes RED-8972

See merge request redactmanager/persistence-service!452
2024-04-16 13:37:33 +02:00
maverickstuder
e510f07be9 RED-8972: numberOfComments missing in entityLog
* re-add numberOfComments to EntityLogEntryResponse
2024-04-16 12:52:47 +02:00
Ali Oezyetimoglu
e00ea01803 Merge branch 'RED-8762' into 'master'
RED-8762: do not update addToDictionaryAction for dossier dictionaries when...

Closes RED-8762

See merge request redactmanager/persistence-service!450
2024-04-15 14:03:41 +02:00
Ali Oezyetimoglu
a86be93177 RED-8762: do not update addToDictionaryAction for dossier dictionaries when updating dossier template dictionary ONLY if dossierDictionaryOnly 2024-04-15 13:50:10 +02:00
Ali Oezyetimoglu
f23f66f0ed Merge branch 'RED-8762' into 'master'
RED-8762: do not update addToDictionaryAction for dossier dictionaries when...

Closes RED-8762

See merge request redactmanager/persistence-service!446
2024-04-15 11:27:01 +02:00
Dominique Eifländer
04759967e2 Merge branch 'RED-8956' into 'master'
RED-8956: Fixed endless loop when flag calculation is required and file is deleted

Closes RED-8956

See merge request redactmanager/persistence-service!447
2024-04-15 11:19:05 +02:00
Dominique Eifländer
8756eea0e0 RED-8956: Fixed endless loop when flag calculation is required and file is deleted 2024-04-15 10:54:35 +02:00
Ali Oezyetimoglu
77db059a2e RED-8762: do not update addToDictionaryAction for dossier dictionaries when updating dossier template dictionary 2024-04-15 08:38:16 +02:00
Maverick Studer
b002f7d544 Merge branch 'RED-8702-fix' into 'master'
RED-8702: Explore document databases to store entityLog

Closes RED-8702

See merge request redactmanager/persistence-service!445
2024-04-12 12:40:22 +02:00
Maverick Studer
92cc2895ad RED-8702: Explore document databases to store entityLog 2024-04-12 12:40:22 +02:00
Ali Oezyetimoglu
cfeb370299 Merge branch 'RED-8762' into 'master'
RED-8762: removed unnecessary consumes from new changeFlags endpoint

Closes RED-8762

See merge request redactmanager/persistence-service!444
2024-04-11 16:41:32 +02:00
Ali Oezyetimoglu
6d1d51098b RED-8762: removed unnecessary consumes from new changeFlags endpoint and added dossierId as path variable 2024-04-11 16:24:04 +02:00
Maverick Studer
ef7c470618 Merge branch 'RED-8702-fix' into 'master'
RED-8702: Explore document databases to store entityLog

Closes RED-8702

See merge request redactmanager/persistence-service!428
2024-04-11 15:51:59 +02:00
Maverick Studer
57cb10ba1d RED-8702: Explore document databases to store entityLog 2024-04-11 15:51:58 +02:00
Ali Oezyetimoglu
9a93c0b18b Merge branch 'RED-8762' into 'master'
RED-8762: added endpoint to update flag addToDictionary for given type,...

Closes RED-8762

See merge request redactmanager/persistence-service!441
2024-04-11 15:09:55 +02:00
Ali Oezyetimoglu
623068e1a1 RED-8762: added endpoint to update flag addToDictionary for given type, dossierTemplateId and dossierId 2024-04-11 14:52:30 +02:00
Timo Bejan
f870759747 Merge branch 'RED-8879' into 'master'
removed 3.6.x temporary unique constraints

Closes RED-8879

See merge request redactmanager/persistence-service!439
2024-04-11 10:06:51 +02:00
Andrei Isvoran
07b29d9c50 Merge branch 'RED-8903' into 'master'
RED-8903 - Refactor local add redaction on manual change

Closes RED-8903

See merge request redactmanager/persistence-service!435
2024-04-10 11:24:24 +02:00
Timo Bejan
c9cda89e17 removed 3.6.x temporary unique constraints 2024-04-10 10:06:01 +03:00
Andrei Isvoran
54bfdfafe2 build 2024-04-09 16:54:46 +03:00
Andrei Isvoran
c31a29cea2 RED-8903 - Refactor local add redaction on manual change 2024-04-09 14:46:32 +03:00
Andrei Isvoran
6770d03ae1 Merge branch 'RED-8651' into 'master'
RED-8651 - Evict report templates cache on template upload

Closes RED-8651

See merge request redactmanager/persistence-service!434
2024-04-09 09:37:58 +02:00
Andrei Isvoran
1c60bc6586 RED-8651 - Evict report templates cache on template upload 2024-04-09 09:37:58 +02:00
Dominique Eifländer
ddcff217e5 Merge branch 'RED-7384' into 'master'
RED-7384: migration fixes

Closes RED-7384

See merge request redactmanager/persistence-service!432
2024-04-08 10:32:32 +02:00
Kilian Schuettler
c60c79ef06 RED-7384: migration fixes
* index files from dossier trash aswell
2024-04-08 10:15:58 +02:00
Corina Olariu
a37ac83339 Merge branch 'RED-8727-updateRank' into 'master'
RED-8727 - Add rank de-duplication to migration - fp

Closes RED-8727

See merge request redactmanager/persistence-service!431
2024-04-05 14:38:32 +02:00
Kilian Schüttler
d7e5e16351 Merge branch 'RED-7384-fp' into 'master'
RED-7384: migration fixes

Closes RED-7384

See merge request redactmanager/persistence-service!430
2024-04-05 13:50:14 +02:00
Kilian Schuettler
5bfeec1b21 RED-7384: migration fixes
* fix test
2024-04-05 13:27:36 +02:00
Kilian Schuettler
7df02d588a RED-7384: migration fixes
* index files from trash aswell
* merge manual local entries with existing ones during unprocessed changes merge
* don't add ManualRedactionEntries on local changes for Images
2024-04-05 13:06:00 +02:00
Corina Olariu
29a274fdb0 RED-8727 - Add rank de-duplication to migration - fp
- add an update rank for type query because the updateType will not cover the update of ranks of system managed types (which is not possible for the user)
- update the tests

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-04-05 13:44:15 +03:00
Kilian Schüttler
6525e0c2bc Merge branch 'RED-7384-fp' into 'master'
RED-7384: migration fixes forward port

Closes RED-7384

See merge request redactmanager/persistence-service!420
2024-04-04 15:44:38 +02:00
Kilian Schuettler
88d63b46b9 RED-7384: migration fixes
* finalize migration again for "persistence-service-ready": true details
2024-04-04 14:46:39 +02:00
Maverick Studer
9c8e584e5a Merge branch 'RED-8702-fix' into 'master'
RED-8702: Explore document databases to store entityLog

Closes RED-8702

See merge request redactmanager/persistence-service!423
2024-04-03 19:09:30 +02:00
maverickstuder
147247cfe6 RED-8702: Explore document databases to store entityLog
* rename mongo queue because of naming mismatch
2024-04-03 18:52:35 +02:00
maverickstuder
71f0756a3a RED-8702: Explore document databases to store entityLog
* rename mongo queue because of naming mismatch
2024-04-03 18:25:58 +02:00
Kilian Schuettler
910948bd2d RED-7384: migration fixes
* finalize migration again for "persistence-service-ready": true details
2024-04-03 17:35:38 +02:00
Kilian Schuettler
d4baa5d8b7 RED-7384: migration fixes
* finalize migration again for "persistence-service-ready": true details
2024-04-03 17:23:57 +02:00
Kilian Schuettler
1fc74f2a0c RED-7384: migration fixes forward port
* treat pending dicts in approved files for resize and remove in redaction-service
* disable automatic analysis job using migration status table and liquibase migration
* migrate imported redaction file
* improve logging
2024-04-03 17:05:06 +02:00
Yannik Hampe
06e0bba76c Merge branch 'RED-8706' into 'master'
RED-8706: includedeleted not working

Closes RED-8706

See merge request redactmanager/persistence-service!418
2024-04-03 13:45:36 +02:00
yhampe
72b148376e RED-8706: includedeleted not working
added method call with includedeleted flag
2024-04-03 13:34:42 +02:00
Maverick Studer
873daa2736 Merge branch 'RED-8702-backup2' into 'master'
RED-8702: Explore document databases to store entityLog

Closes RED-8702

See merge request redactmanager/persistence-service!417
2024-04-03 13:33:27 +02:00
Maverick Studer
8e8aa645d0 RED-8702: Explore document databases to store entityLog 2024-04-03 13:33:27 +02:00
Ali Oezyetimoglu
f0c6b868e8 Merge branch 'RED-8480-2' into 'master'
RED-8480: don't merge recategorizations for images, create pending entry instead

Closes RED-8480

See merge request redactmanager/persistence-service!411
2024-04-02 11:26:48 +02:00
Ali Oezyetimoglu
c9af40ddb6 RED-8480: fixed method call 2024-04-02 09:17:38 +02:00
Kilian Schuettler
729923fdea RED-8480: don't merge recategorizations for images, create pending entry instead
* TODO: remove filter in report-service and pdftron-redaction-service
2024-04-02 09:17:38 +02:00
Kilian Schuettler
efc2b200ad RED-8480: don't merge recategorizations for images, create pending entry instead
* TODO: remove filter in report-service and pdftron-redaction-service
2024-04-02 09:17:38 +02:00
Kilian Schuettler
75676c33b1 RED-8480: don't merge recategorizations for images, create pending entry instead
* TODO: remove filter in report-service and pdftron-redaction-service
2024-04-02 09:17:37 +02:00
Kilian Schuettler
5f1731444e RED-8480: don't merge recategorizations for images, create pending entry instead
* TODO: remove filter in report-service and pdftron-redaction-service
2024-04-02 09:17:37 +02:00
Andrei Isvoran
9ddcd56a67 Merge branch 'RED-8776' into 'master'
RED-8776 - Add local redaction when we do a manual change on a non-manual redaction

Closes RED-8776

See merge request redactmanager/persistence-service!404
2024-04-02 08:38:08 +02:00
Andrei Isvoran
3ab607ccbf RED-8776 - Add local redaction when we do a manual change on a non-manual redaction 2024-04-02 08:38:08 +02:00
Ali Oezyetimoglu
d46ae2834a Merge branch 'RED-8480-C' into 'master'
RED-8480: added property value for recategorizations and fixed bugs not...

Closes RED-8480

See merge request redactmanager/persistence-service!406
2024-03-27 09:55:58 +01:00
Ali Oezyetimoglu
6601ee0188 RED-8480: added property value for recategorizations and fixed bugs not updating legal basis and section 2024-03-26 17:42:15 +01:00
Kilian Schüttler
45a0ca1800 Merge branch 'RED-8610' into 'master'
RED-8610: Dictionary remove on dossier level should be displayed as skipped

Closes RED-8610

See merge request redactmanager/persistence-service!403
2024-03-21 16:38:49 +01:00
Kilian Schuettler
8c4b177ef2 RED-8610: Dictionary remove on dossier level should be displayed as skipped
* add DOSSIER_DICTIONARY engine
2024-03-21 16:26:48 +01:00
Kilian Schüttler
dec81549e0 Merge branch 'reorder-log' into 'master'
reorder-log: re-order the pending entries, such that they appear directly...

See merge request redactmanager/persistence-service!399
2024-03-21 08:44:15 +01:00
Kilian Schüttler
ba8cf68779 reorder-log: re-order the pending entries, such that they appear directly... 2024-03-21 08:44:15 +01:00
Ali Oezyetimoglu
7490402bb7 Merge branch 'RED-8480-B' into 'master'
RED-8480: integrated legal basis  endpoint in recategorize endpoint

Closes RED-8480

See merge request redactmanager/persistence-service!396
2024-03-20 18:24:09 +01:00
Ali Oezyetimoglu
a5e3c0c98a RED-8820: removed property "value" from recategorize 2024-03-20 12:54:23 +01:00
Ali Oezyetimoglu
ed052fa741 RED-8480: adjusted propertyChanges in manual changes 2024-03-19 11:42:57 +01:00
Ali Oezyetimoglu
8a4c754250 RED-8480: adjusted propertyChanges in manual changes 2024-03-19 09:20:21 +01:00
Corina Olariu
da6856f31d Merge branch 'RED-8727' into 'master'
RED-8727 - Add rank de-duplication to migration

Closes RED-8727

See merge request redactmanager/persistence-service!398
2024-03-14 16:13:28 +01:00
Corina Olariu
b2cf55b5cc RED-8727 - Add rank de-duplication to migration
- add RankDeDuplicationService and RankDeduplicationMigration16 to update the found duplicate ranks
- junit tests added

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-14 12:20:17 +02:00
Ali Oezyetimoglu
3fde378ade RED-8480: integrated legal basis endpoint in recategorize endpoint 2024-03-14 09:58:21 +01:00
Timo Bejan
8f4a03dd08 Merge branch 'implicitflow' into 'master'
added implicit flow swagger

See merge request redactmanager/persistence-service!394
2024-03-13 16:25:56 +01:00
Dominique Eifländer
857f2383d2 Merge branch 'RED-7968' into 'master'
RED-7968: Convert unprocessed manual addToDictionaries to local changes

Closes RED-7968

See merge request redactmanager/persistence-service!395
2024-03-13 12:33:51 +01:00
Dominique Eifländer
f3ef80df06 RED-7968: Convert unprocessed manual addToDictionaries to local changes 2024-03-13 12:22:10 +01:00
Timo Bejan
06360c5cbd added implicit flow swagger 2024-03-12 16:32:59 +02:00
Dominique Eifländer
9110e68266 Merge branch 'RED-7382-4.1' into 'master'
RED-7382: Delete section grid for migrated files

Closes RED-7382

See merge request redactmanager/persistence-service!393
2024-03-12 13:29:11 +01:00
Dominique Eifländer
36e8a2bfdb RED-7382: Delete section grid for migrated files 2024-03-12 13:20:50 +01:00
Andrei Isvoran
f2a6a90529 Merge branch 'RED-8707-fix' into 'master'
RED-8707 - Don't remove resize redactions which are not dictionary based when...

Closes RED-8707

See merge request redactmanager/persistence-service!391
2024-03-12 08:41:58 +01:00
Corina Olariu
5b4f194cad Merge branch 'RED-7049-update' into 'master'
RED-7049 - Wrong error code when adding entity with already existing rank - backport

Closes RED-7049

See merge request redactmanager/persistence-service!387
2024-03-12 08:41:20 +01:00
Andrei Isvoran
43e85af0e9 RED-8707 - Don't remove resize redactions which are not dictionary based when removing dictionary entry 2024-03-11 16:32:04 +02:00
Corina Olariu
6654dc9546 RED-7049 - Wrong error code when adding entity with already existing rank - backport
- remove commented coded

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-11 15:51:19 +02:00
Dominique Eifländer
7a9d90a76c Merge branch 'RED-8712-4.1' into 'master'
RED-8712: Fixed sql statement

Closes RED-8712

See merge request redactmanager/persistence-service!389
2024-03-11 14:22:09 +01:00
Dominique Eifländer
c78a4c1186 RED-8712: Fixed sql statement 2024-03-11 14:12:51 +01:00
Corina Olariu
9eb0e5e8df RED-7049 - Wrong error code when adding entity with already existing rank - backport
- reworked the junit test and renamed it

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-11 15:02:47 +02:00
Dominique Eifländer
eab0b3de39 Merge branch 'hotfix_dossier_redaction_4.1' into 'master'
hotfix: dossier template level dossier_redactions

See merge request redactmanager/persistence-service!386
2024-03-11 13:17:17 +01:00
Dominique Eifländer
8ae5ea89c6 hotfix: dossier template level dossier_redactions 2024-03-11 13:07:02 +01:00
Dominique Eifländer
71f760c1e4 Merge branch 'hotfix_dossier_redaction_4.1' into 'master'
hotfix: Fixed liquibase sql statement to insert missing dossier_redaction...

See merge request redactmanager/persistence-service!383
2024-03-11 12:25:59 +01:00
Dominique Eifländer
93d2b77ca5 hotfix: Fixed liquibase sql statement to insert missing dossier_redaction entity types on dossier template level 2024-03-11 12:11:46 +01:00
Dominique Eifländer
06970a1477 Merge branch 'RED-8712-4.1' into 'master'
RED-8712: Remove manual redactions on non existing pages

Closes RED-8712

See merge request redactmanager/persistence-service!382
2024-03-11 11:08:35 +01:00
Dominique Eifländer
8c8a088cc8 RED-8712: Remove manual redactions on non existing pages 2024-03-11 11:01:13 +01:00
Corina Olariu
f8645ef50c RED-7049 - Wrong error code when adding entity with already existing rank - backport
- add a check for duplicate ranks before cloning or exporting a dossier template
- added junit tests

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-11 11:01:56 +02:00
Maverick Studer
f5f33978ed Merge branch 'RED-7700' into 'master'
RED-7700: Safe rule execution

Closes RED-7700

See merge request redactmanager/persistence-service!378
2024-03-08 15:06:14 +01:00
Maverick Studer
d845b4cef2 RED-7700: Safe rule execution 2024-03-08 15:06:14 +01:00
Kilian Schüttler
baeadd145e Merge branch 'hotfix_gz_migration' into 'master'
hotfix: blobstorage migration gz fix

See merge request redactmanager/persistence-service!370
2024-03-08 14:51:33 +01:00
Kilian Schüttler
82ed6b0b05 Merge branch 'RED-7384' into 'master'
RED-7384: migration fixes forward port

Closes RED-7384

See merge request redactmanager/persistence-service!379
2024-03-08 14:22:54 +01:00
Kilian Schüttler
c2110cd965 RED-7384: migration fixes forward port 2024-03-08 14:22:54 +01:00
Timo Bejan
dff30d5f7d Merge branch 'clari-30' into 'master'
Updated integration of OCR service

See merge request redactmanager/persistence-service!380
2024-03-08 14:16:50 +01:00
Timo Bejan
042f3a079c Updated integration of OCR service 2024-03-08 15:06:03 +02:00
Ali Oezyetimoglu
c42983aa91 Merge branch 'RED-8561-3' into 'master'
RED-8561: added sql query to create entities for dossier dictionaries

Closes RED-8561

See merge request redactmanager/persistence-service!374
2024-03-07 13:59:22 +01:00
Ali Oezyetimoglu
333fd40449 RED-8561: flag for add to dictionary action was set to false in 3.6, but has to be true in 4.0 2024-03-06 10:41:51 +01:00
Ali Oezyetimoglu
a98cc0a6f2 RED-8561: updated sql query to update existing dossier dictionaries with dossier_dictionary_only=true 2024-03-05 20:20:10 +01:00
Ali Oezyetimoglu
6bb3c93b84 RED-8561: updated sql query to avoid conflicts with primary key in table entity 2024-03-05 17:58:46 +01:00
Ali Oezyetimoglu
01f857fcef RED-8561: updated sql query to avoid conflicts with primary key in table entity 2024-03-05 15:39:07 +01:00
Ali Oezyetimoglu
96be1ba52e RED-8561: updated sql query to avoid conflicts with primary key in table entity 2024-03-05 14:17:14 +01:00
Timo Bejan
81b66236f9 Merge branch 'clari-30' into 'master'
CLARI-30 - reworked OCR service integration to work via queue only, depercated...

See merge request redactmanager/persistence-service!372
2024-03-05 14:11:12 +01:00
Ali Oezyetimoglu
7b6af5bf3b RED-8561: updated sql query to avoid conflicts with primary key in table entity 2024-03-05 12:49:13 +01:00
Ali Oezyetimoglu
a37b2dbc32 RED-8561: added sql query to create entities for dossier dictionaries 2024-03-05 11:42:58 +01:00
Timo Bejan
47a9bc0343 Retry ocr 2024-03-05 10:48:45 +02:00
Corina Olariu
bc334b9760 Merge branch 'RED-7049' into 'master'
RED-7049 - Wrong error code when adding entity with already existing rank

Closes RED-7049

See merge request redactmanager/persistence-service!371
2024-03-04 13:34:04 +01:00
Timo Bejan
d849859def CLARI-30 - reworked OCR service integration to work via queue only, depercated old rest endpoints. Renamed queues to naming convetion. 2024-03-04 11:46:27 +02:00
Corina Olariu
98f743052d RED-7049 - Wrong error code when adding entity with already existing rank
- update junit so the rank of the types differs

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-04 11:00:51 +02:00
Corina Olariu
4d107b2475 RED-7049 - Wrong error code when adding entity with already existing rank
- correct the query to get the type with same rank.
- changed to get the list of types instead of a one result for the case with several types with the same rank
- added junit tests

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-03-04 10:30:54 +02:00
Dominique Eifländer
3c4c93a634 hotfix: blobstorage migration gz fix 2024-02-29 12:14:03 +01:00
Kilian Schüttler
2fa7b4337a Merge branch 'reformat' into 'master'
reformat

See merge request redactmanager/persistence-service!369
2024-02-28 15:27:29 +01:00
Kilian Schuettler
4aa5b0ee34 reformat 2024-02-28 14:57:21 +01:00
Kilian Schüttler
23b80ca615 Merge branch 'RED-8615' into 'master'
RED-8615: change ManualChange with dict behavior

Closes RED-8615

See merge request redactmanager/persistence-service!366
2024-02-28 11:24:45 +01:00
Kilian Schuettler
b196544131 RED-8615: Revert and change the current behaviour of manualChanges 2024-02-28 09:32:45 +01:00
Kilian Schüttler
9c33404490 Merge branch 'RED-7384' into 'master'
RED-7384: migration fixes

Closes RED-7384

See merge request redactmanager/persistence-service!363
2024-02-26 11:39:29 +01:00
Kilian Schuettler
0b4e51907c RED-7384: migration fixes
* added functionality to add manualRedactionEntries during the migration
2024-02-23 14:37:50 +01:00
Corina Olariu
ea3d47f435 Merge branch 'RED-8589' into 'master'
RED-8589 - Add "MANUAL" engine to all annotations that has entries in manualChanges

Closes RED-8589

See merge request redactmanager/persistence-service!361
2024-02-23 10:50:18 +01:00
Corina Olariu
6375cedaee Merge branch 'RED-7886-dryrun' into 'master'
RED-7886 - Endpoint for rule validation

Closes RED-7886

See merge request redactmanager/persistence-service!360
2024-02-23 10:21:53 +01:00
Corina Olariu
17667d067d RED-8589 - Add "MANUAL" engine to all annotations that has entries in manualChanges
- add Engine.Manual for manual changes in the entity log entries in case the analysis is stopped

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-23 09:10:35 +02:00
Corina Olariu
e8a942d764 RED-7886 - Endpoint for rule validation
- renamed from runDry to dryRun

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-22 11:31:00 +02:00
Corina Olariu
80c7c867ae RED-7886 - Endpoint for rule validation
- renamed from dryRunParameter to dryRun

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-22 11:19:30 +02:00
Ali Oezyetimoglu
f86e4ea993 Merge branch 'RED-8480' into 'master'
RED-8480: removed Nonnull annotation for legal basis when recategorizing;...

Closes RED-8480

See merge request redactmanager/persistence-service!359
2024-02-21 16:40:59 +01:00
Ali Oezyetimoglu
d5244846a9 RED-8480: removed Nonnull annotation for legal basis when recategorizing; changed to empty String, if null is passed 2024-02-21 15:03:37 +01:00
Corina Olariu
4091f21076 RED-7886 - Endpoint for rule validation
- add dry-run parameter, based on this save the rules or not and include warnings in the responses.
- added junit tests

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-21 15:40:10 +02:00
Corina Olariu
307ae65080 Merge branch 'RED-7886' into 'master'
RED-7886 - Endpoint for rule validation

Closes RED-7886

See merge request redactmanager/persistence-service!358
2024-02-20 15:03:54 +01:00
Corina Olariu
5d4badce06 RED-7886 - Endpoint for rule validation
- Include the warning messages for deprecated imports rules in response

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-20 12:49:16 +02:00
Corina Olariu
574f05b800 Merge branch 'RED-5716' into 'master'
RED-5716 - Deprecate old prepare endpoints

Closes RED-5716

See merge request redactmanager/persistence-service!356
2024-02-20 07:54:05 +01:00
Andrei Isvoran
11fa795977 Merge branch 'RED-8489' into 'master'
RED-8494 - Don't allow creation of File Attributes with empty label

Closes RED-8489

See merge request redactmanager/persistence-service!357
2024-02-19 17:33:44 +01:00
Andrei Isvoran
50d25ead38 RED-8494 - Don't allow creation of File Attributes with empty label 2024-02-19 17:33:44 +01:00
Andrei Isvoran
d7c1d233bb Merge branch 'RED-6940' into 'master'
RED-6940 - Sanitize /r in dictionary entries

Closes RED-6940

See merge request redactmanager/persistence-service!355
2024-02-19 15:06:30 +01:00
Andrei Isvoran
4eb9240bf7 RED-6940 - Sanitize /r in dictionary entries 2024-02-19 15:06:30 +01:00
Corina Olariu
318d15f758 RED-5716 - Deprecate old prepare endpoints
- deprecate the old endpoint, update test unit with new endpoint

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-19 15:39:36 +02:00
Ali Oezyetimoglu
caba58ec19 Merge branch 'RED-8480-2' into 'master'
Resolve RED-8480 "2"

Closes RED-8480

See merge request redactmanager/persistence-service!354
2024-02-16 12:57:57 +01:00
Ali Oezyetimoglu
e8c3d3dc65 RED-8480: small fixes 2024-02-16 11:49:03 +01:00
Ali Oezyetimoglu
179d66a796 RED-8480: small validation change 2024-02-16 10:23:34 +01:00
Yannik Hampe
57b046d821 Merge branch 'RED-8481' into 'master'
RED-8481: Use visual layout parsing to detect signatures

Closes RED-8481

See merge request redactmanager/persistence-service!351
2024-02-16 08:46:36 +01:00
Ali Oezyetimoglu
e681651420 RED-8480: added some checks and tests 2024-02-15 22:19:51 +01:00
Ali Oezyetimoglu
d2b6971f04 RED-8480: added legalBasis to recategorize endpoint and migrated it to the DB 2024-02-15 15:41:55 +01:00
yhampe
c9c75fe9e1 RED-8481: Use visual layout parsing to detect signatures
fixing checkstyle
2024-02-15 15:20:58 +01:00
yhampe
09c451d2ed RED-8481: Use visual layout parsing to detect signatures
updated layout parsing version
2024-02-15 15:01:09 +01:00
Andrei Isvoran
d54b33607b Merge branch 'RED-7086' into 'master'
RED-7086 - Add ResponseStatus to hard delete files endpoint and adjust description

Closes RED-7086

See merge request redactmanager/persistence-service!352
2024-02-15 08:23:36 +01:00
Andrei Isvoran
cbef7c87b5 RED-7086 - Add ResponseStatus to hard delete files endpoint and adjust description 2024-02-15 08:23:36 +01:00
Andrei Isvoran
f3bd2b0120 Merge branch 'RED-7086-fixes' into 'master'
RED-7086 - Enable async file deletion and fix response code

Closes RED-7086

See merge request redactmanager/persistence-service!349
2024-02-14 08:52:02 +01:00
Andrei Isvoran
39000eed5a RED-7086 - Enable async file deletion and fix response code 2024-02-14 08:52:02 +01:00
Kilian Schüttler
fb58362012 Merge branch 'RED-7384' into 'master'
RED-7384: reindex during migration to avoid update error in approved files

Closes RED-7384

See merge request redactmanager/persistence-service!350
2024-02-13 13:35:15 +01:00
Kilian Schuettler
97b2e5f732 RED-7384: reindex during migration to avoid update error in approved files 2024-02-13 13:27:56 +01:00
Kilian Schüttler
5cc699043c Merge branch 'RED-8385' into 'master'
RED-8385: delete viewer doc, when rotating origin file, such that it is recreated with the rotation

Closes RED-8385

See merge request redactmanager/persistence-service!348
2024-02-12 16:27:50 +01:00
Kilian Schüttler
500d215069 Merge branch 'RED-7384' into 'master'
RED-7384: fix db fields for manual changes and tenant details

Closes RED-7384

See merge request redactmanager/persistence-service!347
2024-02-12 16:20:40 +01:00
Kilian Schuettler
768384a84c RED-8385: delete viewer doc, when rotating origin file, such that it is recreated with the rotation 2024-02-12 16:19:15 +01:00
Kilian Schuettler
ce39968508 RED-7384: fix db fields for manual changes and tenant details 2024-02-12 15:47:54 +01:00
Maverick Studer
59b29ccd38 Merge branch 'RED-8432' into 'master'
RED-8432: Return 400 if invalid date for file attributes is set

Closes RED-8432

See merge request redactmanager/persistence-service!346
2024-02-12 13:58:49 +01:00
maverickstuder
51f28963ff RED-8432: Return 400 if invalid date for file attributes is set 2024-02-12 09:14:49 +01:00
yhampe
3664f6800a RED-8481: Use visual layout parsing to detect signatures
integrated service
2024-02-12 09:12:59 +01:00
Corina Olariu
99944c9fef Merge branch 'RED-8361-update' into 'master'
RED-8361 - Returned error status codes should be checked

Closes RED-8361

See merge request redactmanager/persistence-service!344
2024-02-09 18:27:01 +01:00
Corina Olariu
8db9bd1be0 RED-8361 - Returned error status codes should be checked
- change description to include also the case that the dossier / file is not found to the error message

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-09 18:23:16 +02:00
Corina Olariu
a4f3edd144 RED-8361 - Returned error status codes should be checked
- change description to include also the case that the file is not found

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-09 17:49:31 +02:00
Andrei Isvoran
8f5d3ef9af Merge branch 'RED-7086' into 'master'
RED-7086 - Deprecate hard-delete files and add new endpoint with POST request

Closes RED-7086

See merge request redactmanager/persistence-service!345
2024-02-09 15:32:31 +01:00
Andrei Isvoran
34c7e51ae8 RED-7086 - Deprecate hard-delete files and add new endpoint with POST request 2024-02-09 15:32:31 +01:00
Corina Olariu
3e67dd8055 RED-8361 - Returned error status codes should be checked
- add authorities to the endpoints that don't have them

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-09 12:13:51 +02:00
Corina Olariu
a7c4bf866c RED-8361 - Returned error status codes should be checked
- add some view/access permissions for some endpoints
- modify messages so in case dossier is not found to not include the id

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-08 18:21:36 +02:00
Maverick Studer
bf66fdf4b7 Merge branch 'RED-8432' into 'master'
RED-8432: Return 400 if invalid input for attributes is given

Closes RED-8432

See merge request redactmanager/persistence-service!343
2024-02-07 14:01:07 +01:00
Maverick Studer
97cc851de1 RED-8432: Return 400 if invalid input for attributes is given 2024-02-07 14:01:06 +01:00
Maverick Studer
5931058a6d Merge branch 'RED-8454' into 'master'
RED-8454: Remove red-read-dossiers for RED_ADMIN and RED_USERS_ADMIN role

Closes RED-8454

See merge request redactmanager/persistence-service!342
2024-02-06 16:25:36 +01:00
maverickstuder
d317457e05 RED-8454: Remove red-read-dossiers for RED_ADMIN and RED_USERS_ADMIN role 2024-02-06 16:14:49 +01:00
Ali Oezyetimoglu
3d0697003b Merge branch 'RED-8380-2' into 'master'
RED-8380: do not filter if dossiers are empty in DossierStatusFilteringMapper

Closes RED-8380

See merge request redactmanager/persistence-service!341
2024-02-06 16:11:04 +01:00
Maverick Studer
2daefe0868 Merge branch 'RED-7368' into 'master'
RED-7368: Placeholder not updated after update/rename file/dossier attribute

Closes RED-7368

See merge request redactmanager/persistence-service!340
2024-02-06 16:10:09 +01:00
Ali Oezyetimoglu
2a57468e34 RED-8380: do not filter if dossiers are empty in DossierStatusFilteringMapper 2024-02-06 15:49:30 +01:00
maverickstuder
6b665066f3 RED-7368: Placeholder not updated after update/rename file/dossier attribute 2024-02-06 15:31:59 +01:00
Dominique Eifländer
cd171e22f0 Merge branch 'RED-8415' into 'master'
RED-8415: Fixed 500 when fileAttribute label length is exacly 255 chars

Closes RED-8415

See merge request redactmanager/persistence-service!339
2024-02-06 12:50:06 +01:00
Dominique Eifländer
52551609e7 RED-8415: Fixed 500 when fileAttribute label length is exacly 255 chars 2024-02-06 12:42:01 +01:00
Andrei Isvoran
737d2ee36b Merge branch 'RED-8428-dm' into 'master'
RED-8428 - Keep RESIZE for backwards compatibility for documine. RESIZE will...

Closes RED-8428

See merge request redactmanager/persistence-service!338
2024-02-05 14:05:20 +01:00
Andrei Isvoran
bda907d283 RED-8428 - Keep RESIZE for backwards compatibility for documine. RESIZE will... 2024-02-05 14:05:20 +01:00
Andrei Isvoran
8540d5e865 Merge branch 'RED-8428-resize' into 'master'
RED-8428 - Keep only RESIZE for ManualRedactionType in redaction log

Closes RED-8428

See merge request redactmanager/persistence-service!337
2024-02-05 10:30:49 +01:00
Andrei Isvoran
42d1bc8848 RED-8428 - Keep only RESIZE for ManualRedactionType in redaction log 2024-02-05 11:21:27 +02:00
Corina Olariu
4bd7a50f97 Merge branch 'RED-8361-fix' into 'master'
RED-8361 - Returned error status codes should be checked

Closes RED-8361

See merge request redactmanager/persistence-service!335
2024-02-05 09:33:54 +01:00
Andrei Isvoran
0ad6de9fb7 Merge branch 'RED-8428' into 'master'
RED-8428 - Add RESIZE_LOCALLY and RESIZE_IN_DICTIONARY in ManualRedactionType to differentiate between the two operations

Closes RED-8428

See merge request redactmanager/persistence-service!336
2024-02-05 09:20:18 +01:00
Andrei Isvoran
85c4f77828 RED-8428 - Add RESIZE_LOCALLY and RESIZE_IN_DICTIONARY in ManualRedactionType to differentiate between the two operations 2024-02-05 09:20:18 +01:00
Corina Olariu
17d9b13042 RED-8361 - Returned error status codes should be checked
- rework for DictionaryController and VersionsController to return empty result in case user has no view permissions

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-02 17:24:13 +02:00
Maverick Studer
8cf94c2cd7 Merge branch 'RED-8372' into 'master'
RED-8372: Include additional info about redactions in redaction annotations

Closes RED-8372

See merge request redactmanager/persistence-service!334
2024-02-02 13:27:56 +01:00
Maverick Studer
add3eea2f3 RED-8372: Include additional info about redactions in redaction annotations 2024-02-02 13:27:56 +01:00
Dominique Eifländer
61fd030dc2 Merge branch 'RED-8171' into 'master'
RED-8171: Traces do not stop at @Async

Closes RED-8171

See merge request redactmanager/persistence-service!333
2024-02-02 13:23:30 +01:00
Dominique Eifländer
2b019542bd RED-8171: Traces do not stop at @Async 2024-02-02 13:14:12 +01:00
Corina Olariu
bb58667bb2 Merge branch 'RED-8427' into 'master'
RED-8427 - Last manual change for Force Hint action should be FORCE_HINT

Closes RED-8427

See merge request redactmanager/persistence-service!332
2024-02-02 11:12:02 +01:00
Corina Olariu
d5f8a5c6f4 RED-8427 - Last manual change for Force Hint action should be FORCE_HINT
- set the correct manual redaction type depending if it was a hint or not

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-02 11:44:05 +02:00
Corina Olariu
998a0710cd Merge branch 'RED-8219' into 'master'
RED-8219 - Wrong notification type for approvers

Closes RED-8219

See merge request redactmanager/persistence-service!331
2024-02-02 10:17:07 +01:00
Kilian Schüttler
f7b80f2e61 Merge branch 'RED-7384' into 'master'
RED-7384:dont mgirate non-changing annotation Ids

Closes RED-7384

See merge request redactmanager/persistence-service!330
2024-02-02 10:10:02 +01:00
Kilian Schüttler
498cfecf88 RED-7384:dont mgirate non-changing annotation Ids 2024-02-02 10:10:02 +01:00
Corina Olariu
c843484ff0 RED-8219 - Wrong notification type for approvers
- set the correct notification type depending on the approved status of the file

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-01 20:21:08 +02:00
Corina Olariu
f6e38550bb Merge branch 'RED-7143' into 'master'
RED-7143 - Error 500 generated when entering very long text in editable fields of a file

Closes RED-7143

See merge request redactmanager/persistence-service!329
2024-02-01 18:33:50 +01:00
Corina Olariu
c00ac6ebe1 RED-7143 - Error 500 generated when entering very long text in editable fields of a file
- validate the value length

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-01 15:17:34 +02:00
Dominique Eifländer
76ee5b0c94 Merge branch 'RED-8415' into 'master'
RED-8415: Reject file attribute configs with lable > 255 chars

Closes RED-8415

See merge request redactmanager/persistence-service!328
2024-02-01 13:04:53 +01:00
Dominique Eifländer
a710c5b549 RED-8415: Reject file attribute configs with lable > 255 chars 2024-02-01 12:56:38 +01:00
Corina Olariu
a6e323ade5 Merge branch 'RED-8361' into 'master'
RED-8361 - Returned error status codes should be checked

Closes RED-8361

See merge request redactmanager/persistence-service!326
2024-02-01 12:09:32 +01:00
Corina Olariu
80e783d46b RED-8361 - Returned error status codes should be checked
- renamed and rework the access permission validations

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-02-01 12:36:57 +02:00
Maverick Studer
57cc7c7c54 Merge branch 'RED-8372' into 'master'
RED-8372: Include additional info about redactions in redaction annotations

Closes RED-8372

See merge request redactmanager/persistence-service!327
2024-01-31 10:23:21 +01:00
Maverick Studer
caac9f48ee RED-8372: Include additional info about redactions in redaction annotations 2024-01-31 10:23:21 +01:00
Corina Olariu
95978b85af RED-8361 - Returned error status codes should be checked
- adding validation to endpoints considering the dossier resources
- if changes are done to dossier, access permissions are checked
- in case information is requested regarding dossier, the view permissions are checked

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
2024-01-30 15:00:38 +02:00
Timo Bejan
5394faa065 Merge branch 'RED-8085' into 'master'
Resolve RED-8085

Closes RED-8085

See merge request redactmanager/persistence-service!325
2024-01-29 10:32:13 +01:00
Timo Bejan
dab280cef5 Resolve RED-8085 2024-01-29 10:32:13 +01:00
Kilian Schüttler
99a71a6036 Merge branch 'RED-7384' into 'master'
RED-7384: deprecate AnnotationStatus

Closes RED-7384

See merge request redactmanager/persistence-service!324
2024-01-29 10:04:15 +01:00
Kilian Schüttler
f3b2620df7 RED-7384: deprecate AnnotationStatus 2024-01-29 10:04:15 +01:00
Maverick Studer
4cfe7d9c95 Merge branch 'RED-7176' into 'master'
RED-7176: Soft-/Hard-/Restore Dossier without Dossier Owner not possible

Closes RED-7176

See merge request redactmanager/persistence-service!323
2024-01-25 15:50:48 +01:00
Maverick Studer
cfb81e9326 RED-7176: Soft-/Hard-/Restore Dossier without Dossier Owner not possible 2024-01-25 15:50:47 +01:00
Kilian Schüttler
c2d4b0fd28 Merge branch 'RED-8371' into 'master'
RED-8371: after initial file upload flag calculation does not work

Closes RED-8371

See merge request redactmanager/persistence-service!322
2024-01-25 09:29:58 +01:00
Kilian Schüttler
d9497ef45d RED-8371: after initial file upload flag calculation does not work 2024-01-25 09:29:58 +01:00
Maverick Studer
9329023ff6 Merge branch 'RED-8248' into 'master'
RED-8248: Sent comments are not sorted by order of arrival

Closes RED-8248

See merge request redactmanager/persistence-service!321
2024-01-24 12:15:06 +01:00
maverickstuder
6321295d02 RED-8248: Sent comments are not sorted by order of arrival 2024-01-24 12:06:53 +01:00
maverickstuder
42b410f6f7 RED-8248: Sent comments are not sorted by order of arrival
* added sorting for getComments called from controller
2024-01-24 10:32:17 +01:00
Maverick Studer
7455628790 Merge branch 'RED-5449' into 'master'
RED-5449: Wrong behaviour of imported redactions only from PREVIEW-File

Closes RED-5449

See merge request redactmanager/persistence-service!320
2024-01-24 09:21:23 +01:00
Ali Oezyetimoglu
6690fba43d Merge branch 'RED-7252' into 'master'
RED-7252: Not possible anymore to ocr deleted or approved file

Closes RED-7252

See merge request redactmanager/persistence-service!319
2024-01-23 17:25:26 +01:00
Kilian Schüttler
a6eda4841a Merge branch 'resize_hotfix' into 'master'
hotfix: resizing a rule-based entity with dict does not work

See merge request redactmanager/persistence-service!318
2024-01-23 16:54:11 +01:00
Ali Oezyetimoglu
9162bb7edc RED-7252: Not possible anymore to ocr deleted or approved file 2024-01-23 16:45:41 +01:00
Kilian Schuettler
b67cf7eb99 hotfix: resizing a rule-based entity with dict does not work 2024-01-23 14:32:03 +01:00
maverickstuder
c674cccf43 RED-5449: Wrong behaviour of imported redactions only from PREVIEW-File 2024-01-23 13:17:41 +01:00
Maverick Studer
06ea42c410 Merge branch 'RED-7376' into 'master'
RED-7376: Flag in deployment to indicate supported file formats

Closes RED-7376

See merge request redactmanager/persistence-service!317
2024-01-23 12:56:34 +01:00
Maverick Studer
835e3568f6 RED-7376: Flag in deployment to indicate supported file formats 2024-01-23 12:56:34 +01:00
Maverick Studer
ef13d8ace2 Merge branch 'RED-5369' into 'master'
RED-5369: View dossier & access permissions are not working for dossier attributes controller

Closes RED-5369

See merge request redactmanager/persistence-service!316
2024-01-22 12:56:53 +01:00
maverickstuder
56dcd421a9 RED-5369: View dossier & access permissions are not working for dossier attributes controller
* now when no permissions are given to view dossiers the endpoint to get dossier attributes returns an empty list instead of a 403 access denied
2024-01-22 12:34:02 +01:00
maverickstuder
9a3898a377 RED-5369: View dossier & access permissions are not working for dossier attributes controller
* now when no permissions are given to view dossiers the endpoint to get dossier attributes returns an empty list instead of a 403 access denied
2024-01-22 11:23:07 +01:00
Corina Olariu
e17f577064 Merge branch 'RED-8306' into 'master'
RED-8306 - An unprocessed remove from dict should not lead to a local remove

Closes RED-8306

See merge request redactmanager/persistence-service!315
2024-01-19 13:04:09 +01:00
Corina Olariu
e8a5ae9da9 RED-8306 - An unprocessed remove from dict should not lead to a local remove
- when merging unprocessed removal check for remove from dictionary in order to set the manual redaction type accordingly
2024-01-19 13:14:40 +02:00
Yannik Hampe
f9ab3a2607 Merge branch 'RED-6805' into 'master'
RED-6805: As Operation I want to see why downloads are in an ERROR state

Closes RED-6805

See merge request redactmanager/persistence-service!306
2024-01-18 17:10:14 +01:00
yhampe
6a2260af8f Merge remote-tracking branch 'origin/RED-6805' into RED-6805
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/db.changelog-tenant.yaml
2024-01-18 17:02:21 +01:00
yhampe
15611d438c RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorcause to all download dlqs containing queue name
2024-01-18 17:01:58 +01:00
yhampe
45cae62b01 RED-6805: As Operation I want to see why downloads are in an ERROR state
reset errorcause when downloadstatus is ready
ensuring lenghth of errorcause will not exceed field length
2024-01-18 17:01:58 +01:00
yhampe
f6c21faf0c RED-6805: As Operation I want to see why downloads are in an ERROR state
included file in changelog
2024-01-18 17:01:53 +01:00
yhampe
9de4dfc5af RED-6805: As Operation I want to see why downloads are in an ERROR state
added default method back
2024-01-18 17:01:42 +01:00
yhampe
421fe57e38 RED-6805: As Operation I want to see why downloads are in an ERROR state
checkstyle
2024-01-18 17:01:42 +01:00
yhampe
2b782fdd4c RED-6805: As Operation I want to see why downloads are in an ERROR state
checkstyle
2024-01-18 17:01:42 +01:00
yhampe
4ccf355dcf RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorcause to repository
2024-01-18 17:01:42 +01:00
yhampe
0cfbdb3083 RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorCause to downloadStatus
2024-01-18 17:01:42 +01:00
yhampe
bc348215a6 RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorCause to dlq message receiver
added column with errorcause to downloadstatus table
2024-01-18 17:01:42 +01:00
yhampe
03303ece8e RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorcause to all download dlqs containing queue name
2024-01-18 16:20:48 +01:00
Kilian Schüttler
0d9f5276a5 Merge branch 'RED-8168' into 'master'
RED-8168: Calculation of analysis flags should be async

Closes RED-8168

See merge request redactmanager/persistence-service!297
2024-01-18 16:12:36 +01:00
Kilian Schüttler
caecbb483a RED-8168: Calculation of analysis flags should be async 2024-01-18 16:12:36 +01:00
Maverick Studer
15ddc1afeb Merge branch 'RED-5368' into 'master'
RED-5368: View dossier permissions are not working for dossier status controller

Closes RED-5368

See merge request redactmanager/persistence-service!313
2024-01-18 14:13:18 +01:00
Maverick Studer
2505cb70d2 RED-5368: View dossier permissions are not working for dossier status controller 2024-01-18 14:13:18 +01:00
Maverick Studer
5d13696cec Merge branch 'RED-5369' into 'master'
RED-5369: View dossier & access permissions are not working for dossier attributes controller

Closes RED-5369

See merge request redactmanager/persistence-service!314
2024-01-18 13:51:49 +01:00
maverickstuder
804a078403 RED-5369: View dossier & access permissions are not working for dossier attributes controller
* added hasPermission checks on all dossier specific endpoints in the DossierAttributesController
2024-01-18 13:38:59 +01:00
Dominique Eifländer
f608aa1043 Merge branch 'RED-7928' into 'master'
RED-7928: Reset ocr status values if ocr fails

Closes RED-7928

See merge request redactmanager/persistence-service!312
2024-01-17 15:45:39 +01:00
Dominique Eifländer
da98b4cc4e RED-7928: Reset ocr status values if ocr fails 2024-01-17 15:33:21 +01:00
Timo Bejan
7ff2b9f11f Merge branch 'RED-8175' into 'master'
RED-8175 - fixed path traversal issue

Closes RED-8175

See merge request redactmanager/persistence-service!310
2024-01-16 16:07:10 +01:00
Timo Bejan
8c7b991ecb RED-8175 - fixed path traversal issue 2024-01-16 14:36:54 +02:00
yhampe
5333db97ea RED-6805: As Operation I want to see why downloads are in an ERROR state
reset errorcause when downloadstatus is ready
ensuring lenghth of errorcause will not exceed field length
2024-01-16 09:55:48 +01:00
yhampe
3f6c493e54 RED-6805: As Operation I want to see why downloads are in an ERROR state
included file in changelog
2024-01-15 14:41:18 +01:00
yhampe
a04b00c794 RED-6805: As Operation I want to see why downloads are in an ERROR state
added default method back
2024-01-15 14:31:45 +01:00
yhampe
9907f389b1 RED-6805: As Operation I want to see why downloads are in an ERROR state
checkstyle
2024-01-15 14:25:35 +01:00
Maverick Studer
15a4189b3e Merge branch 'RED-7232' into 'master'
RED-7232: Error 500 occurs when entering long text in Dossier States - Status Name Field

Closes RED-7232

See merge request redactmanager/persistence-service!308
2024-01-15 14:12:23 +01:00
maverickstuder
0aaafa41ea RED-7232: Error 500 occurs when entering long text in Dossier States - Status Name Field
* validate status name field on dossier status persistence
2024-01-15 14:02:59 +01:00
Maverick Studer
16d182a513 Merge branch 'RED-5949' into 'master'
RED-5949: Wrong notificationType for specific endpoint

Closes RED-5949

See merge request redactmanager/persistence-service!307
2024-01-15 12:29:40 +01:00
yhampe
9c4ee66d02 RED-6805: As Operation I want to see why downloads are in an ERROR state
checkstyle
2024-01-15 12:27:18 +01:00
yhampe
c1d46ddace RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorcause to repository
2024-01-15 12:21:00 +01:00
maverickstuder
9ac8fcbf38 RED-5949: Wrong notificationType for specific endpoint
* Do not send notification if assigneeId is null
2024-01-15 12:20:54 +01:00
yhampe
5f72b0e2c4 RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorCause to downloadStatus
2024-01-15 11:55:17 +01:00
yhampe
4ea6996bdd RED-6805: As Operation I want to see why downloads are in an ERROR state
added errorCause to dlq message receiver
added column with errorcause to downloadstatus table
2024-01-15 11:52:57 +01:00
Andrei Isvoran
f148c6fa6d Merge branch 'RED-8242' into 'master'
RED-8242 - Set AREA entry type for unprocessed rectangle redactions

Closes RED-8242

See merge request redactmanager/persistence-service!305
2024-01-11 15:27:18 +01:00
Andrei Isvoran
06570a33e8 RED-8242 - Set AREA entry type for unprocessed rectangle redactions 2024-01-11 15:27:18 +01:00
Dominique Eifländer
e2b64b566b Merge branch 'RED-8175' into 'master'
RED-8175: Use only one thread for @Async deletion of files that are already...

Closes RED-8175

See merge request redactmanager/persistence-service!304
2024-01-11 12:47:50 +01:00
Dominique Eifländer
ef6c268c2b RED-8175: Use only one thread for @Async deletion of files that are already added to download package 2024-01-11 12:40:16 +01:00
Andrei Isvoran
5a95dfbc1c Merge branch 'RED-8043-broken-section' into 'master'
RED-8043 - Fix section

Closes RED-8043

See merge request redactmanager/persistence-service!303
2024-01-11 12:29:47 +01:00
Andrei Isvoran
41d25ff924 RED-8043 - Fix section 2024-01-11 12:29:47 +01:00
Andrei Isvoran
1f10939e32 Merge branch 'RED-8043-fix-section' into 'master'
RED-8043 - Check for null AND empty before updating the section

Closes RED-8043

See merge request redactmanager/persistence-service!301
2024-01-10 16:42:03 +01:00
Andrei Isvoran
369e944255 RED-8043 - Check for null AND empty before updating the section 2024-01-10 16:42:03 +01:00
Kilian Schüttler
2da3b3d30c Merge branch 'RED-7384' into 'master'
RED-7384: delete NER_ENTITIES file

Closes RED-7384

See merge request redactmanager/persistence-service!300
2024-01-10 13:37:56 +01:00
Kilian Schuettler
0312656ad6 RED-7384: delete NER_ENTITIES file 2024-01-10 12:41:19 +01:00
Andrei Isvoran
3d1d7bcbf2 Merge branch 'RED-8043-section' into 'master'
RED-8043 - Save section for manual redactions and unprocessed manual redactions

Closes RED-8043

See merge request redactmanager/persistence-service!299
2024-01-09 16:02:24 +01:00
Andrei Isvoran
c7c22bfd06 RED-8043 - Save section for manual redactions and unprocessed manual redactions 2024-01-09 16:02:24 +01:00
Dominique Eifländer
a299f99575 Merge branch 'RED-8174' into 'master'
RED-8174: Fixed transaction handling for notification preferences

Closes RED-8174

See merge request redactmanager/persistence-service!298
2024-01-09 10:58:30 +01:00
Dominique Eifländer
cf4a650fb5 RED-8174: Fixed transaction handling for notification preferences 2024-01-09 10:38:09 +01:00
Timo Bejan
be705a5406 Merge branch 'RED-8175' into 'master'
Fixed transitive dependencies and concurrent download issue RED-8175

Closes RED-8175

See merge request redactmanager/persistence-service!295
2024-01-08 11:23:38 +01:00
Timo Bejan
d0571a436c Fixed transitive dependencies and concurrent download issue RED-8175 2024-01-08 10:20:10 +02:00
Andrei Isvoran
ea9af28633 Merge branch 'RED-8043-convert' into 'master'
RED-8043 - Correctly convert resize redactions

Closes RED-8043

See merge request redactmanager/persistence-service!294
2024-01-05 09:12:50 +01:00
Andrei Isvoran
08b4883e5e RED-8043 - Correctly convert resize redactions 2024-01-05 09:51:16 +02:00
Ali Oezyetimoglu
41791c7e07 Merge branch 'RED-5246' into 'master'
RED-5246: changed permission check for getDossier(...)

Closes RED-5246

See merge request redactmanager/persistence-service!293
2024-01-04 16:41:16 +01:00
Ali Oezyetimoglu
f5f1bde988 RED-5246: changed permission check for getDossier(...) 2024-01-04 14:23:55 +01:00
Dominique Eifländer
7dfd46e887 Merge branch 'RED-8043-trigger-reprocess-correctly' into 'master'
RED-8043 - Only send local manual redactions/resizes to surrounding text...

Closes RED-8043

See merge request redactmanager/persistence-service!292
2024-01-04 13:45:28 +01:00
Andrei Isvoran
c4a354560d RED-8043 - Only send local manual redactions/resizes to surrounding text... 2024-01-04 13:45:28 +01:00
Andrei Isvoran
af2a16e540 Merge branch 'RED-8043-fixes' into 'master'
RED-8043 - General fixes

Closes RED-8043

See merge request redactmanager/persistence-service!290
2024-01-03 14:13:47 +01:00
Andrei Isvoran
a1a8e14419 RED-8043 - General fixes 2024-01-03 14:13:47 +01:00
Andrei Isvoran
267e8b3abc Merge branch 'RED-8114' into 'master'
RED-8114  Copy new value for unprocessed resize & add fetch type for IdRemoval collection

Closes RED-8114

See merge request redactmanager/persistence-service!289
2023-12-22 15:12:04 +01:00
Andrei Isvoran
1761528c23 RED-8114 - Add fetchtype 2023-12-22 16:02:43 +02:00
Andrei Isvoran
3335c54000 RED-8114 - Also copy new value for resize 2023-12-22 16:01:47 +02:00
Andrei Isvoran
150df5e721 Merge branch 'RED-7662' into 'master'
RED-7662 - Don't display hasHints flag if there are no hints

Closes RED-7662

See merge request redactmanager/persistence-service!288
2023-12-22 11:46:16 +01:00
Andrei Isvoran
568979a4e1 RED-7662 - Don't display hasHints flag if there are no hints 2023-12-22 12:21:28 +02:00
Dominique Eifländer
e4f1a04220 Merge branch 'connectionHotfix' into 'master'
hotfix: Fixed 'idle in transaction' connections when loading entityLog

See merge request redactmanager/persistence-service!287
2023-12-22 11:09:42 +01:00
Dominique Eifländer
e10681a0c0 hotfix: Fixed 'idle in transaction' connections when loading entityLog 2023-12-22 10:51:45 +01:00
Dominique Eifländer
cfc0bba3dc Merge branch 'RED-8034' into 'master'
RED-8034: Filter out entityLog entries for excluded pages

Closes RED-8034

See merge request redactmanager/persistence-service!286
2023-12-22 10:35:29 +01:00
Dominique Eifländer
701e173b99 RED-8034: Filter out entityLog entries for excluded pages 2023-12-22 10:19:40 +01:00
Andrei Isvoran
b7c4ec2d75 Merge branch 'RED-7784-force-hint' into 'master'
RED-7784 - Correctly set state for forced hints

Closes RED-7784

See merge request redactmanager/persistence-service!285
2023-12-22 08:53:35 +01:00
Andrei Isvoran
bd5756a06b RED-7784 - Correctly set state for forced hints 2023-12-21 15:49:17 +02:00
Andrei Isvoran
b2dbbbb405 Merge branch 'RED-8043-update-text' into 'master'
RED-8043 - Fix surrounding text not updating when adding manual redaction

Closes RED-8043

See merge request redactmanager/persistence-service!284
2023-12-21 14:05:00 +01:00
Andrei Isvoran
d190291b5b RED-8043 - Fix surrounding text not updating when adding manual redaction 2023-12-21 14:05:00 +01:00
Ali Oezyetimoglu
ca1db849d7 Merge branch 'RED-5246-revert' into 'master'
Revert "RED-5246: updated ACLBeanConfiguration to use...

Closes RED-5246

See merge request redactmanager/persistence-service!283
2023-12-21 12:33:07 +01:00
Ali Oezyetimoglu
0d705f53ca Revert "RED-5246: updated ACLBeanConfiguration to use CustomAclPermissionEvaluator and also changed to custom NotFoundException"
This reverts commit 7172ae55d661374f4bbdfbc6398636909ebc3c52.
2023-12-21 11:40:27 +01:00
Andrei Isvoran
92bfe44d03 Merge branch 'RED-8114' into 'master'
RED-8114 - Allow editing of unprocessed manual changes

Closes RED-8114

See merge request redactmanager/persistence-service!282
2023-12-21 09:45:13 +01:00
Andrei Isvoran
4deadfec0b RED-8114 - Allow editing of unprocessed manual changes 2023-12-21 09:45:13 +01:00
Kilian Schüttler
e9c139211f Merge branch 'RED-7784-refactor' into 'master'
RED-7784 - Refactor merge logic to not loop multiple times through the entire entity log entries

Closes RED-7784

See merge request redactmanager/persistence-service!279
2023-12-20 13:43:16 +01:00
Andrei Isvoran
6ba76e66ec RED-7784 - Refactor merge logic to not loop multiple times through the entire entity log entries 2023-12-20 13:43:16 +01:00
Kilian Schüttler
85fc1a570b Merge branch 'RED-1137' into 'master'
RED-1137: Do not observe actuator endpoints

Closes RED-1137

See merge request redactmanager/persistence-service!278
2023-12-20 13:07:41 +01:00
Dominique Eifländer
a71e75da90 RED-1137: Do not observe actuator endpoints 2023-12-20 12:58:09 +01:00
Dominique Eifländer
187a882e0b Merge branch 'RED-7384' into 'master'
RED-7834: fix migration issues

Closes RED-7384

See merge request redactmanager/persistence-service!276
2023-12-20 12:28:46 +01:00
Kilian Schüttler
1ea65a256c RED-7834: fix migration issues 2023-12-20 12:28:46 +01:00
Corina Olariu
9b972984cf Merge branch 'RED-7256-npe' into 'master'
RED-7256 - Overlapping annotation color from imported redaction and resized redaction

Closes RED-7256

See merge request redactmanager/persistence-service!270
2023-12-20 11:48:51 +01:00
Corina Olariu
85d12f9355 RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- fix merge from master
2023-12-20 11:14:30 +02:00
Corina Olariu
2948ae1c10 Merge branch 'master' into RED-7256-npe
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/EntityLogMergeService.java
2023-12-20 11:07:11 +02:00
Dominique Eifländer
f2352413e1 Merge branch 'RED-8034' into 'master'
RED-8034: Always load entityLog from persistence-service because excluded...

Closes RED-8034

See merge request redactmanager/persistence-service!275
2023-12-19 16:48:07 +01:00
Dominique Eifländer
f568cf2eec RED-8034: Always load entityLog from persistence-service because excluded pages are calculated there 2023-12-19 16:34:09 +01:00
Dominique Eifländer
822a55a8f8 Merge branch 'RED-7784-changes' into 'master'
RED-7784 - Don't update changes dateTime on every merge.

Closes RED-7784

See merge request redactmanager/persistence-service!274
2023-12-19 16:22:32 +01:00
Andrei Isvoran
b5794f7fdf RED-7784 - Don't update changes dateTime on every merge. 2023-12-19 17:14:49 +02:00
Andrei Isvoran
4c9ffd5f64 Merge branch 'RED-8043' into 'master'
RED-8043 - Refactor entity log merge & don't send surrounding analysis request for dictionary adds

Closes RED-8043

See merge request redactmanager/persistence-service!271
2023-12-19 16:06:39 +01:00
Andrei Isvoran
f71976e595 RED-8043 - Refactor entity log merge & don't send surrounding analysis request for dictionary adds 2023-12-19 16:06:39 +01:00
Dominique Eifländer
d62746484e Merge branch 'RED-8034' into 'master'
RED-8034: Exclude entries from entitylog for exluded pages without analyse

Closes RED-8034

See merge request redactmanager/persistence-service!273
2023-12-19 13:52:11 +01:00
Dominique Eifländer
995ff6b725 RED-8034: Exclude entries from entitylog for exluded pages without analyse 2023-12-19 13:40:32 +01:00
Corina Olariu
6e7dadd0cf RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- fix immutable map
2023-12-19 14:17:15 +02:00
Corina Olariu
705dd42333 RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- fix the NPE aldo for legalBasis changes
2023-12-19 13:50:38 +02:00
Corina Olariu
85737653f7 RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- use Strings from guave for empty or null and set empty value in case of null value
2023-12-19 12:50:21 +02:00
Dominique Eifländer
7257bdb159 Merge branch 'RED-5246' into 'master'
RED-5246: updated ACLBeanConfiguration to use CustomAclPermissionEvaluator and...

Closes RED-5246

See merge request redactmanager/persistence-service!272
2023-12-19 11:29:24 +01:00
Ali Oezyetimoglu
7172ae55d6 RED-5246: updated ACLBeanConfiguration to use CustomAclPermissionEvaluator and also changed to custom NotFoundException 2023-12-19 11:22:11 +01:00
Corina Olariu
36755e5958 RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- fix NPE which is caused by the null value in case of resize imported redaction
2023-12-15 11:17:29 +02:00
Andrei Isvoran
b0f40a080c Merge branch 'RED-8043' into 'master'
RED-8043 - Refactor EntityLog merge mechanism

Closes RED-8043

See merge request redactmanager/persistence-service!269
2023-12-14 15:06:32 +01:00
Andrei Isvoran
8c854900cc RED-8043 - Refactor EntityLog merge mechanism 2023-12-14 15:06:32 +01:00
Yannik Hampe
464d5e2ef3 Merge branch 'RED-8078' into 'master'
RED-8078: Removing an entity type should trigger complete reanalysis

Closes RED-8078

See merge request redactmanager/persistence-service!267
2023-12-14 14:07:35 +01:00
Dominique Eifländer
31893ba442 Merge branch 'cycleHotfix' into 'master'
Cycle hotfix

See merge request redactmanager/persistence-service!268
2023-12-14 14:04:39 +01:00
Dominique Eifländer
56038f13b9 hotfix: Fixed old versions in project, because of cycling dependencies 2023-12-14 13:50:50 +01:00
yhampe
95afc6cd14 Merge remote-tracking branch 'origin/RED-8078' into RED-8078 2023-12-14 13:48:10 +01:00
yhampe
c6d330f1df RED-8078: Removing an entity type should trigger complete reanalysis
added parameter to include deleted dictionary types
2023-12-14 13:48:00 +01:00
yhampe
9c0db2a5fe RED-8078: Removing an entity type should trigger complete reanalysis
added parameter to include deleted dictionary types
2023-12-14 11:49:40 +01:00
Dominique Eifländer
36e76b0273 RED-5223: Added tracing for scheduled analysis, and add fileId on upload to trace 2023-12-14 11:28:14 +01:00
Dominique Eifländer
6a61033441 Merge branch 'RED-6661-fixes' into 'master'
migration for uncompressed azure blobs

Closes RED-6661

See merge request redactmanager/persistence-service!264
2023-12-14 09:28:26 +01:00
Timo Bejan
a62f642c28 migration for uncompressed azure blobs 2023-12-13 16:21:38 +02:00
Dominique Eifländer
cf44dbff03 Merge branch 'RED-5223' into 'master'
RED-5223: Use tracing-commons from fforesight

Closes RED-5223

See merge request redactmanager/persistence-service!265
2023-12-13 14:59:49 +01:00
Dominique Eifländer
56db92bf39 RED-5223: Use tracing-commons from fforesight 2023-12-13 14:50:37 +01:00
Dominique Eifländer
8f629914bd Merge branch 'RED-5223' into 'master'
RED-5223: Fixed not working tracing when comes from queue, upgraded ocr service

Closes RED-5223

See merge request redactmanager/persistence-service!263
2023-12-12 15:13:19 +01:00
Dominique Eifländer
9e3191dabd RED-5223: Fixed not working tracing when comes from queue, upgraded ocr service 2023-12-12 15:05:18 +01:00
Dominique Eifländer
7d3a7452a9 Merge branch 'RED-7834' into 'master'
RED-7834: fix migration issues

Closes RED-7834

See merge request redactmanager/persistence-service!262
2023-12-12 13:58:06 +01:00
Kilian Schüttler
cdf37fd486 RED-7834: fix migration issues 2023-12-12 13:58:05 +01:00
Timo Bejan
3b8b397fe5 Merge branch 'RED-7834' into 'master'
RED-7834: fix migration issues

Closes RED-7834

See merge request redactmanager/persistence-service!261
2023-12-11 15:46:32 +01:00
Kilian Schüttler
87f841d9dd RED-7834: fix migration issues 2023-12-11 15:46:32 +01:00
Andrei Isvoran
4653cba097 Merge branch 'RED-8057' into 'master'
RED-8057 - Fix issue with adding dict based manual redactions with no position specified

Closes RED-8057

See merge request redactmanager/persistence-service!259
2023-12-08 16:21:02 +01:00
Andrei Isvoran
9b8e6a0e84 RED-8057 - Fix issue with adding dict based manual redactions with no position specified 2023-12-08 16:21:02 +01:00
Dominique Eifländer
ea81708227 Merge branch 'RED-1137' into 'master'
RED-1137: Enabled tracing, enabled traceId/spanId in Json logging, send custom...

Closes RED-1137

See merge request redactmanager/persistence-service!256
2023-12-08 13:46:41 +01:00
Dominique Eifländer
c1540943a4 RED-1137: Enabled tracing, enabled traceId/spanId in Json logging, send custom attributes for namespace and version 2023-12-08 13:40:11 +01:00
Andrei Isvoran
6f5f148731 Merge branch 'RED-7404-deploy' into 'master'
RED-7404 - Add missing deploy stage

Closes RED-7404

See merge request redactmanager/persistence-service!257
2023-12-08 12:22:12 +01:00
Andrei Isvoran
0a4096401c RED-7404 - Add missing deploy stage 2023-12-08 13:19:30 +02:00
Andrei Isvoran
430f118206 Merge branch 'RED-7404' into 'master'
RED-7404 - Add publishing for all modules

Closes RED-7404

See merge request redactmanager/persistence-service!254
2023-12-08 11:27:47 +01:00
Andrei Isvoran
77d1e6ed4c RED-7404 - Add publishing for all modules 2023-12-08 11:27:46 +01:00
Timo Bejan
f8157e4448 Merge branch 'RED-6661' into 'master'
Por change for local dev

Closes RED-6661

See merge request redactmanager/persistence-service!255
2023-12-07 00:24:42 +01:00
Timo Bejan
05db55adca Por change for local dev 2023-12-07 01:13:45 +02:00
Andrei Isvoran
7508e7667e Merge branch 'RED-8043' into 'master'
RED-8043 - Add new MessageType and queue

Closes RED-8043

See merge request redactmanager/persistence-service!253
2023-12-06 14:49:58 +01:00
Andrei Isvoran
5c215f3a47 RED-8043 - Add new MessageType and queue 2023-12-06 14:49:57 +01:00
Andrei Isvoran
ba21282b1c Merge branch 'RED-7715' into 'master'
RED-7715 - Modify log4j config to enable switching between console and json based on env var

Closes RED-7715

See merge request redactmanager/persistence-service!251
2023-12-06 09:30:37 +01:00
Andrei Isvoran
170cc61000 RED-7715 - Modify log4j config to enable switching between console and json based on env var 2023-12-06 09:30:37 +01:00
Andrei Isvoran
f77ec53282 Merge branch 'RED-7404-fix-jsonprimitive' into 'master'
RED-7404 - Add lombok.config

Closes RED-7404

See merge request redactmanager/persistence-service!243
2023-12-04 17:50:39 +01:00
Andrei Isvoran
37c2eef2f9 RED-7404 - Add lombok.config 2023-12-04 17:50:39 +01:00
Kevin Tumma
5c89099ac0 hotfix version 2023-12-04 14:31:39 +01:00
Andrei Isvoran
cf0d85a42d Merge branch 'RED-7404-gitlab-ci' into 'master'
RED-7404 - Fix gitlab-ci.yml

Closes RED-7404

See merge request redactmanager/persistence-service!242
2023-12-04 14:28:44 +01:00
Andrei Isvoran
22a5be7021 RED-7404 - Fix gitlab-ci.yml 2023-12-04 15:20:26 +02:00
Ali Oezyetimoglu
e52c60c669 Merge branch 'RED-8014' into 'master'
RED-8014: Remove spaces as suffix and prefix on dossier creation

Closes RED-8014

See merge request redactmanager/persistence-service!238
2023-12-04 14:10:23 +01:00
Andrei Isvoran
d8ee40bf66 Merge branch 'RED-7404-update' into 'master'
RED-7404 - Fix gitlab-ci

Closes RED-7404

See merge request redactmanager/persistence-service!240
2023-12-04 13:48:49 +01:00
Andrei Isvoran
853fa8365e RED-7404 - Fix gitlab-ci 2023-12-04 14:40:31 +02:00
Andrei Isvoran
91884f450a Merge branch 'RED-7404-update' into 'master'
RED-7404 - Remove clean cache

Closes RED-7404

See merge request redactmanager/persistence-service!239
2023-12-04 13:05:41 +01:00
Andrei Isvoran
838c4e604c RED-7404 - Remove clean cache 2023-12-04 13:56:13 +02:00
Andrei Isvoran
391365b2fb Merge branch 'RED-7404' into 'master'
RED-7404 - Migrate to gradle

Closes RED-7404

See merge request redactmanager/persistence-service!231
2023-12-04 12:31:47 +01:00
Andrei Isvoran
8dad6c44df RED-7404 - Migrate to gradle 2023-12-04 12:31:47 +01:00
Ali Oezyetimoglu
47e268287e RED-8014: Remove spaces as suffix and prefix on dossier creation 2023-12-04 09:54:10 +01:00
Timo Bejan
db38a97f8a Merge branch 'RED-8031' into 'master'
RED-8031 - Migration for non gzipped files

Closes RED-8031

See merge request redactmanager/persistence-service!237
2023-12-03 21:18:24 +01:00
Timo Bejan
b5cd72c7bf RED-8031 - Migration for non gzipped files 2023-12-03 21:45:50 +02:00
Dominique Eifländer
815de4d184 Merge branch 'RED-7962' into 'master'
RED-7962 Changed response type to "text/plain; charset=utf-8"

Closes RED-7962

See merge request redactmanager/persistence-service!236
2023-11-30 12:40:17 +01:00
Kresnadi Budisantoso
1de6210993 RED-962 Fixup response type & error 500 2023-11-29 23:58:40 +01:00
Kresnadi Budisantoso
b9d473677c Hotfix: Download file name not properly recognized by the browser as the response header is malformed 2023-11-29 23:25:46 +01:00
Kresnadi Budisantoso
9d84085d46 Hotfix: Download rule file endpoint (old version) ignores the file type 2023-11-29 23:16:31 +01:00
Kresnadi Budisantoso
4c4e1ced91 RED-7962 Changed response type to "text/plain; charset=utf-8"
- Fixup of previous commit
- Use "text/plain; charset=utf-8" instead of "application/octet-stream" as response type for rule files
  as they are actually text files.
2023-11-29 23:07:14 +01:00
Kresnadi Budisantoso
93ff601b44 Merge branch 'RED-7962' into 'master'
RED-7962 Fix error 500 for rule download endpoints.

Closes RED-7962

See merge request redactmanager/persistence-service!235
2023-11-29 17:32:20 +01:00
Kresnadi Budisantoso
9aff9e2d71 RED-7962 Fix error 500 for rule download endpoints.
The previous fix just corrected missing 404 response for the upload endpoints.
In case of a 404 error, the response entity is not a InputStreamResource anymore but an object containing the error message.
2023-11-29 17:23:45 +01:00
Dominique Eifländer
fa8a5cf61f Merge branch 'RED-7962' into 'master'
RED-7962 Fix wrong CSV mapping active flag and error 500 for rule endpoints

Closes RED-7962

See merge request redactmanager/persistence-service!234
2023-11-29 16:34:01 +01:00
Kresnadi Budisantoso
d4a9afb8fe RED-7962 Fix error 500 for rule endpoints if dossier template does not exist
Also return 404 for file attribute definition endpoint if dossier template does not exist.
2023-11-29 16:18:46 +01:00
Kresnadi Budisantoso
9985e9b0af RED-7962 Fix wrong CSV mapping active flag 2023-11-29 16:18:46 +01:00
Timo Bejan
32e4b9a1fd Merge branch 'DM-602' into 'master'
DM-602: Do not always set addToDictionary for recategorizations

Closes DM-602

See merge request redactmanager/persistence-service!233
2023-11-29 11:36:13 +01:00
Dominique Eifländer
e55cd716cc DM-602: Do not always set addToDictionary for recategorizations 2023-11-29 11:28:28 +01:00
Andrei Isvoran
9e04a47e90 Merge branch 'RED-7784-additional-fixes' into 'master'
RED-7785 - Fix false positives not getting removed for unprocessed changes & refactor merging unprocessed changes into entitylog logic.

Closes RED-7784

See merge request redactmanager/persistence-service!228
2023-11-29 11:03:52 +01:00
Andrei Isvoran
88736855b4 RED-7785 - Fix false positives not getting removed for unprocessed changes & refactor merging unprocessed changes into entitylog logic. 2023-11-29 11:03:51 +01:00
Corina Olariu
c036acc81d Merge branch 'RED-7979' into 'master'
RED-7979 - Force Hint leads to 500 BE Error

Closes RED-7979

See merge request redactmanager/persistence-service!232
2023-11-29 10:24:36 +01:00
Dominique Eifländer
00dff315b7 Merge branch 'RED-7962' into 'master'
RED-7962 Fixed error 500 and improved response of endpoint to get file attributes ...

Closes RED-7962

See merge request redactmanager/persistence-service!230
2023-11-29 09:52:18 +01:00
Corina Olariu
22d837a35f RED-7979 - Force Hint leads to 500 BE Error
- in case of force hint, there is no legalBasis so do not add property changes for legalBasis
2023-11-29 10:40:07 +02:00
Kresnadi Budisantoso
06d3b282cc RED-7962 Updated platform dependency to 2.20.0 2023-11-29 00:05:22 +01:00
Kresnadi Budisantoso
0013b5d116 RED-7962 Improved response of endpoint to get file attributes
Added CSV settings.
2023-11-29 00:05:22 +01:00
Kresnadi Budisantoso
97960d8ed7 RED-7962 Fixes error 500 that occurred because of the rule file type parameter that was not removed by mistake
Also adjusted the audit log message if 'dryRun' was set to `true`.
2023-11-29 00:05:22 +01:00
Timo Bejan
67bd3ed4bc Merge branch 'RED-7967' into 'master'
RED-7967 - liquibase fix

Closes RED-7967

See merge request redactmanager/persistence-service!229
2023-11-28 21:02:43 +01:00
Timo Bejan
882576dadf RED-7967 - liquibase fix 2023-11-28 17:39:13 +02:00
Kilian Schüttler
5eb4d86808 Merge branch 'RED-7962' into 'master'
RED-7962 Added 'red-experimental' role to restrict usage of experimental...

Closes RED-7962

See merge request redactmanager/persistence-service!227
2023-11-27 18:40:10 +01:00
Kresnadi Budisantoso
93167265d1 RED-7962 Added 'red-experimental' role to restrict usage of experimental... 2023-11-27 18:40:09 +01:00
Timo Bejan
cec1c1dae9 Merge branch 'migration-fixes' into 'master'
Migration fixes

See merge request redactmanager/persistence-service!226
2023-11-23 20:58:36 +01:00
Timo Bejan
1c2d3fe4e2 skipping bugs since this was disabled up to now but got enabled due to upgrade of dependencies 2023-11-23 21:46:40 +02:00
Timo Bejan
e73b6bd69b Migration local testing 2023-11-23 21:38:11 +02:00
Timo Bejan
5d6ed6bba8 cleanup 2023-11-23 21:38:11 +02:00
Timo Bejan
288bbf9f17 Integrate sync service 2023-11-23 21:38:11 +02:00
Timo Bejan
83c02409e9 Integration of sync service 2023-11-23 21:38:11 +02:00
Dominique Eifländer
8c090d14ba Merge branch 'RED-7962' into 'master'
RED-7962 Added rule upload and download

Closes RED-7962

See merge request redactmanager/persistence-service!225
2023-11-23 16:01:15 +01:00
Kresnadi Budisantoso
e5636452a1 RED-7962 Added rule upload and download specification to openapi.yaml
Other changes:
* minor renamings
* fixed query parameter name to camelCase
* changed response code for invalid rules to 422 (unprocessable entity)
* changed filename of rules to lower case
2023-11-23 15:33:17 +01:00
Dominique Eifländer
19605b4185 RED-7962: Implemented public rules endpoints 2023-11-23 13:37:33 +01:00
Andrei Isvoran
2344af108c Merge branch 'RED-7784-fixes' into 'master'
RED-7784 - Fixes for unprocessed redactions

Closes RED-7784

See merge request redactmanager/persistence-service!221
2023-11-21 13:25:23 +01:00
Andrei Isvoran
eae93223fa RED-7784 - Fixes for unprocessed redactions 2023-11-21 13:25:23 +01:00
Christoph Schabert
0a08c57f44 Merge branch 'RED-7934' into 'master'
RED-7934: Fixed pmd violation

Closes RED-7934

See merge request redactmanager/persistence-service!218
2023-11-16 15:35:09 +01:00
Dominique Eifländer
8379af0a79 RED-7934: Fixed pmd violation 2023-11-16 15:29:03 +01:00
Dominique Eifländer
8ff9fe41e1 Merge branch 'RED-7934' into 'master'
RED-7934: Do not delete manual redactions at remove redaction

Closes RED-7934

See merge request redactmanager/persistence-service!217
2023-11-16 14:51:42 +01:00
Dominique Eifländer
ff8c6d2463 RED-7934: Do not delete manual redactions at remove redaction 2023-11-16 14:45:30 +01:00
Corina Olariu
a254250ac5 Merge branch 'RED-7918' into 'master'
RED-7918 - RM-62: "Last Modified" date not updated after change

Closes RED-7918

See merge request redactmanager/persistence-service!215
2023-11-16 14:18:22 +01:00
Corina Olariu
c455bdf5ce Merge branch 'master' into RED-7918 2023-11-16 15:08:29 +02:00
Dominique Eifländer
c78722c0ee Merge branch 'RED-7934' into 'master'
RED-7934: Do not delete manual redactions at remove redaction if not updateDictionary

Closes RED-7934

See merge request redactmanager/persistence-service!216
2023-11-16 14:04:17 +01:00
Dominique Eifländer
59d45a309b RED-7934: Do not delete manual redactions at remove redaction if not updateDictionary 2023-11-16 13:46:18 +01:00
Andrei Isvoran
641dfcb0dd Merge branch 'RED-7784-default-boolean-flag' into 'master'
RED-7784 - Include unprocessed redactions in reports by default

Closes RED-7784

See merge request redactmanager/persistence-service!214
2023-11-16 09:04:14 +01:00
Andrei Isvoran
d8c746b48d RED-7784 - Include unprocessed redactions in reports by default 2023-11-16 09:04:14 +01:00
Corina Olariu
a8e0f4b67c RED-7918 - RM-62: "Last Modified" date not updated after change
- update tests
2023-11-16 09:53:03 +02:00
Corina Olariu
ba19477c25 RED-7918 - RM-62: "Last Modified" date not updated after change
- in calculate flags get the entity log with the unprocessed changes
2023-11-16 09:32:24 +02:00
Andrei Isvoran
477113b6ae Merge branch 'RED-7784-flag-default' into 'master'
RED-7784 - Include unprocessed redactions in reports by default

Closes RED-7784

See merge request redactmanager/persistence-service!213
2023-11-14 14:40:48 +01:00
Andrei Isvoran
5d977d191a RED-7784 - Include unprocessed redactions in reports by default 2023-11-14 15:18:16 +02:00
Ali Oezyetimoglu
175bc4e4cc Merge branch 'RED-7883' into 'master'
Resolve RED-7883

Closes RED-7883

See merge request redactmanager/persistence-service!211
2023-11-14 12:19:32 +01:00
Ali Oezyetimoglu
67afcfa6b0 RED-7883: updated zips of dossier templates to have the right encoded type dictionary lists 2023-11-14 12:12:39 +01:00
Ali Oezyetimoglu
8845c406b2 RED-7883: updated methods to import and export with UTF-8 instead of modified UTF-8 2023-11-14 11:26:34 +01:00
Ali Oezyetimoglu
f0a4772c33 RED-7883: changed encoding of type dictionaries from modified UTF-8 to UTF-8 2023-11-14 10:44:21 +01:00
Ali Oezyetimoglu
d11a1178b3 RED-7883: changed encoding from modified UTF-8 to UTF-8 for dossier template import and export 2023-11-13 16:51:14 +01:00
Corina Olariu
8ad1938b1c Merge branch 'RED-7876' into 'master'
RED-7876 - Diagrams for future license are empty

Closes RED-7876

See merge request redactmanager/persistence-service!209
2023-11-13 09:45:59 +01:00
Corina Olariu
0d475e2839 RED-7876 - Diagrams for future license are empty
- remove the check for start date in the future
- remove the setting to set current date for end date in case date is in the future
2023-11-13 09:50:03 +02:00
Kilian Schüttler
819b2384b2 Merge branch 'DM-557' into 'master'
DM-557: fix component sorting

Closes DM-557

See merge request redactmanager/persistence-service!208
2023-11-10 12:37:10 +01:00
Kilian Schuettler
05981913b3 DM-557: fix component sorting 2023-11-10 12:15:07 +01:00
Dominique Eifländer
5b0c35b04f Merge branch 'DM-576' into 'master'
DM-576: Fixed connections idle in transaction

Closes DM-576

See merge request redactmanager/persistence-service!207
2023-11-10 09:32:54 +01:00
Dominique Eifländer
6adfdb2991 DM-576: Fixed connections idle in transaction 2023-11-09 16:16:04 +01:00
Andrei Isvoran
c5dc459ad6 Merge branch 'RED-7784' into 'master'
RED-7784 - Report with unprocessed redactions

Closes RED-7784

See merge request redactmanager/persistence-service!205
2023-11-08 09:42:23 +01:00
Andrei Isvoran
61cc1297fd RED-7784 - Report with unprocessed redactions 2023-11-08 09:42:23 +01:00
Andrei Isvoran
377cc98542 Merge branch 'RED-7784' into 'master'
RED-7784 - Report with unprocessed redactions

Closes RED-7784

See merge request redactmanager/persistence-service!204
2023-11-07 12:44:57 +01:00
Andrei Isvoran
e81e1eb000 RED-7784 - Report with unprocessed redactions 2023-11-07 12:44:57 +01:00
Andrei Isvoran
84fa3acc0a Merge branch 'RED-7784' into 'master'
RED-7784 - Report with unprocessed redactions

Closes RED-7784

See merge request redactmanager/persistence-service!203
2023-11-07 11:50:33 +01:00
Andrei Isvoran
93bbdd768d RED-7784 - Report with unprocessed redactions 2023-11-07 11:50:32 +01:00
Kilian Schüttler
15995a1518 Merge branch 'sorting_hotfix' into 'master'
hotfix: fix component sorting

See merge request redactmanager/persistence-service!212
2023-11-06 17:48:13 +01:00
Kilian Schuettler
c1418d30dc hotfix: fix component sorting 2023-11-06 15:36:32 +01:00
Dominique Eifländer
cb0db9e6f5 Merge branch 'RED-7382' into 'master'
RED-7382: Implemented Saas migration

Closes RED-7382

See merge request redactmanager/persistence-service!211
2023-11-06 14:37:19 +01:00
Dominique Eifländer
75aa8aa467 RED-7382: Implemented Saas migration 2023-11-06 13:06:49 +01:00
Andrei Isvoran
3c374baf94 Merge branch 'RED-7784' into 'master'
RED-7784 - Add state for unprocessed redactions

Closes RED-7784

See merge request redactmanager/persistence-service!210
2023-11-02 09:34:17 +01:00
Andrei Isvoran
0f3cc14409 RED-7784 - Add state for unprocessed redactions 2023-11-02 09:34:17 +01:00
Dominique Eifländer
284d0bff50 Merge branch 'RED-7517' into 'master'
Resolve RED-7517

Closes RED-7517

See merge request redactmanager/persistence-service!203
2023-11-02 08:56:13 +01:00
Andrei Isvoran
79287d435d Merge branch 'RED-7677' into 'master'
RED-7677 - dossier-template endpoint should return a 400 if validFrom > validTo

Closes RED-7677

See merge request redactmanager/persistence-service!206
2023-11-01 10:16:14 +01:00
Andrei Isvoran
e1007dc5c4 RED-7677 - dossier-template endpoint should return a 400 if validFrom > validTo 2023-11-01 10:16:14 +01:00
Corina Olariu
0a8347d326 Merge branch 'RED-7854' into 'master'
RED-7854 - UI stuck when selecting a future license

Closes RED-7854

See merge request redactmanager/persistence-service!205
2023-11-01 09:40:59 +01:00
Corina Olariu
9b5b8195dc RED-7854 - UI stuck when selecting a future license
- no need to specify 0 for int values, will be initialized with 0 by default
2023-11-01 10:21:36 +02:00
Corina Olariu
f60ef37a08 Merge branch 'RED-7854' into 'master'
RED-7854 - UI stuck when selecting a future license

Closes RED-7854

See merge request redactmanager/persistence-service!204
2023-10-31 15:42:50 +01:00
Dominique Eifländer
b966ac516b RED-7517: Save dossier and acls in same transaction 2023-10-31 15:03:38 +01:00
Dominique Eifländer
517763786b Merge branch 'RED-7821' into 'master'
RED-7821: Added migration to fix wrong dossier dictionary entries in redaction logs

Closes RED-7821

See merge request redactmanager/persistence-service!197
2023-10-31 15:03:26 +01:00
Corina Olariu
5c28072103 RED-7854 - UI stuck when selecting a future license
- return 0 values in all invalid cases
2023-10-31 15:58:12 +02:00
Corina Olariu
afa75b850c RED-7854 - UI stuck when selecting a future license
- in case start date is in the future send 0 values for license report
2023-10-31 15:39:06 +02:00
Corina Olariu
fcaf76eb48 Merge branch 'RED-7848' into 'master'
RED-7848 - Sorting in merged dictionary differs from template dictionary in terms of capitalization

Closes RED-7848

See merge request redactmanager/persistence-service!202
2023-10-31 08:36:04 +01:00
Corina Olariu
c2d558636c RED-7848 - Sorting in merged dictionary differs from template dictionary in terms of capitalization
- fic cheskstyle error
2023-10-30 15:19:28 +02:00
Corina Olariu
efe6dd5930 RED-7848 - Sorting in merged dictionary differs from template dictionary in terms of capitalization
- correct junit assertions
2023-10-30 14:58:48 +02:00
Corina Olariu
13e47c6453 RED-7848 - Sorting in merged dictionary differs from template dictionary in terms of capitalization
- update the sorting of entries with a custom comparator
- update junit tests
2023-10-30 14:51:23 +02:00
Corina Olariu
8a50f6c0a2 RED-7848 - Sorting in merged dictionary differs from template dictionary in terms of capitalization
- update the sorting to natural order
- update junit tests
2023-10-30 11:20:02 +02:00
Kilian Schüttler
f250c6b961 Merge branch 'RED-7384' into 'master'
RED-7384: create shared models in persistence service

Closes RED-7384

See merge request redactmanager/persistence-service!201
2023-10-27 12:19:44 +02:00
Kilian Schuettler
a279a76659 RED-7384: create shared models in persistence service 2023-10-27 12:13:47 +02:00
Kilian Schuettler
d91bbc6d0e RED-7384: create shared models in persistence service 2023-10-27 12:09:48 +02:00
Andrei Isvoran
407e1be1a4 Merge branch 'RED-7784-unprocessed-redactions' into 'master'
RED-7782 - Merge unprocessed redactions into entity log without re-analysis.

Closes RED-7784

See merge request redactmanager/persistence-service!200
2023-10-27 12:03:10 +02:00
Kilian Schuettler
18d98ab4e6 RED-7384: create shared models in persistence service 2023-10-27 11:55:38 +02:00
Andrei Isvoran
3bdfd4c96b RED-7782 - Add property changes 2023-10-27 12:16:04 +03:00
Andrei Isvoran
7a0de45add RED-7782 - Address PR comments 2023-10-27 12:14:22 +03:00
Andrei Isvoran
da43634b19 RED-7782 - Address PR comments 2023-10-27 12:09:20 +03:00
Andrei Isvoran
729881fcd4 RED-7782 - Fix tests 2023-10-26 17:07:42 +03:00
Andrei Isvoran
75847a43d5 RED-7782 - Merge unprocessed redactions into entity log without re-analysis. 2023-10-26 15:37:33 +03:00
Kilian Schüttler
087935dddd Merge branch 'RED-7631' into 'master'
RED-7631: add EntryType IMAGE_HINT

Closes RED-7631

See merge request redactmanager/persistence-service!199
2023-10-26 12:09:26 +02:00
Kilian Schuettler
9ebf22f52f RED-7631: add EntryType IMAGE_HINT
* also fix BaseAnnotation builder
2023-10-26 12:02:29 +02:00
Kilian Schuettler
66f740b44a RED-7631: add EntryType IMAGE_HINT
* also fix ManualResizeRedaction builder
2023-10-26 11:58:11 +02:00
Dominique Eifländer
2c385d9a92 Merge branch 'RED-7838' into 'master'
RED-7838: merge numberOfComments into EntityLog

Closes RED-7838

See merge request redactmanager/persistence-service!198
2023-10-26 09:09:23 +02:00
Kilian Schuettler
c12abd0280 RED-7838: merge numberOfComments into EntityLog
* also change comment endpoint to return comments per annotation instead of file
2023-10-25 17:12:11 +02:00
Dominique Eifländer
15b24ac879 RED-7821: Added migration to fix wrong dossier dictionary entries in redaction logs 2023-10-25 13:36:40 +02:00
Corina Olariu
947bd41e1b Merge branch 'RED-7812' into 'master'
RED-7812 - Dossier template will be renamed every time after each import

Closes RED-7812

See merge request redactmanager/persistence-service!195
2023-10-25 10:31:11 +02:00
Corina Olariu
8eac48206b RED-7812 - Dossier template will be renamed every time after each import
- remove unnecessary logs
2023-10-24 15:24:08 +03:00
Corina Olariu
5a3432e6c6 RED-7812 - Dossier template will be renamed every time after each import
- put back the checking by name for the other cases (when cloning, creating, updating a dossier template)
2023-10-24 15:15:27 +03:00
Corina Olariu
6d245ae7b6 RED-7812 - Dossier template will be renamed every time after each import
- when checking for the existence of the dossier template name ignore the dossier template id of the one that will be replaced
2023-10-24 13:32:07 +03:00
Andrei Isvoran
bffae1292e Merge branch 'RED-7782-comments' into 'master'
RED-7782 - Remove comments

Closes RED-7782

See merge request redactmanager/persistence-service!194
2023-10-24 11:22:44 +02:00
Andrei Isvoran
48d432024a RED-7782 - Remove comments 2023-10-24 11:22:44 +02:00
Corina Olariu
59f3e99fea Merge branch 'RED-7434' into 'master'
RED-7434 - Remove Section Grid entirely

Closes RED-7434

See merge request redactmanager/persistence-service!192
2023-10-23 14:28:54 +02:00
Kilian Schüttler
9f0d262f1b Merge branch 'DM-285' into 'master'
DM-285: flush add redaction removal

Closes DM-285

See merge request redactmanager/persistence-service!193
2023-10-23 14:17:13 +02:00
Kilian Schuettler
c831eb7025 DM-285: resolve circular dependecies 2023-10-23 14:10:46 +02:00
Kilian Schuettler
58e66f920c DM-285: change fields of comments 2023-10-23 13:54:26 +02:00
Kilian Schuettler
c65a93bf1b DM-285: flush add redaction removal
* only remove add redactions
2023-10-23 13:35:36 +02:00
Andrei Isvoran
50c731d6f4 Merge branch 'RED-7784' into 'master'
RED-7784 - Merge unprocessed changes into entity log

Closes RED-7784

See merge request redactmanager/persistence-service!191
2023-10-23 11:10:59 +02:00
Andrei Isvoran
a470fc0a2a RED-7784 - Merge unprocessed changes into entity log 2023-10-23 11:10:59 +02:00
Corina Olariu
9aee9627d8 RED-7434 - Remove Section Grid entirely
- update the layout parser version to remove the section grid from layou parser request
2023-10-23 11:20:12 +03:00
Yannik Hampe
39d800dd2a Merge branch 'RED-7654' into 'master'
RED-7654: Import and export of rules in non-escaped form

Closes RED-7654

See merge request redactmanager/persistence-service!190
2023-10-23 10:06:48 +02:00
yhampe
70bb450870 RED-7654: Import and export of rules in non-escaped form
* added back deleted code

* added id to ignoreproperties
2023-10-23 09:59:41 +02:00
yhampe
6221a7c5d7 RED-7654: Import and export of rules in non-escaped form
* removed debug logging
2023-10-23 08:22:42 +02:00
yhampe
9a5b192144 RED-7654: Import and export of rules in non-escaped form
* removed debug logging
2023-10-23 08:20:37 +02:00
yhampe
c0d2d1f9d0 Merge remote-tracking branch 'origin/RED-7654' into RED-7654 2023-10-23 08:19:22 +02:00
yhampe
b872effffd RED-7654: Import and export of rules in non-escaped form
* removed method call, as we do not care about the names when updating an existing template
2023-10-23 08:19:07 +02:00
yhampe
541da5d3d3 RED-7654: Import and export of rules in non-escaped form
* removed method call, as we do not care about the names when updating an existing template
2023-10-23 08:17:56 +02:00
Kilian Schüttler
46083bbbf7 Merge branch 'RED-7782' into 'master'
RED-7782 - Endpoint for unprocessed changes

Closes RED-7782

See merge request redactmanager/persistence-service!189
2023-10-20 15:56:46 +02:00
Andrei Isvoran
ac7b05049d RED-7782 - Endpoint for unprocessed changes 2023-10-20 15:56:46 +02:00
Dominique Eifländer
66a188d25a Merge branch 'RED-7760' into 'master'
RED-7760: Fixed accidently renamed id that leads to not working liquibase migration

Closes RED-7760

See merge request redactmanager/persistence-service!188
2023-10-19 14:24:07 +02:00
Dominique Eifländer
7df20ee8bb RED-7760: Fixed accidently renamed id that leads to not working liquibase migration 2023-10-19 14:16:34 +02:00
Corina Olariu
840a216265 Merge branch 'RED-7763' into 'master'
RED-7763 - Use EntityLog in tests in persistence-service

Closes RED-7763

See merge request redactmanager/persistence-service!186
2023-10-19 08:53:11 +02:00
Dominique Eifländer
f4950020a7 Merge branch 'RED-7775' into 'master'
RED-7775: Fixed too many connection to database by scheduler, name connections in pg_stat_activity

Closes RED-7775

See merge request redactmanager/persistence-service!187
2023-10-18 15:11:46 +02:00
Dominique Eifländer
b0db743019 RED-7775: Fixed too many connection to database by scheduler, name connections in pg_stat_activity 2023-10-18 15:00:38 +02:00
Corina Olariu
12cdc83ee3 RED-7763 - Use EntityLog in tests in persistence-service
- remove unneeded migrations
2023-10-17 14:52:10 +03:00
Corina Olariu
8d0cafd0c8 RED-7763 - Use EntityLog in tests in persistence-service
- updates junit tests
2023-10-17 14:14:23 +03:00
Corina Olariu
3611c9e33f RED-7763 - Use EntityLog in tests in persistence-service
- replaced redaction log with entity log
- updates junit tests
2023-10-17 13:22:38 +03:00
Dominique Eifländer
374998449a Merge branch 'RED-7768' into 'master'
RED-7768: Fixed double counting of deleted documents in license

Closes RED-7768

See merge request redactmanager/persistence-service!184
2023-10-17 09:32:13 +02:00
Andrei Isvoran
5fb3e6b103 Merge branch 'RED-7745-controller' into 'master'
RED-7745 - Refactor to EntityLog

See merge request redactmanager/persistence-service!183
2023-10-17 09:22:21 +02:00
Andrei Isvoran
0d150c3aa6 RED-7745 - Refactor to EntityLog 2023-10-17 09:22:21 +02:00
Dominique Eifländer
f317ff9f90 RED-7768: Fixed double counting of deleted documents in license 2023-10-17 09:21:42 +02:00
Dominique Eifländer
cd6166315c Merge branch 'RED-7767' into 'master'
RED-7767: Added migration for missing filesizes

Closes RED-7767

See merge request redactmanager/persistence-service!180
2023-10-16 13:31:45 +02:00
Dominique Eifländer
647b91193a RED-7767: Added migration for missing filesizes 2023-10-16 12:57:39 +02:00
Dominique Eifländer
1b20061c72 Merge branch 'RED-7682' into 'master'
RED-7682: Fixed Joining of parallel processed redaction of files when service...

Closes RED-7682

See merge request redactmanager/persistence-service!177
2023-10-16 10:42:33 +02:00
Dominique Eifländer
6f87c0bcec RED-7682: Fixed Joining of parallel processed redaction of files when service is scaled to more than 1 2023-10-16 10:34:15 +02:00
Andrei Isvoran
656183d33c Merge branch 'RED-7745' into 'master'
RED-7745 - Add EntityLog Feign Client

Closes RED-7745

See merge request redactmanager/persistence-service!178
2023-10-16 09:41:15 +02:00
Andrei Isvoran
80af534ce6 RED-7745 - Add EntityLog Feign Client 2023-10-16 09:41:15 +02:00
Kilian Schüttler
b8b9395654 Merge branch 'DM-285' into 'master'
DM-285: add filename to component result

Closes DM-285

See merge request redactmanager/persistence-service!176
2023-10-13 11:25:32 +02:00
Kilian Schuettler
4ae0a7e646 DM-285: add fileName to component endpoint 2023-10-13 11:01:10 +02:00
Kilian Schuettler
0b44b5abe7 DM-285: add fileName to component endpoint 2023-10-13 10:43:50 +02:00
Kilian Schüttler
07c5530631 Merge branch 'DM-504' into 'master'
DM-504: adjust error messages

Closes DM-504

See merge request redactmanager/persistence-service!175
2023-10-11 10:57:22 +02:00
Kilian Schuettler
77c6348e35 DM-504: adjust error messages
* also check for hard deleted date in dossier
2023-10-11 10:49:28 +02:00
Yannik Hampe
c9ce96ee67 Merge branch 'RED-7631' into 'master'
RED-7631: unescaped rule files

Closes RED-7631

See merge request redactmanager/persistence-service!174
2023-10-11 10:48:29 +02:00
Kilian Schuettler
56b4746a3e RED-7631: unescaped rule files 2023-10-11 10:41:50 +02:00
Kilian Schuettler
cd2d97616d RED-7631: unescaped rule files 2023-10-11 10:01:43 +02:00
Kilian Schüttler
c4485ad26b Merge branch 'RED-5945' into 'master'
RED-5945: 500 when importing faulty archive

Closes RED-5945

See merge request redactmanager/persistence-service!169
2023-10-10 16:02:55 +02:00
yhampe
209373d3fa RED-5945: 500 when importing faulty archive
* now throwing a BadRequestException when archive is faulty
2023-10-10 14:07:22 +02:00
Kilian Schüttler
c0ac625bbc Merge branch 'DM-504' into 'master'
DM-504: always exclude hard deleted files

Closes DM-504

See merge request redactmanager/persistence-service!171
2023-10-10 12:32:21 +02:00
Kilian Schuettler
99bb0228c4 DM-504: always exclude hard deleted files
* fix pmd
2023-10-10 12:16:30 +02:00
Kilian Schüttler
1aa17ea79e Merge branch 'DM-285' into 'master'
DM-285: add description to Component Endpoint

Closes DM-285

See merge request redactmanager/persistence-service!162
2023-10-10 12:09:18 +02:00
Kilian Schüttler
95ffc7c4af Merge branch 'DM-504' into 'master'
DM-504: always exclude hard deleted files

Closes DM-504

See merge request redactmanager/persistence-service!170
2023-10-10 11:32:14 +02:00
Kilian Schuettler
5a17678d34 DM-504: always exclude hard deleted files
* adjusted error message
* also removed annotationStatus since it is always APPROVED anyway
* removed inactive options from FilteredEntityLogRequest
* validated fileId and dossierId when getting comments
2023-10-10 11:25:43 +02:00
Kilian Schuettler
f7285fb821 DM-504: always exclude hard deleted files
* adjusted error message
* also removed annotationStatus since it is always APPROVED anyway
* removed inactive options from FilteredEntityLogRequest
* validated fileId and dossierId when getting comments
2023-10-10 10:51:40 +02:00
Kilian Schuettler
781b761aad DM-504: always exclude hard deleted files
* adjusted error message
* also removed annotationStatus since it is always APPROVED anyway
* removed inactive options from FilteredEntityLogRequest
2023-10-10 10:27:10 +02:00
yhampe
bc8ca76858 RED-5945: 500 when importing faulty archive
* now throwing a BadRequestException when archive is faulty
2023-10-10 09:51:48 +02:00
Dominique Eifländer
6ec370ad01 Merge branch 'RED-7715' into 'master'
RED-7715: Fixed messed up logging

Closes RED-7715

See merge request redactmanager/persistence-service!168
2023-10-09 15:15:07 +02:00
Dominique Eifländer
50005ad83a RED-7715: Fixed messed up logging 2023-10-09 15:03:09 +02:00
Yannik Hampe
f048efd42c Merge branch 'RED-7653' into 'master'
RED-7653: removed unnecessary test file, updated database-tenants-commons...

Closes RED-7653

See merge request redactmanager/persistence-service!167
2023-10-09 14:48:15 +02:00
yhampe
e9833ae71a RED-7653: removed unnecessary test file, updated database-tenants-commons version, fixed publish-custom-docker image script for windows 2023-10-09 14:26:57 +02:00
Corina Olariu
c79c653382 Merge branch 'RED-7185-clone' into 'master'
RED-7185 - RM-46 - Error message when adjusting the Justification

Closes RED-7185

See merge request redactmanager/persistence-service!165
2023-10-09 12:15:28 +02:00
Corina Olariu
97ab8a0783 RED-7185 - RM-46 - Error message when adjusting the Justification
- check for null for dossier template's name
- update junit test
2023-10-09 12:01:25 +03:00
Kilian Schüttler
15ffcf683f Merge branch 'windows-hotfix' into 'master'
hotfix: update database-tenant-commons

See merge request redactmanager/persistence-service!164
2023-10-09 10:59:49 +02:00
Kilian Schuettler
0e74e88f21 hotfix: update database-tenant-commons 2023-10-09 10:44:02 +02:00
Corina Olariu
a0c62274ef RED-7185 - RM-46 - Error message when adjusting the Justification
- adding the validation of dossier template's name and description when requesting a clone dossier template
2023-10-09 10:57:09 +03:00
yhampe
1a92b3db26 RED-7653: added cases for importing escaped and unescaped rule files 2023-10-09 09:28:13 +02:00
Kilian Schüttler
8778031869 Merge branch 'DM-504' into 'master'
DM-504: always exclude hard deleted files

Closes DM-504

See merge request redactmanager/persistence-service!163
2023-10-06 16:25:54 +02:00
Kilian Schuettler
dd5bcfd4f9 DM-504: always exclude hard deleted files 2023-10-06 15:19:00 +02:00
Kilian Schuettler
f706619140 DM-504: always exclude hard deleted files 2023-10-06 15:11:09 +02:00
Yannik Hampe
670b60041c Merge branch 'windows-hotfix' into 'master'
fixed errors on windows because of not closed input stream

See merge request redactmanager/persistence-service!161
2023-10-06 12:04:52 +02:00
yhampe
24af307fb7 added dependency to server pom 2023-10-06 11:56:50 +02:00
Kilian Schuettler
1f9a0e6326 DM-285: add description to Component Endpoint
* also remove field value from EntityReference
2023-10-06 11:46:10 +02:00
yhampe
02d87d7c14 fixed errors on windows because of not closed input stream
removed FileSystemBackedStorageService.java and started using import from storage-commons
2023-10-06 11:44:02 +02:00
Dominique Eifländer
f6b3df9c8f Merge branch 'RED-7715' into 'master'
RED-7715: Changed logging output to json

Closes RED-7715

See merge request redactmanager/persistence-service!160
2023-10-05 16:33:33 +02:00
Dominique Eifländer
7d3da44a97 RED-7715: Changed logging output to json 2023-10-05 16:26:30 +02:00
Kilian Schüttler
75b5db712a Merge branch 'DM-285' into 'master'
DM-285: added componentLog sorting in ComponentLogService

Closes DM-285

See merge request redactmanager/persistence-service!158
2023-10-05 14:37:01 +02:00
Kilian Schuettler
fc198aa34f DM-285: added componentLog sorting in ComponentLogService 2023-10-05 14:25:40 +02:00
Andrei Isvoran
3a1908b8ff Merge branch 'RED-7694' into 'master'
RED-7694 - Throw BadRequest if startDate is null or in the future for license report

Closes RED-7694

See merge request redactmanager/persistence-service!156
2023-10-05 11:37:49 +02:00
Andrei Isvoran
79bc6d2b39 RED-7694 - Throw BadRequest if startDate is null or in the future for license report 2023-10-05 12:28:56 +03:00
Kilian Schüttler
d694a7fec1 Merge branch 'DM-285' into 'master'
DM-285: add internal component controller

Closes DM-285

See merge request redactmanager/persistence-service!155
2023-10-04 16:25:11 +02:00
Kilian Schuettler
8fa082f7a0 DM-285: add internal component controller 2023-10-04 16:18:41 +02:00
Andrei Isvoran
ea24d26fb8 Merge branch 'RED-7687' into 'master'
RED-7694 - Check if startDate is before endDate for license before overwriting...

Closes RED-7694

See merge request redactmanager/persistence-service!152
2023-10-03 09:50:13 +02:00
Andrei Isvoran
ad20a1f9f5 RED-7687 - Check if startDate is before endDate for license before overwriting the endDate if it's in the future. 2023-10-02 16:18:52 +03:00
Corina Olariu
b706a71ec1 Merge branch 'RED-7185-adjustLimit' into 'master'
RED-7185 - RM-46 - Error message when adjusting the Justification

Closes RED-7185

See merge request redactmanager/persistence-service!150
2023-10-02 11:44:29 +02:00
Andrei Isvoran
97d2af3eb5 Merge branch 'RED-7676' into 'master'
RED-7676 - Copy ocrByDefault and removeWatermark flags when cloning dossier template

Closes RED-7676

See merge request redactmanager/persistence-service!151
2023-10-02 11:39:14 +02:00
Andrei Isvoran
d3f3817ea1 RED-7676 - Copy ocrByDefault and removeWatermark flags when cloning dossier template 2023-10-02 12:32:39 +03:00
Kresnadi Budisantoso
99fae8cd52 Merge branch 'DM-504' into 'master'
DM-504: re-add includeSoftDeleted flag

See merge request redactmanager/persistence-service!149
2023-09-29 22:14:50 +02:00
Kilian Schuettler
941990787c DM-504: re-add includeSoftDeleted flag
* minor renames of ComponentLog fields
2023-09-29 17:56:54 +02:00
Kresnadi Budisantoso
b6eb08d722 Merge branch 'DM-285' into 'master'
Resolve DM-285

Closes DM-285

See merge request redactmanager/persistence-service!148
2023-09-29 17:30:41 +02:00
Kilian Schuettler
fb63bf65b0 DM-285: fix order of Components 2023-09-29 17:22:03 +02:00
Kilian Schuettler
0c91fff875 DM-285: fix order of Components 2023-09-29 12:47:58 +02:00
Corina Olariu
7f7ca627d6 RED-7185 - RM-46 - Error message when adjusting the Justification
- permit only comments with length <= 4000 characters
2023-09-29 13:23:52 +03:00
Timo Bejan
65d62a09a1 Merge branch 'dossier-template-swagger-import-fix' into 'master'
Fixed binary file upload for swagger

See merge request redactmanager/persistence-service!147
2023-09-28 13:06:47 +02:00
Timo Bejan
3e43fe0382 Fixed binary file upload for swagger 2023-09-28 13:09:14 +03:00
Kilian Schüttler
cfe5446255 Merge branch 'DM-502' into 'master'
DM-502, DM-503, DM-504

Closes DM-502

See merge request redactmanager/persistence-service!146
2023-09-27 11:27:28 +02:00
Kilian Schuettler
f9f5dfd1c9 DM-504: Remove unnecessary flag for requesting specific file or dossier 2023-09-27 11:18:36 +02:00
Kilian Schuettler
d49300659b DM-503: Wrong query parameter for "keepManualChanges" 2023-09-27 11:11:49 +02:00
Kilian Schuettler
f8231a6499 DM-502: Dossier Endpoint returns all dossiers regardless of the set dossierTemplateId 2023-09-27 11:08:29 +02:00
Corina Olariu
bfa88fd082 Merge branch 'RED-7185-checkComment' into 'master'
RED-7185 - RM-46 - Error message when adjusting the Justification

Closes RED-7185

See merge request redactmanager/persistence-service!145
2023-09-27 08:15:26 +02:00
Kilian Schüttler
5fe11f9da9 Merge branch 'RED-7416-apidoc' into 'master'
Put back the parameters in the main spec file but moved them to the components...

Closes RED-7416

See merge request redactmanager/persistence-service!144
2023-09-26 18:11:03 +02:00
Kilian Schuettler
c1ea8bbb4f RED-7416: only write value if not equal to originalValue 2023-09-26 18:04:20 +02:00
Kilian Schüttler
6f8e319abf Merge branch 'RED-7416-apidoc' into 'master'
OpenAPI Specification for DocuMine

Closes RED-7416

See merge request redactmanager/persistence-service!142
2023-09-26 17:52:16 +02:00
Kresnadi Budisantoso
87e27050dd OpenAPI Specification for DocuMine 2023-09-26 17:52:16 +02:00
Kilian Schüttler
ddc3af3a41 Merge branch 'DM-285' into 'master'
DM-285: ensure request bodies are not empty

Closes DM-285

See merge request redactmanager/persistence-service!143
2023-09-26 17:41:26 +02:00
Kilian Schuettler
fbae5ff3a0 DM-285: ensure request bodies are not empty 2023-09-26 14:47:26 +02:00
Corina Olariu
91ffe50781 RED-7185 - RM-46 - Error message when adjusting the Justification
- add checkComment in addComment when making changes to a redaction
2023-09-26 15:01:39 +03:00
Kresnadi Budisantoso
353e0a91e7 Merge branch 'DM-285' into 'master'
Resolve DM-285

Closes DM-285

See merge request redactmanager/persistence-service!141
2023-09-25 17:27:01 +02:00
Kilian Schuettler
e94d3c6146 DM-285: polish component log and component endpoints 2023-09-25 17:10:02 +02:00
Kilian Schuettler
919825774d DM-285: add containing Node to EntityLogEntry 2023-09-25 16:39:12 +02:00
Corina Olariu
6cdd2178f1 Merge branch 'RED-7185' into 'master'
RED-7185 - Fix comment too long

Closes RED-7185

See merge request redactmanager/persistence-service!138
2023-09-25 10:27:15 +02:00
Kilian Schüttler
93d40366c7 Merge branch 'DM-285' into 'master'
DM-285: Change component log

Closes DM-285

See merge request redactmanager/persistence-service!137
2023-09-25 09:57:50 +02:00
Christoph Schabert
a2bd4564b4 Merge branch 'staging-fix' into 'master'
Fixed wrong execution of liquibase on staging envs

See merge request redactmanager/persistence-service!140
2023-09-25 08:03:31 +02:00
Timo Bejan
4a63c48ad9 Fixed wrong execution of liquibase on staging envs 2023-09-22 17:32:33 +03:00
Andrei Isvoran
f006af37e4 RED-7185 - Fix comment too long 2023-09-22 17:10:10 +03:00
Kilian Schuettler
3f64fa6c40 DM-285: Change component log
* split AnalysisLogController into EntityLogController and ComponentLogController
* fully deprecate RSSController
2023-09-22 15:19:57 +02:00
Kilian Schuettler
54ce629a1c DM-285: Change component log
* apply overrides in ComponentLogService
* added a test for manual type change
* include overrides in getComponentLog
* split AnalysisLogController into EntityLogController and ComponentLogController
* fully deprecate RSSController
2023-09-22 15:10:18 +02:00
Kilian Schüttler
277f0538be Merge branch 'DM-285' into 'master'
DM-285: Change component log

Closes DM-285

See merge request redactmanager/persistence-service!135
2023-09-22 14:22:42 +02:00
Kilian Schuettler
3c9d247432 DM-285: Change component log
* apply overrides in ComponentLogService
* added a test for manual type change
* include overrides in getComponentLog
2023-09-22 14:16:03 +02:00
Kilian Schüttler
45b879982b Merge branch 'DM-285' into 'master'
DM-285: Change component log

Closes DM-285

See merge request redactmanager/persistence-service!134
2023-09-22 10:57:59 +02:00
Kilian Schuettler
e651c8225f DM-285: Change component log 2023-09-22 10:32:09 +02:00
Kilian Schüttler
10315356f5 Merge branch 'RED-6825' into 'master'
RED-6835: clean incoming strings

Closes RED-6825

See merge request redactmanager/persistence-service!132
2023-09-21 15:24:01 +02:00
Kilian Schuettler
55153d0a09 RED-6835: clean incoming strings 2023-09-21 14:55:21 +02:00
Andrei Isvoran
0b7a925757 Merge branch 'DM-498' into 'master'
DM-498 - Fix 500 internal server error when overrides do not exist

Closes DM-498

See merge request redactmanager/persistence-service!131
2023-09-21 14:10:45 +02:00
Andrei Isvoran
51da8f5d58 DM-498 - Fix 500 internal server error when overrides do not exist 2023-09-21 14:10:45 +02:00
Andrei Isvoran
0a5c531c72 Merge branch 'RED-7185-fix' into 'master'
RED-7185 - Error message when adjusting the Justification

Closes RED-7185

See merge request redactmanager/persistence-service!130
2023-09-20 12:02:16 +02:00
Andrei Isvoran
b5c832c8a3 RED-7185 - Error message when adjusting the Justification 2023-09-20 12:31:39 +03:00
Christoph Schabert
707631f2c7 Merge branch 'DM-285' into 'master'
DM-285: validate rules on dossier template import

Closes DM-285

See merge request redactmanager/persistence-service!128
2023-09-19 08:22:07 +02:00
Kilian Schuettler
1b0323839e DM-285: validate rules on dossier template import 2023-09-18 16:16:14 +02:00
Andrei Isvoran
5beaa3ab2b Merge branch 'RED-5205-fix' into 'master'
RED-5205 - fix getmapping path for download

Closes RED-5205

See merge request redactmanager/persistence-service!127
2023-09-15 11:01:36 +02:00
Dominique Eifländer
f4b2ec88d6 Merge branch 'RED-7578' into 'master'
RED-7578: Implemented logic of components endpoint for api v2

Closes RED-7578

See merge request redactmanager/persistence-service!126
2023-09-15 10:56:14 +02:00
Andrei Isvoran
f8dec7f671 RED-5205 - fix getmapping path for download 2023-09-15 11:55:17 +03:00
deiflaender
ad9ef6351f RED-7578: Implemented logic of components endpoint for api v2 2023-09-15 10:36:13 +02:00
Andrei Isvoran
80d707a374 Merge branch 'RED-7185' into 'master'
RED-7185 - RM-46 - Error message when adjusting the Justification

Closes RED-7185

See merge request redactmanager/persistence-service!123
2023-09-15 09:35:57 +02:00
Andrei Isvoran
837822b7dd RED-7185 - RM-46 - Error message when adjusting the Justification 2023-09-15 09:35:57 +02:00
Dominique Eifländer
59474eb52e Merge branch 'RED-7599' into 'master'
RED-7599: schedule reanalysis for any manual redaction

Closes RED-7599

See merge request redactmanager/persistence-service!125
2023-09-15 09:01:06 +02:00
Kilian Schuettler
dd359282cf RED-7599: schedule reanalysis for any manual redaction 2023-09-14 19:25:19 +02:00
Dominique Eifländer
4465c282d6 Merge branch 'DM-285' into 'master'
DM-285: move originalValue to EntityReference

Closes DM-285

See merge request redactmanager/persistence-service!124
2023-09-14 16:27:55 +02:00
Kilian Schuettler
af526cc7e7 DM-285: move originalValue to EntityReference 2023-09-14 15:44:25 +02:00
Timo Bejan
04f3bd1c1b Merge branch 'RED-5202-direct-download' into 'master'
RED-5205 - direct stream download implementation

Closes RED-5202

See merge request redactmanager/persistence-service!122
2023-09-14 14:46:55 +02:00
Dominique Eifländer
02cc8b54e3 Merge branch 'RED-7578' into 'master'
RED-7578: Fixed order of endpoints, set swagger endpoint to /api, fixed not...

Closes RED-7578

See merge request redactmanager/persistence-service!121
2023-09-14 14:27:30 +02:00
Andrei Isvoran
81de9adcba RED-5205 - fix compile error 2023-09-14 15:18:37 +03:00
deiflaender
cb269b8e86 RED-7578: Fixed order of endpoints, set swagger endpoint to /api, fixed not used Error codes in spec 2023-09-14 14:11:40 +02:00
Timo Bejan
7058cb3035 RED-5205 - direct stream download implementation 2023-09-14 15:10:17 +03:00
Dominique Eifländer
e9edfa12f7 Merge branch 'DM-285' into 'master'
DM-285: make component rules version default to -1

Closes DM-285

See merge request redactmanager/persistence-service!120
2023-09-14 13:39:16 +02:00
Kilian Schuettler
f3d148a631 DM-285: make component rules version default to -1
* fix 500 when invalid rules file
* fix AnalysisLogResource documentation
2023-09-14 13:32:25 +02:00
Dominique Eifländer
78d3a772da Merge branch 'RED-7578' into 'master'
RED-7578: Implemented first endpoints of external-api-v2

Closes RED-7578

See merge request redactmanager/persistence-service!119
2023-09-14 09:09:25 +02:00
Kilian Schüttler
2fc912d414 Merge branch 'DM-285' into 'master'
DM-285: minor fixes to previous version

See merge request redactmanager/persistence-service!117
2023-09-13 17:30:39 +02:00
Kilian Schuettler
62065e89ca DM-285: get component version without transaction 2023-09-13 17:05:13 +02:00
deiflaender
0e04331285 RED-7578: Implemented first endpoints of external-api-v2 2023-09-13 16:44:51 +02:00
Kilian Schuettler
70b7a258e9 DM-285: update component rules version with AnalyzeResult 2023-09-13 16:04:17 +02:00
Andrei Isvoran
d5af5a2132 Merge branch 'RED-7599' into 'master'
RED-7599 - Always trigger reanalysis when removing manual redaction

Closes RED-7599

See merge request redactmanager/persistence-service!118
2023-09-13 15:43:53 +02:00
Andrei Isvoran
3d8a33dfd1 RED-7599 - Always trigger reanalysis when removing manual redaction 2023-09-13 16:31:27 +03:00
Kilian Schuettler
d3db8c7b16 DM-285: update component rules version with AnalyzeResult 2023-09-13 15:14:41 +02:00
Kilian Schuettler
31890e6434 DM-285: update component rules version with AnalyzeResult 2023-09-13 14:46:11 +02:00
Kilian Schuettler
9bca6b406a DM-285: make rule value non nullable 2023-09-13 13:59:31 +02:00
Kilian Schuettler
7466a61583 DM-285: don't import empty component rules 2023-09-12 17:22:19 +02:00
Kilian Schuettler
e2c7238c67 DM-285: make RuleFileType.ENTITY default 2023-09-12 15:41:45 +02:00
Kilian Schüttler
662b52e00a Merge branch 'DM-285' into 'master'
DM-285: add pathvariable annotation to internal rules controller

Closes DM-285

See merge request redactmanager/persistence-service!116
2023-09-12 08:20:02 +02:00
Kilian Schuettler
368cf13586 DM-285: add pathvariable annotation to internal rules controller 2023-09-11 17:36:44 +02:00
Kilian Schüttler
32361f7f2f Merge branch 'DM-285' into 'master'
DM-285: add component log and entity log, deprecate redaction log

Closes DM-285

See merge request redactmanager/persistence-service!110
2023-09-11 17:14:00 +02:00
Kilian Schuettler
7d4548e40c DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet* deprecate RSSResponse
* enter clean redaction-service version
* fixed some messages
* used correct RuleFileType
* updated default rules
2023-09-11 17:02:17 +02:00
Kilian Schuettler
56baa7db07 DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet* deprecate RSSResponse
* enter clean redaction-service version
* fixed some messages
* used correct RuleFileType
2023-09-11 16:23:08 +02:00
Ali Oezyetimoglu
322f605004 Merge branch 'RED-7572' into 'master'
RED-7572 - Remove unused method

Closes RED-7572

See merge request redactmanager/persistence-service!115
2023-09-11 16:00:24 +02:00
Andrei Isvoran
808dc37d21 RED-7572 - Remove unused method 2023-09-11 16:53:03 +03:00
Andrei Isvoran
cb6c81b9e9 Merge branch 'RED-7572' into 'master'
RED-7572 - Use MagicConverter instead of manually converting

Closes RED-7572

See merge request redactmanager/persistence-service!114
2023-09-11 15:49:19 +02:00
Andrei Isvoran
0f7d648044 RED-7572 - Use MagicConverter instead of manually converting 2023-09-11 16:27:26 +03:00
Kilian Schuettler
2e142f12e9 DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet* deprecate RSSResponse
* enter clean redaction-service version
2023-09-11 15:27:06 +02:00
Kilian Schuettler
1e53942178 DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet* deprecate RSSResponse
2023-09-11 13:46:46 +02:00
Kilian Schuettler
db40f5a1a9 DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet
2023-09-11 13:35:02 +02:00
Kilian Schuettler
91b13c41ce DM-285: fully deprecated RedactionLog, added component rule file
* add ComponentLogCategory
2023-09-11 13:35:02 +02:00
Kilian Schuettler
8fc94de4b7 DM-285: fully deprecated RedactionLog, added component rule file
* return 404, when component rule file hasn't been created yet
2023-09-11 13:35:02 +02:00
Kilian Schuettler
b4527e4bfe DM-285: fully deprecated RedactionLog, added component rule file 2023-09-11 13:35:02 +02:00
Kilian Schuettler
a621ff1484 DM-285: add component log and entity log, deprecate redaction log
* also refactor RedactionLogController
2023-09-11 13:35:02 +02:00
Andrei Isvoran
701ee0ff43 Merge branch 'RED-7572' into 'master'
RED-7572 - Fix privateKey for digital signature

Closes RED-7572

See merge request redactmanager/persistence-service!113
2023-09-11 13:04:56 +02:00
Andrei Isvoran
78bb3b72ca RED-7572 - Fix privateKey for digital signature 2023-09-11 13:49:24 +03:00
Andrei Isvoran
82a5d6a1cd Merge branch 'RED-7572' into 'master'
RED-7572 - Change privateKey to base64EncodedPrivateKey for DigitalSignature...

Closes RED-7572

See merge request redactmanager/persistence-service!112
2023-09-08 13:47:24 +02:00
Andrei Isvoran
edd0c747cf RED-7572 - Change privateKey to base64EncodedPrivateKey for DigitalSignature... 2023-09-08 13:47:24 +02:00
Andrei Isvoran
be3d717079 Merge branch 'DM-402' into 'master'
DM-402 - Don't add double notifications when user is added to a dossier in documine

Closes DM-402

See merge request redactmanager/persistence-service!111
2023-09-08 08:17:37 +02:00
Andrei Isvoran
230e674c6f DM-402 - Don't add double notifications when user is added to a dossier in documine 2023-09-07 17:04:40 +03:00
Dominique Eifländer
261d69fa52 Merge branch 'DM-410' into 'master'
DM-410: Added endpoint to set that a timeout was detected during rule execution

Closes DM-410

See merge request redactmanager/persistence-service!109
2023-09-07 11:17:11 +02:00
deiflaender
c4d8f16c2e DM-410: Added endpoint to set that a timeout was detected during rule execution 2023-09-07 10:54:25 +02:00
Timo Bejan
23455c2468 Merge branch 'RED-7500' into 'master'
RED-7500 - Remove extension that gets generated by storage-commons

Closes RED-7500

See merge request redactmanager/persistence-service!107
2023-09-06 13:35:49 +02:00
Andrei Isvoran
ae7a3273a1 RED-7500 - Remove extension that gets generated by storage-commons 2023-09-06 13:35:49 +02:00
Kilian Schüttler
03cc83d751 Merge branch 'RED-7317' into 'master'
RED-7317: fix addredaction with addToDict

Closes RED-7317

See merge request redactmanager/persistence-service!108
2023-09-05 16:59:36 +02:00
Kilian Schuettler
fbba154295 RED-7317: fix addredaction with addToDict
* remove latest tag
* rename publish-custom-image.sh, so mvn doesn't try to accidentally run it :)
2023-09-05 16:44:39 +02:00
Kilian Schüttler
b55cfefe6e Merge branch 'RED-7317' into 'master'
RED-7317: fix addredaction with addToDict

Closes RED-7317

See merge request redactmanager/persistence-service!106
2023-09-05 16:26:27 +02:00
Kilian Schuettler
8eb0ae2b06 RED-7317: fix addredaction with addToDict
* added publish-custom-image.sh
2023-09-05 14:54:41 +02:00
Kilian Schüttler
bc63acee33 Merge branch 'RED-7317' into 'master'
RED-7317: set DictionaryEntryType to ENTRY by default

Closes RED-7317

See merge request redactmanager/persistence-service!105
2023-09-04 17:09:46 +02:00
Kilian Schuettler
39172c2da2 RED-7317: reprocess when legalBasisChange 2023-09-04 14:46:21 +02:00
Kilian Schuettler
067d3e49ba RED-7317: change endpoint descriptions 2023-09-04 13:47:59 +02:00
Kilian Schuettler
73afa0f349 RED-7317: set DictionaryEntryType to ENTRY by default 2023-09-04 12:06:27 +02:00
Kilian Schüttler
b63fc5adb2 Merge branch 'RED-7317' into 'master'
RED-7317: mark LegalBasisChange as processed in DB after analysis

Closes RED-7317

See merge request redactmanager/persistence-service!104
2023-09-01 16:00:23 +02:00
Kilian Schuettler
5302e09b4d RED-7317: rename image-recategorization to recategorization 2023-09-01 15:50:12 +02:00
Kilian Schuettler
98bf385c20 RED-7317: mark LegalBasisChange as processed in DB after analysis 2023-09-01 13:56:33 +02:00
Kilian Schüttler
6e63a1e7f4 Merge branch 'RED-7317' into 'master'
RED-7317: Endpoint to change entity types of dict-based annotations

Closes RED-7317

See merge request redactmanager/persistence-service!102
2023-08-30 17:07:46 +02:00
Kilian Schuettler
701c65eac7 RED-7317: Endpoint to change entity types of dict-based annotations
* fix test
* make it clear, which field does what
2023-08-30 17:01:53 +02:00
Kilian Schuettler
7fcb52c90f RED-7317: Endpoint to change entity types of dict-based annotations
* fix test
2023-08-30 16:57:34 +02:00
Kilian Schuettler
be915430b1 RED-7317: Endpoint to change entity types of dict-based annotations
* fix pmd
* add mapper to remove even more code from controller
2023-08-30 16:41:26 +02:00
Kilian Schüttler
a189ae4382 Merge branch 'RED-7317' into 'master'
RED-7317: Keep user-edited paragraph/location when recategorizing entity

Closes RED-7317

See merge request redactmanager/persistence-service!101
2023-08-30 15:53:47 +02:00
Kilian Schuettler
d40ef63116 RED-7317: Endpoint to change entity types of dict-based annotations
* fix tests
2023-08-30 15:46:49 +02:00
Kilian Schuettler
80e602fb07 RED-7317: Endpoint to change entity types of dict-based annotations
* rebased
2023-08-30 15:33:09 +02:00
Kilian Schuettler
d25b8c3934 RED-7317: Endpoint to change entity types of dict-based annotations
* fixed tests
2023-08-30 15:28:35 +02:00
Kilian Schuettler
ea5f79d67c RED-7317: Endpoint to change entity types of dict-based annotations
* added undo functionality
* fixed tests
* added recategorize with dictionary tests
2023-08-30 15:28:34 +02:00
Kilian Schuettler
aab2971d6e RED-7317: Endpoint to change entity types of dict-based annotations
* major refactor of manual redaction service
2023-08-30 15:28:20 +02:00
Kilian Schuettler
d1d5331202 RED-7317: add getComment Endpoint
* moved manual redaction undo code
2023-08-30 15:28:20 +02:00
Kilian Schuettler
0b173ec930 RED-7317: Keep user-edited paragraph/location when recategorizing entity
* refactor of ManualRedactionService, still WIP
2023-08-30 15:28:17 +02:00
Dominique Eifländer
9f250058bb Merge branch 'RED-7508' into 'master'
RED-7508: Fixed wrong response type for false positive entity types

Closes RED-7508

See merge request redactmanager/persistence-service!100
2023-08-30 12:56:06 +02:00
deiflaender
6b22622e7e RED-7508: Fixed wrong response type for false positive entity types 2023-08-30 12:47:52 +02:00
Dominique Eifländer
e12db2e0c2 Merge branch 'RED-7508' into 'master'
RED-7508: Fixed undelete of false positive entries at manual redaction at...

Closes RED-7508

See merge request redactmanager/persistence-service!99
2023-08-30 12:32:25 +02:00
deiflaender
8c7435f8b4 RED-7508: Fixed undelete of false positive entries at manual redaction at false positive to all dossiers 2023-08-30 12:26:06 +02:00
Andrei Isvoran
aeaf0483d3 Merge branch 'RED-7500' into 'master'
RED-7500 - Only delete the metadata for the specific storage

Closes RED-7500

See merge request redactmanager/persistence-service!98
2023-08-29 15:30:19 +02:00
Andrei Isvoran
af4dff23dc RED-7500 - Only delete the metadata for the specific storage 2023-08-29 15:30:19 +02:00
Andrei Isvoran
633ddec803 Merge branch 'RED-7500' into 'master'
RED-7500 Fix report storage id generation

Closes RED-7500

See merge request redactmanager/persistence-service!97
2023-08-29 14:08:10 +02:00
Andrei Isvoran
515edb1c1c RED-7500 Fix report storage id generation 2023-08-29 14:08:10 +02:00
Andrei Isvoran
0fb7ccf7a2 Merge branch 'RED-7500' into 'master'
RED-7500 - Delete Report json metadata from azure/s3 storage

Closes RED-7500

See merge request redactmanager/persistence-service!96
2023-08-29 12:57:35 +02:00
Andrei Isvoran
0162017e61 RED-7500 - Delete Report json metadata from azure/s3 storage 2023-08-29 12:57:34 +02:00
Corina Olariu
f5b925d961 Merge branch 'RED-6860-addGetObject' into 'master'
RED-6860 - Transaction timeout while preparing download

Closes RED-6860

See merge request redactmanager/persistence-service!95
2023-08-29 09:28:22 +02:00
Corina Olariu
698fcbe2b7 RED-6860 - Transaction timeout while preparing download
- add getObject for the download of archives
2023-08-28 18:29:56 +03:00
Andrei Isvoran
79756640da Merge branch 'RED-7500' into 'master'
RED-7500 - Delete file from storage when deleting download status

Closes RED-7500

See merge request redactmanager/persistence-service!94
2023-08-28 12:44:25 +02:00
Andrei Isvoran
28f9401719 RED-7500 - Also delete Report json metadata when deleting archive 2023-08-28 12:44:25 +02:00
Timo Bejan
d6be241717 Merge branch 'RED-7439' into 'master'
RED-7439 - single transaction write for ace entries of a dossier

Closes RED-7439

See merge request redactmanager/persistence-service!93
2023-08-24 20:20:04 +02:00
Timo Bejan
9d084c57c0 RED-7439 - single transaction write for ace entries of a dossier 2023-08-24 21:10:03 +03:00
Kilian Schüttler
e9eb0a5171 Merge branch 'RED-7158' into 'master'
RED-7158: even more specific errors

Closes RED-7158

See merge request redactmanager/persistence-service!92
2023-08-24 14:20:10 +02:00
Kilian Schuettler
d28e485dff RED-7158: even more specific errors 2023-08-24 14:13:00 +02:00
Andrei Isvoran
6a544df044 Merge branch 'RED-7500' into 'master'
RED-7500 - Delete file from storage when deleting download status

Closes RED-7500

See merge request redactmanager/persistence-service!91
2023-08-24 09:53:10 +02:00
Andrei Isvoran
7f7dd7a182 RED-7500 - Delete file from storage when deleting download status 2023-08-24 10:07:03 +03:00
Timo Bejan
96d4407f53 Merge branch 'RED-7400-ps2' into 'master'
Resolve RED-7400

Closes RED-7400

See merge request redactmanager/persistence-service!79
2023-08-23 18:20:51 +02:00
Kilian Schüttler
b491d2df5e Merge branch 'RED-7158' into 'master'
RED-7158: Rosario wants more verbose error messages

Closes RED-7158

See merge request redactmanager/persistence-service!90
2023-08-23 18:00:08 +02:00
Kilian Schuettler
6f7327aa0d RED-7158: Rosario wants more verbose error messages 2023-08-23 17:52:24 +02:00
Ali Oezyetimoglu
ef4eb85481 Merge branch 'RED-7439' into 'master'
RED-7439: throw JobExecutionError to prevent 500 because violating constraint...

Closes RED-7439

See merge request redactmanager/persistence-service!89
2023-08-23 14:05:07 +02:00
Ali Oezyetimoglu
caa017bb24 RED-7439: throw JobExecutionError to prevent 500 because violating constraint acl_entry_unique leads to
DuplicateKeyException
2023-08-23 12:30:09 +02:00
Kilian Schüttler
66629b09cc Update redaction-service version 2023-08-23 09:46:16 +02:00
Kilian Schüttler
2f39e6f956 Merge branch 'RED-7493' into 'master'
RED-7493: provide error messages in upload endpoint

Closes RED-7493

See merge request redactmanager/persistence-service!86
2023-08-22 15:52:49 +02:00
Kilian Schuettler
8b1d26e4e5 RED-7493: fix tests 2023-08-22 15:43:33 +02:00
Kilian Schuettler
b1b544faf6 RED-7493: fix versions in parent pom 2023-08-22 15:30:34 +02:00
Kilian Schuettler
1ac0a184b7 RED-7493: provide error messages in upload endpoint 2023-08-22 15:08:45 +02:00
Kilian Schüttler
ccc2411a92 Merge branch 'RED-7158' into 'master'
RED-7158: fix status code, when dossierId not found

Closes RED-7158

See merge request redactmanager/persistence-service!85
2023-08-22 09:52:10 +02:00
Kilian Schuettler
e3411dba42 RED-7158: fix status code, when dossierId not found 2023-08-22 09:33:04 +02:00
Kevin Tumma
313eebf90b hotfix 2023-08-18 12:22:52 +02:00
Kilian Schüttler
9b37fceb98 Merge branch 'DM-357' into 'master'
DM-357: fix idRemoval mark as processed logic

Closes DM-357

See merge request redactmanager/persistence-service!84
2023-08-18 12:11:20 +02:00
Kilian Schuettler
ed90b6a9cc DM-357: fix idRemoval mark as processed logic 2023-08-18 11:22:34 +02:00
Corina Olariu
ccade4b5fd Merge branch 'RED-6864-dlq' into 'master'
RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob...

Closes RED-6864

See merge request redactmanager/persistence-service!82
2023-08-18 09:43:57 +02:00
Corina Olariu
2c3ce2de97 Merge remote-tracking branch 'origin' into RED-6864-dlq 2023-08-18 10:28:56 +03:00
Corina Olariu
896f0a6e5d RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob Storage and AWS S3/MinIO
- remove the entry from map when download finished
- check for null in case the download process has finished
2023-08-18 10:26:23 +03:00
Kevin Tumma
16e84b85b1 hotfix 2023-08-17 16:40:14 +02:00
Corina Olariu
11958a4099 RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob Storage and AWS S3/MinIO
- add @RabbitListener to the method
2023-08-17 16:50:09 +03:00
deiflaender
3ae67b77e4 hotfix: load test-containers docker images from docker-dev.knecon.com/tests/ 2023-08-17 15:15:24 +02:00
Andrei Isvoran
04212cdd4e RED-6864 - Remove fileProxyStreamForDownload as it closes the stream before downloading the file 2023-08-17 14:37:17 +03:00
Ali Oezyetimoglu
7f7e1d2699 Merge branch 'RED-7400-ps3' into 'master'
RED-7400: changed place of isLocalManualRedaction as it is not needed in RedactionLogEntry anymore

Closes RED-7400

See merge request redactmanager/persistence-service!80
2023-08-17 08:22:16 +02:00
Ali Oezyetimoglu
4164de2a5c RED-7400: changed place of isLocalManualRedaction as it is not needed in RedactionLogEntry anymore 2023-08-17 08:15:02 +02:00
Timo Bejan
13742a12cd Merge branch 'RED-6864' into 'master'
RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob...

Closes RED-6864

See merge request redactmanager/persistence-service!78
2023-08-16 21:05:41 +02:00
Andrei Isvoran
02af9810df RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob... 2023-08-16 21:05:40 +02:00
Ali Oezyetimoglu
3384e91067 RED-7400: added @Builder.Default for engines and reference 2023-08-16 19:21:20 +02:00
Timo Bejan
c3e7483783 Merge branch 'RED-7158-3' into 'master'
RED-7158 layout status in UI

Closes RED-7158

See merge request redactmanager/persistence-service!76
2023-08-16 13:28:55 +02:00
Timo Bejan
32103e168a testcontainers url removed 2023-08-16 14:16:45 +03:00
Timo Bejan
b57444405c testcontainers url 2023-08-16 14:01:35 +03:00
Timo Bejan
02579ef0e5 RED-7158 layout status in UI 2023-08-16 13:47:44 +03:00
Kilian Schüttler
4b39e837a8 Merge branch 'DM-357' into 'master'
DM-357: always schedule reanalysis, when any manual redaction happens

Closes DM-357

See merge request redactmanager/persistence-service!74
2023-08-16 12:19:43 +02:00
Kilian Schuettler
5e98160a58 DM-357: remove outdated status and messageTypes
* remove surrounding-text functionality
2023-08-16 12:02:19 +02:00
Kilian Schuettler
6956b604cc DM-357: schedule reanalysis for every manualRedaction
* silence that stupid automaticAnalysisJob spamming
2023-08-16 12:02:19 +02:00
Kilian Schuettler
1f89d64d81 DM-357: always schedule reanalysis, when any manual redaction happens
* refactored code slightly
2023-08-16 12:02:19 +02:00
Timo Bejan
ed272695ef Merge branch 'RED-7158-2' into 'master'
RED-7158-2 last layout processed time

Closes RED-7158

See merge request redactmanager/persistence-service!73
2023-08-16 12:01:53 +02:00
Timo Bejan
5c19b6af0b RED-7158-2 last layout processed time 2023-08-16 12:01:53 +02:00
Timo Bejan
65b196c7f4 Merge branch 'RED-7400-ps1' into 'master'
RED-7400: fixed error of breaking redaction log with removing engine-check for resize redactions

Closes RED-7400

See merge request redactmanager/persistence-service!68
2023-08-16 11:58:46 +02:00
Ali Oezyetimoglu
2db7128b3a RED-7400: added @Builder.Default for engines and reference 2023-08-16 10:37:41 +02:00
Ali Oezyetimoglu
067fb8a814 RED-7400: changed logic for flag isLocalManualRedaction 2023-08-15 12:33:37 +02:00
Kilian Schüttler
f9af48af8c Merge branch 'RED-7158' into 'master'
RED-7158: add viewer document and deprecate section-grid

Closes RED-7158

See merge request redactmanager/persistence-service!69
2023-08-15 12:31:26 +02:00
Kilian Schuettler
149b85c433 RED-7158: add viewer document and deprecate section-grid 2023-08-15 12:20:14 +02:00
Ali Oezyetimoglu
2eecf7c428 RED-7400: fixed error of breaking redaction log with removing engine-check for resize redactions 2023-08-14 15:56:37 +02:00
Ali Oezyetimoglu
09ea7cada2 Merge branch 'RED-7241-ps6' into 'master'
RED-7241: adapted resize endpoints for multi-level dictionaries and added...

Closes RED-7241

See merge request redactmanager/persistence-service!67
2023-08-11 12:17:39 +02:00
Ali Oezyetimoglu
a58d4d38cf RED-7241: refactored some code and deleted dead code 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
0835bf50be RED-7241: added many log files to debug strange behaviour 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
7bb42d5131 RED-7241: added many log files to debug strange behaviour 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
94bac70f5d RED-7241: added many log files to debug strange behaviour 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
cd945eea82 RED-7241: fixed logic to adapt resize endpoints;
removed unused and deprecated methods
2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
d4a5b04572 RED-7241: added flag addToAllDossiers to ManualResizeRedaction 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
8701d24f96 RED-7241: adapted resize endpoints for multi-level dictionaries and added Junit tests and did some refactoring 2023-08-11 12:06:23 +02:00
Ali Oezyetimoglu
5eba596815 RED-7241: cleaned up unneeded imports 2023-08-11 12:06:23 +02:00
Andrei Isvoran
ebd1165b66 Fix PMD 2023-08-11 12:08:32 +03:00
Andrei Isvoran
460180b929 Merge branch 'RED-6864' into 'master'
RED-6864 - Close streams when done in order to delete temp files

Closes RED-6864

See merge request redactmanager/persistence-service!65
2023-08-11 11:02:42 +02:00
Andrei Isvoran
5e53580c00 RED-6864 - Close streams when done in order to delete temp files 2023-08-11 11:02:42 +02:00
Timo Bejan
cd49c4aabb Merge branch 'RED-6864-replaceGetObject' into 'master'
RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob...

Closes RED-6864

See merge request redactmanager/persistence-service!64
2023-08-08 18:27:39 +02:00
Corina Olariu
2bcee8ccc2 RED-6864 - Optimization of Upload and Download for Large Files in Azure Blob Storage and AWS S3/MinIO
- update to the new version for storage-commons
- replace getObject from storageService with downloadTo
- update tests
2023-08-08 18:59:00 +03:00
Timo Bejan
e454533758 Merge branch 'DM-357' into 'master'
DM-357 - no longer save all manualRedactionLogEntries here -> they will be...

Closes DM-357

See merge request redactmanager/persistence-service!63
2023-08-08 17:16:46 +02:00
Andrei Isvoran
973816f0f7 DM-357 - no longer save all manualRedactionLogEntries here -> they will be... 2023-08-08 17:16:46 +02:00
Andrei Isvoran
6eb522d524 RED-7290 - Update platform-common-dependency version 2023-08-03 18:12:09 +03:00
Dominique Eifländer
c1ad7ff1af Merge branch 'DM-165' into 'master'
DM-165: Trigger full reanalysis after rotation of pages

Closes DM-165

See merge request redactmanager/persistence-service!62
2023-08-03 12:49:11 +02:00
deiflaender
3f5bde17d5 DM-165: Trigger full reanalysis after rotation of pages 2023-08-03 12:42:36 +02:00
Corina Olariu
d4098c1584 Merge branch 'RED-6852-update' into 'master'
RED-6852 - localManualRedaction is false for resized rule-Based redaction

Closes RED-6852

See merge request redactmanager/persistence-service!61
2023-08-03 07:50:14 +02:00
Corina Olariu
825166b8fc RED-6852 - localManualRedaction is false for resized rule-Based redaction
- update the condition for rule based redaction in case of resize
2023-08-02 16:48:20 +03:00
Kilian Schüttler
0cb92b8581 Merge branch 'RED-6725' into 'master'
RED-6725: integrate layoutparsing service

Closes RED-6725

See merge request redactmanager/persistence-service!55
2023-08-01 11:02:24 +02:00
Kilian Schuettler
3fae3c0627 update layoutparser version 2023-08-01 10:45:26 +02:00
Kilian Schuettler
7e4a034784 add sectio grid id 2023-08-01 10:45:26 +02:00
Kilian Schuettler
a6cf632d6e fix some log messages 2023-08-01 10:45:26 +02:00
Kilian Schuettler
b7d51a0701 add simplifiedText 2023-08-01 10:45:26 +02:00
Kilian Schuettler
e794a8effd add application type 2023-08-01 10:45:26 +02:00
Kilian Schuettler
93d2f41720 use final version 2023-08-01 10:45:26 +02:00
Kilian Schuettler
0e2200f336 RED-6725: integrate layout parser
* fixed error messages
* extracted common zip file response entity function
* added content length header
* removed unused identifier
2023-08-01 10:45:26 +02:00
Kilian Schuettler
4105563036 RED-6725: deprecate FileType.TEXT, fix tests 2023-08-01 10:45:26 +02:00
Kilian Schuettler
c9254532d7 RED-6725: fix test mock 2023-08-01 10:45:26 +02:00
Kilian Schuettler
4977090070 RED-6725: integrate layoutparsing service
* updated layout parser version
* added layout parsing type
2023-08-01 10:45:26 +02:00
Kilian Schuettler
12703c6eda RED-6725: integrate layoutparsing service 2023-08-01 10:45:26 +02:00
Andrei Isvoran
e7b29fb683 Merge branch 'RED-7080' into 'master'
RED-6992 - Add removeWatermark flag for dossier template

Closes RED-7080

See merge request redactmanager/persistence-service!60
2023-07-31 14:24:28 +02:00
Andrei Isvoran
bb799a15b3 RED-6992 - Add removeWatermark flag for dossier template 2023-07-31 14:27:54 +03:00
Timo Bejan
7476c56204 Merge branch 'RED-7052' into 'master'
Reanalyze by hand should also do full reprocess if required

Closes RED-7052

See merge request redactmanager/persistence-service!59
2023-07-28 13:56:17 +02:00
Corina Olariu
9ec55808d6 Merge branch 'RED-6852' into 'master'
RED-6852 - localManualRedaction is false for resized rule-Based redaction

Closes RED-6852

See merge request redactmanager/persistence-service!57
2023-07-28 10:58:12 +02:00
Andrei Isvoran
6fdaa71f8e Merge branch 'RED-6992-ocrByDefault' into 'master'
RED-6992 - Add ocrByDefault flag for dossier template

Closes RED-6992

See merge request redactmanager/persistence-service!58
2023-07-28 10:29:16 +02:00
Timo Bejan
92bf9fd224 Reanalyze by hand should also do full reprocess if required 2023-07-28 10:18:25 +02:00
Andrei Isvoran
d515014468 RED-6992 - Add ocrByDefault flag for dossier template 2023-07-27 17:38:30 +03:00
Timo Bejan
bea9e39eee Update pom.xml 2023-07-27 08:48:57 +02:00
Corina Olariu
4abbd04fe9 RED-6852 - Not possible to delete specific dossier - Error code 500 returned
- set the flag local manual redaction true in case the manual redaction type is RESIZE and engine has RULE value
2023-07-27 09:16:33 +03:00
Ali Oezyetimoglu
c3d0a9c2ed Merge branch 'RED-7140-B' into 'master'
RED-7140: make tenantId available in CompletableFeature.supplyAsync

Closes RED-7140

See merge request redactmanager/persistence-service!56
2023-07-25 09:58:57 +02:00
Ali Oezyetimoglu
14a46dc237 RED-7140: make tenantId available in CompletableFeature.supplyAsync 2023-07-25 09:37:37 +02:00
Ali Oezyetimoglu
6e274fccf0 Merge branch 'RED-7140-3' into 'master'
RED-7140: get userId before async method

Closes RED-7140

See merge request redactmanager/persistence-service!54
2023-07-20 16:01:22 +02:00
Ali Oezyetimoglu
33638c2b5e RED-7140: get userId before async method 2023-07-20 15:55:29 +02:00
Kevin Tumma
883cee61c5 Merge branch 'renovate/configure' into 'master'
Configure Renovate

See merge request redactmanager/persistence-service!51
2023-07-17 15:32:35 +02:00
Ali Oezyetimoglu
28d6f5a158 Merge branch 'RED-7140' into 'master'
RED-7140: changed to CompletableFuture with InputStreamResource to make it...

Closes RED-7140

See merge request redactmanager/persistence-service!52
2023-07-17 08:56:02 +02:00
Ali Oezyetimoglu
a9615a5c00 RED-7140: changed to CompletableFuture with InputStreamResource to make it possible to download files greater than 5GB 2023-07-14 15:03:55 +02:00
Kevin Tumma
3acf70951c Add renovate.json 2023-07-14 09:05:56 +00:00
Timo Bejan
864b3e8af8 Merge branch 'RED-6981' into 'master'
RED-6981 - save file size when uploading

Closes RED-6981

See merge request redactmanager/persistence-service!50
2023-07-13 11:16:08 +02:00
Andrei Isvoran
95ed1c643a RED-6981 - save file size when uploading 2023-07-13 11:16:08 +02:00
Corina Olariu
06c788d664 Merge branch 'RED-7054-test-100' into 'master'
RED-7054 - Not possible to delete specific dossier - Error code 500 returned

Closes RED-7054

See merge request redactmanager/persistence-service!49
2023-07-11 09:54:23 +02:00
Corina Olariu
144538a068 RED-7054 - Not possible to delete specific dossier - Error code 500 returned
- add Transaction for hardDeleteDossier
2023-07-10 16:48:49 +03:00
Corina Olariu
c1c7931df2 RED-7054 - Not possible to delete specific dossier - Error code 500 returned
- add Transaction
2023-07-10 13:47:41 +03:00
Corina Olariu
c3782323eb Merge branch 'RED-7034_update' into 'master'
RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested

Closes RED-7034

See merge request redactmanager/persistence-service!48
2023-07-10 12:04:12 +02:00
Corina Olariu
6ee500c1c7 RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested
- fix PMD violations
2023-07-10 10:08:20 +03:00
Corina Olariu
db16cc0ab3 Merge branch 'RED-7034' into 'master'
RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested

Closes RED-7034

See merge request redactmanager/persistence-service!45
2023-07-10 08:50:52 +02:00
Corina Olariu
9b2ea9dfc4 RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested
- update after review
2023-07-07 18:58:30 +03:00
Ali Oezyetimoglu
a594ef0a62 Merge branch 'RED-6860-2' into 'master'
RED-6860: fixed transaction timeout issue by loading files eagerly and making...

Closes RED-6860

See merge request redactmanager/persistence-service!47
2023-07-07 17:22:59 +02:00
Ali Oezyetimoglu
2322a98c2f RED-6860: fixed transaction timeout issue by loading files eagerly and making the transaction smaller; also removed twice loading of all files 2023-07-07 17:15:58 +02:00
Corina Olariu
8860e9d040 RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested
- update junit tests
2023-07-07 12:42:29 +03:00
Corina Olariu
69566a2614 RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested
- before adding / deleting entries to a dossier template dictionary check if the flag dossierDictionaryOnly is set true
- the same check is needed in case of manual redactions ; adding, removing
- add junit tests
2023-07-07 09:54:09 +03:00
Timo Bejan
bbd705cdb1 Merge branch 'RED-7094' into 'master'
PMD fix

Closes RED-7094

See merge request redactmanager/persistence-service!44
2023-07-06 15:34:29 +02:00
Timo Bejan
a1f353ac75 PMD fix 2023-07-06 16:28:01 +03:00
Timo Bejan
e014f682b4 Merge branch 'RED-7094' into 'master'
RED-7094 - extracted liquibase code

Closes RED-7094

See merge request redactmanager/persistence-service!43
2023-07-06 15:18:03 +02:00
Timo Bejan
ef9ff74339 RED-7094 - extracted liquibase code 2023-07-06 16:09:06 +03:00
Dominique Eifländer
e954807788 Merge branch 'RED-6543' into 'master'
RED-6543: Adapted license report to new requirements

Closes RED-6543

See merge request redactmanager/persistence-service!42
2023-07-06 13:03:23 +02:00
deiflaender
939941d789 RED-6543: Adapted license report to new requirements 2023-07-06 12:53:29 +02:00
Timo Bejan
b2728d64fc Merge branch 'RED-7094' into 'master'
RED-7094 - extracted liquibase code

Closes RED-7094

See merge request redactmanager/persistence-service!41
2023-07-06 11:37:54 +02:00
Timo Bejan
a2f7a2d85b RED-7094 - extracted liquibase code 2023-07-06 12:30:15 +03:00
Ali Oezyetimoglu
012e5a9cde Merge branch 'RED-6545-3' into 'master'
RED-6545: members of dossier can resize, recategorise, force redactions or...

Closes RED-6545

See merge request redactmanager/persistence-service!40
2023-07-05 16:15:42 +02:00
Ali Oezyetimoglu
cca99204fc RED-6545: members of dossier can resize, recategorise, force redactions or change legal basis on dossier level 2023-07-04 18:31:31 +02:00
Dominique Eifländer
d269dde0a9 Merge branch 'RED-7026_RED-6743_RED-6734' into 'master'
RED-7026_RED-6743_RED-6734- Simplified redaction flow

Closes RED-7026

See merge request redactmanager/persistence-service!39
2023-07-03 09:02:48 +02:00
Corina Olariu
e38c09d4a2 RED-7026_RED-6743_RED-6734- Simplified redaction flow
- filter the merged dictionary so the deleted entries are not present
- sorting the entries in the merged endpoint
- check before creating a dossier level type if the dossier and dossier template are matching
- add and update junit tests
2023-06-30 15:47:52 +03:00
Dominique Eifländer
1a1016d1e4 Merge branch 'RED-6543' into 'master'
RED-6543: Fixed license report QA findings 3

Closes RED-6543

See merge request redactmanager/persistence-service!38
2023-06-30 13:07:08 +02:00
deiflaender
a84c98cc5d RED-6543: Fixed license report QA findings 3 2023-06-30 13:00:42 +02:00
Corina Olariu
17412ee828 Merge branch 'RED-6575' into 'master'
RED-6575- Failed report generation after upload KMS Certificate

Closes RED-6575

See merge request redactmanager/persistence-service!36
2023-06-30 11:09:59 +02:00
Timo Bejan
d56e98cdcb Merge branch 'RED-6686-3' into 'master'
Springdoc fixes

Closes RED-6686

See merge request redactmanager/persistence-service!37
2023-06-29 08:34:19 +02:00
Timo Bejan
003cefbefc Springdoc fixes 2023-06-29 09:25:55 +03:00
Corina Olariu
d7e61e0fa4 RED-6575- Failed report generation after upload KMS Certificate
- add convert method for the certificate, entity uses byte[] and the model has the certificate as string
2023-06-28 08:50:10 +03:00
Timo Bejan
0ff19865eb Merge branch 'RED-6686-2' into 'master'
Resolve RED-6686 "2"

Closes RED-6686

See merge request redactmanager/persistence-service!35
2023-06-27 22:50:16 +02:00
Timo Bejan
e763750efa Resolve RED-6686 "2" 2023-06-27 22:50:16 +02:00
Timo Bejan
79b70f75d6 Merge branch 'RED-6686-2' into 'master'
Resolve RED-6686 "2"

Closes RED-6686

See merge request redactmanager/persistence-service!34
2023-06-27 14:26:22 +02:00
Timo Bejan
628012c809 Resolve RED-6686 "2" 2023-06-27 14:26:22 +02:00
Timo Bejan
1157ed353e Merge branch 'RED-6686-2' into 'master'
Resolve RED-6686 "2"

Closes RED-6686

See merge request redactmanager/persistence-service!33
2023-06-27 13:54:52 +02:00
Timo Bejan
c26020bbc7 Resolve RED-6686 "2" 2023-06-27 13:54:52 +02:00
Dominique Eifländer
90b5d79107 Merge branch 'RED-6543' into 'master'
RED-6543: Fixed license report QA findings

Closes RED-6543

See merge request redactmanager/persistence-service!32
2023-06-27 09:52:39 +02:00
deiflaender
e53fc9e43b RED-6543: Fixed license report QA findings 2023-06-27 09:43:44 +02:00
Timo Bejan
804e77bd6c Merge branch 'RED-6686-2' into 'master'
RED-6686 - cleanup

Closes RED-6686

See merge request redactmanager/persistence-service!31
2023-06-26 23:49:29 +02:00
Timo Bejan
71333aeb6b RED-6686 - cleanup 2023-06-26 23:49:29 +02:00
Timo Bejan
5a62786367 Merge branch 'RED-6686' into 'master'
RED-6686 Extract Tenant and user-management code into a separate service.

See merge request redactmanager/persistence-service!4
2023-06-26 22:44:52 +02:00
Timo Bejan
dc6a004365 RED-6686 Extract Tenant and user-management code into a separate service. 2023-06-26 22:44:52 +02:00
Corina Olariu
2f96962351 Merge branch 'RED-6912-ignorecase' into 'master'
RED-6912- Entries not sorted correctly in the dossier dictionary

Closes RED-6912

See merge request redactmanager/persistence-service!28
2023-06-26 12:39:43 +02:00
Corina Olariu
c23d3572b8 Merge branch 'RED-6734-update' into 'master'
RED-6734 - Get merged dossier and template dictionaries

Closes RED-6734

See merge request redactmanager/persistence-service!25
2023-06-26 12:16:43 +02:00
Dominique Eifländer
760181bdb2 Merge branch 'dossierDictSchedulingFix' into 'master'
hotfix: Fixed scheduling for non existing dossierDictionaries

See merge request redactmanager/persistence-service!30
2023-06-26 11:25:27 +02:00
Corina Olariu
365f106c9a Merge branch 'RED-6631' into 'master'
RED-6631 - RED_USER and RED_MANAGER-Role must not delete dossier templates

Closes RED-6631

See merge request redactmanager/persistence-service!24
2023-06-26 11:25:14 +02:00
deiflaender
abafd745cd hotfix: Fixed scheduling for non existing dossierDictionaries 2023-06-26 11:15:59 +02:00
Dominique Eifländer
e6c8f5f731 Merge branch 'fattrHotfix2' into 'master'
hotfix: Try to set Status reprocess in seperate transaction before setting...

See merge request redactmanager/persistence-service!27
2023-06-26 09:43:35 +02:00
deiflaender
ae05d7ffcb hotfix: Try to set Status reprocess in seperate transaction before setting lastFileAttribute change to avoid duplicate processing 2023-06-26 09:31:10 +02:00
Corina Olariu
df2739713a RED-6912- Entries not sorted correctly in the dossier dictionary
- update the sorting to be case-insensitive
- update junit tests
2023-06-26 10:27:27 +03:00
Kevin Tumma
37dc9277bd Merge branch 'startup2' into 'master'
hotfix: do not schedule UNPROCESSED file to fix race condition in startup test

See merge request redactmanager/persistence-service!26
2023-06-23 15:56:05 +02:00
deiflaender
31ddd07f26 hotfix: do not schedule UNPROCESSED file to fix race condition in startup test 2023-06-23 15:54:31 +02:00
Corina Olariu
c4d22dfc85 RED-6734 - Get merged dossier and template dictionaries
- update the endpoint to get the merged dictionaries for the given type, dossier template and dossier
- update junit tests
2023-06-23 16:25:33 +03:00
Kevin Tumma
9e8e6206c2 Merge branch 'startup1' into 'master'
hotfix: Fix Startup test

See merge request redactmanager/persistence-service!23
2023-06-23 15:19:35 +02:00
deiflaender
2662ae1739 hotfix: Fix Startup test 2023-06-23 15:15:10 +02:00
Corina Olariu
f77a6bbf05 RED-6631 - RED_USER and RED_MANAGER-Role must not delete dossier templates
- check that only admin users can delete the dossier template
- add junit tests
2023-06-23 16:02:04 +03:00
Dominique Eifländer
e94b2b0e83 Merge branch 'RED-6543' into 'master'
RED-6543: Fixed file attribute scheduling race condition

Closes RED-6543

See merge request redactmanager/persistence-service!22
2023-06-23 13:12:51 +02:00
deiflaender
80cfa68431 RED-6543: Fixed file attribute scheduling race condition 2023-06-23 13:02:47 +02:00
Dominique Eifländer
41dceae73c Merge branch 'RED-6543' into 'master'
RED-6543: Fixed QA findings in license report

Closes RED-6543

See merge request redactmanager/persistence-service!21
2023-06-23 10:36:49 +02:00
deiflaender
5e1da0623f RED-6543: Fixed QA findings in license report 2023-06-23 09:37:01 +02:00
Dominique Eifländer
7c624a84d6 Merge branch 'RED-6929' into 'master'
RED-6929: Fixed transaction handline for manual redaction add to dictionary 2

Closes RED-6929

See merge request redactmanager/persistence-service!20
2023-06-22 16:46:41 +02:00
deiflaender
3babf6e18a RED-6929: Fixed transaction handline for manual redaction add to dictionary 2 2023-06-22 16:27:38 +02:00
Kilian Schüttler
a95850b119 Merge branch 'RED-6929' into 'master'
RED-6929: Fixed transaction handline for manual redaction add to dictionary

Closes RED-6929

See merge request redactmanager/persistence-service!19
2023-06-22 15:37:23 +02:00
deiflaender
f5935d917d RED-6929: Fixed transaction handline for manual redaction add to dictionary 2023-06-22 15:28:33 +02:00
Dominique Eifländer
23f3eb6d16 Merge branch 'RED-6912' into 'master'
RED-6912 - Entries not sorted correctly in the dossier dictionary

Closes RED-6912

See merge request redactmanager/persistence-service!16
2023-06-22 08:56:57 +02:00
Corina Olariu
43aa2fba7c RED-6912 - Entries not sorted correctly in the dossier dictionary
- sort entries and falsePositives and falseRecommendations in endpoint getDictionaryForType
- add junit tests
2023-06-21 13:57:37 +03:00
Kilian Schüttler
68bef37fe1 Merge branch 'RED-6009' into 'master'
RED-6009: change matchedrule to String in redactionlog

Closes RED-6009

See merge request redactmanager/persistence-service!15
2023-06-21 10:52:00 +02:00
Kilian Schuettler
764247ff0f RED-6009: test if matchedRule from int to String crashes the FE 2023-06-21 10:42:18 +02:00
Dominique Eifländer
d9248b57c8 Merge branch 'RED-6543' into 'master'
RED-6543: Fixed findings in license report

Closes RED-6543

See merge request redactmanager/persistence-service!14
2023-06-21 09:46:52 +02:00
deiflaender
742d29c76a RED-6543: Fixed findings in license report 2023-06-21 09:37:15 +02:00
Dominique Eifländer
d1ecb6f0b8 Merge branch 'RED-6934' into 'master'
RED-6934: Fixed transaction handling for file attributes

Closes RED-6934

See merge request redactmanager/persistence-service!13
2023-06-20 15:07:28 +02:00
deiflaender
2dcb7c9e9a RED-6934: Fixed transaction handling for file attributes 2023-06-20 14:46:18 +02:00
Dominique Eifländer
4688766ca3 Merge branch 'RED-6934' into 'master'
RED-6934: Fixed too long error message for cause field in db

Closes RED-6934

See merge request redactmanager/persistence-service!12
2023-06-20 13:37:28 +02:00
deiflaender
a003071322 RED-6934: Fixed too long error message for cause field in db 2023-06-20 13:23:39 +02:00
Corina Olariu
e5d19b98d7 Merge branch 'RED-6734' into 'master'
RED-6734 - Get merged dossier and template dictionaries

Closes RED-6734

See merge request redactmanager/persistence-service!11
2023-06-20 11:08:14 +02:00
Corina Olariu
004fe8d0d2 RED-6734 - Get merged dossier and template dictionaries
- add endpoint for the merged dictionaries
- use DictionaryEntry from commons service
- add junit tests
2023-06-20 11:28:55 +03:00
Corina Olariu
4a80b9b80b Merge branch 'RED-6855' into 'master'
RED-6855 - Setting for default dossier template manipulation for user actions

Closes RED-6855

See merge request redactmanager/persistence-service!7
2023-06-19 10:01:31 +02:00
Corina Olariu
afb22f4f52 Merge branch 'master' of ssh://git.knecon.com:22222/redactmanager/persistence-service into RED-6855 2023-06-19 10:31:46 +03:00
Kevin Tumma
dea3fb9cf6 Merge branch 'RED-6916' into 'master'
RED-6916: Fixed pmd error

Closes RED-6916

See merge request redactmanager/persistence-service!10
2023-06-16 15:18:20 +02:00
deiflaender
8406adbf34 RED-6916: Fixed pmd error 2023-06-16 15:08:35 +02:00
Kevin Tumma
08d5b17b65 Merge branch 'RED-6916' into 'master'
RED-6916: Fixed missing transaction when converting manual redaction

Closes RED-6916

See merge request redactmanager/persistence-service!9
2023-06-16 14:58:04 +02:00
deiflaender
16229588d8 RED-6916: Fixed missing transaction when converting manual redaction 2023-06-16 14:33:23 +02:00
Dominique Eifländer
685e96d814 Merge branch 'RED-6916' into 'master'
RED-6916: Removed creation of dossier_redaction Dossier Dictionary at creat dossier

Closes RED-6916

See merge request redactmanager/persistence-service!8
2023-06-16 12:41:13 +02:00
deiflaender
6380c3a3e0 RED-6916: Removed creation of dossier_redaction Dossier Dictionary at creat dossier 2023-06-16 12:32:20 +02:00
Corina Olariu
106a27ab9a Merge branch 'master' of ssh://git.knecon.com:22222/redactmanager/persistence-service into RED-6855 2023-06-16 11:12:35 +03:00
Dominique Eifländer
695b4880bc Merge branch 'RED-6543' into 'master'
RED-6543: Changed license report to new storage logic

Closes RED-6543

See merge request redactmanager/persistence-service!6
2023-06-16 08:58:20 +02:00
Corina Olariu
145f1d6200 RED-6855 - Setting for default dossier template manipulation for user actions
- add flag applyDictionaryUpdatesToAllDossiersByDefault to dossier template
2023-06-16 09:46:37 +03:00
deiflaender
699a451f29 RED-6543: Changed license report to new storage logic 2023-06-15 16:48:55 +02:00
Dominique Eifländer
b029369cad Merge branch 'RED-6072-timestamp-missing' into 'master'
RED-6072 - As Operation I want to see why files are in an ERROR state

Closes RED-6072

See merge request redactmanager/persistence-service!5
2023-06-15 09:57:11 +02:00
Corina Olariu
631ea0d95e RED-6072 - As Operation I want to see why files are in an ERROR state
- add constructor without timestamp to be backward compatible
2023-06-14 19:19:33 +03:00
Dominique Eifländer
a11c22112c Merge branch 'RED-6485_RED-6743' into 'master'
RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 -...

Closes RED-6485

See merge request redactmanager/persistence-service!2
2023-06-14 10:44:08 +02:00
Kevin Tumma
5f57a38852 Merge branch 'RED-6072-timestamp' into 'master'
RED-6072 - As Operation I want to see why files are in an ERROR state

Closes RED-6072

See merge request redactmanager/persistence-service!3
2023-06-14 09:40:34 +02:00
Corina Olariu
7d15f30ca7 RED-6072 - As Operation I want to see why files are in an ERROR state
- add timestamp to file error info
- reset error info when file is overwritten
2023-06-13 14:13:53 +03:00
Corina Olariu
35cb2633f4 RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 - Create dossier dictionaries on-the-fly
- fix quality gate status failure, remove @Transactional
2023-06-13 13:56:42 +03:00
Corina Olariu
a8d4c91733 RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 - Create dossier dictionaries on-the-fly
- when getting DictionaryForType, create dossier level dictionary if it does not exists
2023-06-13 13:32:05 +03:00
Corina Olariu
889e63e7c7 RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 - Create dossier dictionaries on-the-fly
- remove check for dossier dictionary only
- fix PMD violations
2023-06-13 13:05:00 +03:00
deiflaender
e160f5e556 RED-6485: Fixed transactions for manual redactions with add to dictionary 2023-06-13 09:54:32 +02:00
Corina Olariu
c6cca6a2d3 RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 - Create dossier dictionaries on-the-fly
- update junit tests
2023-06-12 09:51:01 +03:00
Corina Olariu
7029c3d7c4 RED-6485 - Dossier-only entity setting in the dossier template, RED-6743 - Create dossier dictionaries on-the-fly
- remove dossierId from the endpoints of creating, updating and deleting type.
- when a type is updated / deleted all dossier levels will be updated/deleted
- when adding / deleting entries check for dossier level types and create them if needed
- update junit tests
2023-06-09 20:28:39 +03:00
Dominique Eifländer
9b17efbf89 Merge branch 'RED-6798' into 'master'
RED-6798, RED-6751, RED-6545: Enabled to add delete entries, changed...

Closes RED-6798

See merge request redactmanager/persistence-service!1
2023-06-06 14:27:27 +02:00
deiflaender
7beee690f5 RED-6798, RED-6751, RED-6545: Enabled to add delete entries, changed permissions for manual redactions, implemented logic for addToAllDossiers 2023-06-06 13:42:47 +02:00
Christoph Schabert
5c50d03426 Update file pom.xml 2023-06-01 11:20:55 +02:00
Christoph Schabert
0108780416 Update file pom.xml 2023-06-01 11:10:08 +02:00
Christoph Schabert
31c975ff03 Update 6 files
- /bamboo-specs/src/main/java/buildjob/PlanSpec.java
- /bamboo-specs/src/main/resources/scripts/build-java.sh
- /bamboo-specs/src/main/resources/scripts/sonar-java.sh
- /bamboo-specs/src/test/java/buildjob/PlanSpecTest.java
- /bamboo-specs/pom.xml
- /.gitlab-ci.yml
2023-06-01 11:07:12 +02:00
Corina Olariu
a6894496b0 Pull request #701: RED-6485 - Dossier-only entity setting in the dossier template
Merge in RED/persistence-service from RED-6485 to master

* commit 'b9e6e63c2ff3b33319511760ec974e96f72b4658':
  RED-6485 - Dossier-only entity setting in the dossier template - add to flag to type entity to indicate if it is dossier dictionary only - prevent update of that flag - return the added information to dictionary and type result - update junit tests
2023-06-01 09:49:09 +02:00
Corina Olariu
11c032c1d9 Pull request #700: Bugfix/RED-6770 metadata
Merge in RED/persistence-service from bugfix/RED-6770-metadata to master

* commit '0592dd183f9aa87003ef46abe8be2ab8cf52eef1':
  RED-6770 - Cannot overwrite dossierTemplate by import - save the existing dossier template after the updated information - update junit test
  RED-6770 - Cannot overwrite dossierTemplate by import - test junit
2023-06-01 09:40:21 +02:00
devplant
b9e6e63c2f RED-6485 - Dossier-only entity setting in the dossier template
- add to flag to type entity to indicate if it is dossier dictionary only
- prevent update of that flag
- return the added information to dictionary and type result
- update junit tests
2023-05-31 18:37:14 +03:00
devplant
0592dd183f RED-6770 - Cannot overwrite dossierTemplate by import
- save the existing dossier template after the updated information
- update junit test
2023-05-31 13:16:59 +03:00
Dominique Eiflaender
2a805811c3 Pull request #699: RED-6670: Enabled to configure ssoSessionIdleTimeout for new created tenants
Merge in RED/persistence-service from RED-6670-sso to master

* commit '86883885ade8a0bb19e715f5f592ea59e0cfaabb':
  RED-6670: Enabled to configure ssoSessionIdleTimeout for new created tenants
2023-05-31 09:16:20 +02:00
deiflaender
86883885ad RED-6670: Enabled to configure ssoSessionIdleTimeout for new created tenants 2023-05-30 14:15:26 +02:00
devplant
656b0719ba RED-6770 - Cannot overwrite dossierTemplate by import
- test junit
2023-05-30 09:28:44 +03:00
Corina Olariu
9a44ba7658 Pull request #694: RED-6072
Merge in RED/persistence-service from RED-6072 to master

* commit 'eff8eeaf03f76c12ca700ff4bb4f7688c291fab6':
  RED-6072 - As Operation I want to see why files are in an ERROR state - update junit tests
  RED-6072 - As Operation I want to see why files are in an ERROR state - add @Transactional for the update
  RED-6072 - As Operation I want to see why files are in an ERROR state - update the new endpoints with different path than the original endpoints
  RED-6072 - As Operation I want to see why files are in an ERROR state - set back the initial endpoints for backward compatibility
  RED-6072 - As Operation I want to see why files are in an ERROR state - update junit test
  RED-6072 - As Operation I want to see why files are in an ERROR state - add to file entity and models information about the error state - update endpoints with the error information in case of failure
2023-05-25 09:12:35 +02:00
Viktor Seifert
1c02f96c5a Pull request #696: RED-6777
Merge in RED/persistence-service from RED-6777 to master

* commit 'ca6f3f54f201398452cfbfd044e3b014d499d4a9':
  RED-6777: Reordered parameters for consistency
  RED-6777: Reimplemented deletion of dictionary entries as a batch process to avoid a limitation in the Postgres JDBC driver
  RED-6777: Added a test for a dictionary update and delete with a large number of entries
2023-05-22 16:30:53 +02:00
Viktor Seifert
ca6f3f54f2 RED-6777: Reordered parameters for consistency 2023-05-22 16:12:35 +02:00
Viktor Seifert
d1b250f450 RED-6777: Reimplemented deletion of dictionary entries as a batch process to avoid a limitation in the Postgres JDBC driver 2023-05-22 15:40:14 +02:00
Viktor Seifert
6a98c9229b RED-6777: Added a test for a dictionary update and delete with a large number of entries 2023-05-22 15:35:01 +02:00
Viktor Seifert
9787d1a0fd Pull request #695: RED-6770: Fixed lazy init exception in dossier template import by eagerly fetching the needed collection
Merge in RED/persistence-service from RED-6770 to master

* commit 'a8a612de55d8ae72e872eca984e847440344657f':
  RED-6770: Fixed lazy init exception in dossier template import by eagerly fetching the needed collection
2023-05-22 11:24:25 +02:00
devplant
eff8eeaf03 RED-6072 - As Operation I want to see why files are in an ERROR state
- update junit tests
2023-05-18 10:50:49 +03:00
devplant
54bfe80f31 RED-6072 - As Operation I want to see why files are in an ERROR state
- add @Transactional for the update
2023-05-18 10:05:14 +03:00
devplant
b1d1c41dbf RED-6072 - As Operation I want to see why files are in an ERROR state
- update the new endpoints with different path than the original endpoints
2023-05-18 08:57:06 +03:00
Viktor Seifert
a8a612de55 RED-6770: Fixed lazy init exception in dossier template import by eagerly fetching the needed collection 2023-05-17 15:37:19 +02:00
devplant
43e7b0a3eb RED-6072 - As Operation I want to see why files are in an ERROR state
- set back the initial endpoints for backward compatibility
2023-05-17 15:32:41 +03:00
devplant
1858e462e0 RED-6072 - As Operation I want to see why files are in an ERROR state
- update junit test
2023-05-17 10:10:51 +03:00
devplant
5bf42a6c60 RED-6072 - As Operation I want to see why files are in an ERROR state
- add to file entity and models information about the error state
- update endpoints with the error information in case of failure
2023-05-16 18:55:59 +03:00
Corina Olariu
58fe156920 Pull request #691: RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement
Merge in RED/persistence-service from RED-5787-default-value to master

* commit '872c914cee671f0866b7c7c73391f31356df3b14':
  RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement - set default values to CENTER for horizontal and vertical text alignment
2023-05-16 08:35:10 +02:00
devplant
872c914cee RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement
- set default values to CENTER for horizontal and vertical text alignment
2023-05-15 13:32:01 +03:00
Thomas Beyer
2d4427b4da Pull request #690: RED-4876 - add new column keep_overlapping_objects in dossier-template
Merge in RED/persistence-service from RED-4876_6 to master

* commit '4f3bb0101bb79a10a37bc3e0212da20ced62f6b0':
  RED-4876 - move boolean to correct class
  RED-4876 - add new column keep_overlapping_objects in dossier-template
2023-05-15 10:45:01 +02:00
Thomas Beyer
4f3bb0101b RED-4876 - move boolean to correct class 2023-05-15 10:05:50 +02:00
Thomas Beyer
e6f7b58246 RED-4876 - add new column keep_overlapping_objects in dossier-template 2023-05-15 09:51:59 +02:00
Viktor Seifert
bf9726dde2 Pull request #687: RED-6720
Merge in RED/persistence-service from RED-6720 to master

* commit 'c6045189e6b964a3e44d98759bc54c461649bd06':
  RED-6270: Changed data access to avoid lazy loading, making it possible to run the dossier-template import outside an enclosing transaction
  RED-6270: Added try-with-resources to correctly close file stream
  RED-6270: Removed transactional annotation on the dossier-template import, since it uses both Hibernate and JDBC (for runtime performance reasons) and otherwise runs into query ordering issues
  RED-6270: Repackaged incorrectly packaged dossier template and created dossier template import test that always runs (it does not have local dependencies)
2023-05-05 17:15:16 +02:00
Viktor Seifert
c6045189e6 RED-6270: Changed data access to avoid lazy loading, making it possible to run the dossier-template import outside an enclosing transaction 2023-05-05 16:30:09 +02:00
Viktor Seifert
9b9c79fc99 RED-6270: Added try-with-resources to correctly close file stream 2023-05-05 15:55:31 +02:00
Viktor Seifert
6165a5eea1 Merge branch 'master' into RED-6720 2023-05-05 14:49:42 +02:00
Viktor Seifert
5f119aa996 RED-6270: Removed transactional annotation on the dossier-template import, since it uses both Hibernate and JDBC (for runtime performance reasons) and otherwise runs into query ordering issues 2023-05-05 14:48:02 +02:00
Corina Olariu
16de631c34 Pull request #685: RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement
Merge in RED/persistence-service from RED-5787 to master

* commit '55bca9f7d0b1afba9111159a801c6160ed12ee35':
  RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement - remove default value
  RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement - add 2 properties: vertical and horizontal alignment to watermark configuration
2023-05-05 10:54:34 +02:00
Corina Olariu
c5bac015d5 Pull request #686: Bugfix/RED-6034 status code
Merge in RED/persistence-service from bugfix/RED-6034_status_code to master

* commit '113947d2165821ab778eacfe537918f52fd9c082':
  RED-6034 - Possible to assign a file to unauthorized users - update junit test
  RED-6034 - Possible to assign a file to unauthorized users - change status from 403 to 400
2023-05-05 08:49:45 +02:00
devplant
55bca9f7d0 RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement
- remove default value
2023-05-04 12:57:58 +03:00
devplant
113947d216 RED-6034 - Possible to assign a file to unauthorized users
- update junit test
2023-05-04 10:29:15 +03:00
devplant
d09da8ea78 RED-6034 - Possible to assign a file to unauthorized users
- change status from 403 to 400
2023-05-04 09:44:57 +03:00
Viktor Seifert
740b9ba040 RED-6270: Repackaged incorrectly packaged dossier template and created dossier template import test that always runs (it does not have local dependencies) 2023-05-03 13:04:33 +02:00
devplant
50d4900971 RED-5787 - As an admin for Japan, I want to configure the horizontal and vertical alignment of watermarks to be able to adjust the placement
- add 2 properties: vertical and horizontal alignment to watermark configuration
2023-05-03 11:00:18 +03:00
Viktor Seifert
23d49172d5 Pull request #684: RED-6270
Merge in RED/persistence-service from RED-6270 to master

* commit '4ad76962ec8786f518c62f57f273c4c3a37755ec':
  RED-6270: Extracted common qualifiers into a constant
  RED-6270: Changed batch execution to use the batch size provided by the configuration
  RED-6270: Implemented the adding of dictionary entries via batch updates to improve writing speed
  RED-6270: Removed default connection value because it had no effect
  RED-6270: Extracted common code into own methods and corrected jdbc-string generation (not all params were concatenated correctly)
2023-05-02 14:55:46 +02:00
Viktor Seifert
4ad76962ec RED-6270: Extracted common qualifiers into a constant 2023-05-02 12:45:38 +02:00
Viktor Seifert
412b3fb3c8 Merge branch 'master' into RED-6270 2023-05-02 10:15:10 +02:00
Corina Olariu
13350e4702 Pull request #683: RED-6034 - Possible to assign a file to unauthorized users
Merge in RED/persistence-service from bugfix/RED-6034 to master

* commit '4614ceb45bfa288e2dc50700807f12153270d883':
  RED-6034 - Possible to assign a file to unauthorized users - change back from knecon_release to iqser_release
  RED-6034 - Possible to assign a file to unauthorized users - update from iqser to knecon
  RED-6034 - Possible to assign a file to unauthorized users - rework user provider
  RED-6034 - Possible to assign a file to unauthorized users - validate the assignee before triggering the under review state for the given file - update junit tests
2023-05-02 09:45:58 +02:00
devplant
4614ceb45b RED-6034 - Possible to assign a file to unauthorized users
- change back from knecon_release to iqser_release
2023-05-02 10:06:43 +03:00
devplant
0a72747b92 RED-6034 - Possible to assign a file to unauthorized users
- update from iqser to knecon
2023-05-02 08:36:26 +03:00
Viktor Seifert
2bc2e48768 RED-6270: Changed batch execution to use the batch size provided by the configuration 2023-04-28 16:05:13 +02:00
Viktor Seifert
080014021b RED-6270: Implemented the adding of dictionary entries via batch updates to improve writing speed 2023-04-28 15:33:26 +02:00
Viktor Seifert
dd78b08a77 RED-6270: Removed default connection value because it had no effect 2023-04-28 14:39:34 +02:00
devplant
6d9a62178d RED-6034 - Possible to assign a file to unauthorized users
- rework user provider
2023-04-28 15:26:17 +03:00
Viktor Seifert
0351baa0dd RED-6270: Extracted common code into own methods and corrected jdbc-string generation (not all params were concatenated correctly) 2023-04-27 18:14:35 +02:00
devplant
d9b589d8eb RED-6034 - Possible to assign a file to unauthorized users
- validate the assignee before triggering the under review state for the given file
- update junit tests
2023-04-27 13:33:24 +03:00
Dominique Eiflaender
00d6230783 Pull request #682: RED-6670: Changed accessTokenLifeSpan from 5 sec to 5 min
Merge in RED/persistence-service from RED-6670 to master

* commit 'cafef9b9149fa48bc4694c4a729032ad12cf1ff6':
  RED-6670: Changed accessTokenLifeSpan from 5 sec to 5 min
2023-04-26 11:24:55 +02:00
deiflaender
cafef9b914 RED-6670: Changed accessTokenLifeSpan from 5 sec to 5 min 2023-04-26 11:17:11 +02:00
Corina Olariu
98084fbebd Pull request #680: RED-6289 - Validate watermark color
Merge in RED/persistence-service from RED-6289 to master

* commit '5c83d67e4d53e650f844e02c358a3c2271fef1c2':
  RED-6289 - Validate watermark color - move up the validation of colors and opacity
  RED-6289 - Validate watermark color - validate the watermark color and in case of missing setting set the default one to black - also set a default opacity in case the setting is an invalid one
2023-04-26 09:15:54 +02:00
devplant
5c83d67e4d RED-6289 - Validate watermark color
- move up the validation of colors and opacity
2023-04-26 09:33:30 +03:00
Dominique Eiflaender
7cef244eb0 Pull request #681: hotfix: Enabled supportsAggressiveRelease for db connections
Merge in RED/persistence-service from hotfixDbAggressiveRelease to master

* commit '18cf4ffde5cbefa5036fbc5df21760e70477b64b':
  hotfix: Enabled supportsAggressiveRelease for db connections
2023-04-25 21:35:12 +02:00
deiflaender
18cf4ffde5 hotfix: Enabled supportsAggressiveRelease for db connections 2023-04-25 15:05:35 +02:00
devplant
afb4075fdc RED-6289 - Validate watermark color
- validate the watermark color and in case of missing setting set the default one to black
- also set a default opacity in case the setting is an invalid one
2023-04-25 11:54:20 +03:00
Dominique Eiflaender
eb46cece2c Pull request #679: RED-6670: Enabled to configure accessTokenLifeSpan for tenants
Merge in RED/persistence-service from RED-6670 to master

* commit '422715d1bc1557c9affbc20a7bd6611d2a98a93a':
  RED-6670: Enabled to configure accessTokenLifeSpan for tenants
2023-04-25 09:59:27 +02:00
deiflaender
422715d1bc RED-6670: Enabled to configure accessTokenLifeSpan for tenants 2023-04-25 09:24:44 +02:00
Timo Bejan
50b2c1b9b1 Pull request #678: RED-6407 - added unique constraints according to business logic
Merge in RED/persistence-service from RED-6407 to master

* commit 'b4b514229b451316355ab9b95e8668a94cd17f94':
  RED-6407 - added unique constraints according to business logic
2023-04-24 12:02:08 +02:00
Timo Bejan
b4b514229b RED-6407 - added unique constraints according to business logic 2023-04-24 11:51:44 +02:00
Timo Bejan
bcd79f9957 Pull request #677: RED-6407 - added unique constraints according to business logic
Merge in RED/persistence-service from RED-6407 to master

* commit '9b11f90ab95619027952e40d681e17b4dea55ea6':
  RED-6407 - added unique constraints according to business logic
2023-04-24 10:35:23 +02:00
Timo Bejan
9b11f90ab9 RED-6407 - added unique constraints according to business logic 2023-04-24 10:28:27 +02:00
Timo Bejan
534efa138d Pull request #673: RED-3800 fix permissions
Merge in RED/persistence-service from RED-3800-fix-permissions to master

* commit '4b941397df3d4de38923569ac983f0c35d9276dd':
  RED-3800 - sync custom permissions and KC users based on CRON and do it more often
2023-04-24 09:18:34 +02:00
Corina Olariu
64a857d498 Pull request #675: RED-6599 - No updated informations anymore after using /redaction-gateway-v1/user/{userId}
Merge in RED/persistence-service from bugfix/RED-6599 to master

* commit '81d21f121bf802bdfba6c2428c63b282f1b52c3e':
  RED-6599 - No updated informations anymore after using /redaction-gateway-v1/user/{userId} - use @CacheEvict on the activateProfile method
2023-04-21 16:46:03 +02:00
Viktor Seifert
3376f55655 Pull request #674: RED-6467
Merge in RED/persistence-service from RED-6467 to master

* commit '0422a98e5e8f7cef0ba2edeb9d17ed03c613f540': (25 commits)
  RED-6467: Removed debugging code
  RED-6467: Removed debugging code
  RED-6467: Removed debugging code
  RED-6467: Corrected unique name check logic
  RED-6467: Changed unique name check to not use Exceptions to prevent transaction rollbacks
  RED-6467: Added more debugging output
  RED-6467: Added more debugging output
  RED-6467: Added more debugging output
  RED-6467: Remove debug config and add some debugging output
  RED-6467: Added config to see more information about transactions in the logs
  RED-6467: Expanded dossier-template import (integration) test to use the client, to test the complete code flow
  RED-6467: Upgrade test db version to the same version as in production
  RED-6467: Rearranged code so that query-objects are not re-used to see if it fixes transaction behavior
  RED-6467: Split query into a select and a update query to prevent transaction rollbacks
  RED-6467: Added missing transaction annotation
  RED-6467: Removed debugging logs
  RED-6467: Added missing lombok annotations
  RED-6467: Implemented undeletion of dictionary entries by running a native query in chunks.
  RED-6467: Implemented undeletion of dictionary entries via the criteria builder.
  RED-6467: Implemented undeletion as operation on entities
  ...
2023-04-21 15:24:59 +02:00
devplant
81d21f121b RED-6599 - No updated informations anymore after using /redaction-gateway-v1/user/{userId}
- use @CacheEvict on the activateProfile method
2023-04-21 15:11:14 +03:00
Timo Bejan
4b941397df RED-3800 - sync custom permissions and KC users based on CRON and do it more often 2023-04-21 12:44:09 +03:00
Viktor Seifert
0422a98e5e RED-6467: Removed debugging code 2023-04-20 16:12:03 +02:00
Viktor Seifert
7f1f246f04 RED-6467: Removed debugging code 2023-04-20 15:54:53 +02:00
Viktor Seifert
d4656dc15e RED-6467: Removed debugging code 2023-04-20 15:13:58 +02:00
Viktor Seifert
d7fa9e12ca RED-6467: Corrected unique name check logic 2023-04-20 14:54:28 +02:00
Viktor Seifert
ffecae23b3 RED-6467: Changed unique name check to not use Exceptions to prevent transaction rollbacks 2023-04-20 14:27:27 +02:00
Viktor Seifert
30cf937c6b RED-6467: Added more debugging output 2023-04-20 12:27:24 +02:00
Viktor Seifert
59dbe70135 RED-6467: Added more debugging output 2023-04-20 11:39:44 +02:00
Viktor Seifert
fc642e82d2 RED-6467: Added more debugging output 2023-04-19 18:10:51 +02:00
Viktor Seifert
f4c53c722e RED-6467: Remove debug config and add some debugging output 2023-04-19 17:31:16 +02:00
Viktor Seifert
fd03adefd6 RED-6467: Added config to see more information about transactions in the logs 2023-04-19 12:35:05 +02:00
Viktor Seifert
9295725adc RED-6467: Expanded dossier-template import (integration) test to use the client, to test the complete code flow 2023-04-18 15:58:21 +02:00
Viktor Seifert
225bdd5500 RED-6467: Upgrade test db version to the same version as in production 2023-04-18 12:00:47 +02:00
Viktor Seifert
749138a77b Merge branch 'master' into RED-6467 2023-04-17 14:23:55 +02:00
Viktor Seifert
1fe598f407 RED-6467: Rearranged code so that query-objects are not re-used to see if it fixes transaction behavior 2023-04-17 12:34:07 +02:00
Viktor Seifert
d8a0ec0467 RED-6467: Split query into a select and a update query to prevent transaction rollbacks 2023-04-17 11:48:12 +02:00
Corina Olariu
6220a85c76 Pull request #672: RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely)
Merge in RED/persistence-service from bugfix/RED-6468 to master

* commit 'a2feec73e65115063366223e4347e60f5fcf37cf':
  RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely) - changed the lazy loading to eager for dossier in download status entity
2023-04-13 17:17:53 +02:00
Viktor Seifert
a029bb5bf7 RED-6467: Added missing transaction annotation 2023-04-13 17:06:58 +02:00
Viktor Seifert
66ff55f826 RED-6467: Removed debugging logs 2023-04-13 16:58:17 +02:00
Viktor Seifert
fee9fedbb2 RED-6467: Added missing lombok annotations 2023-04-13 16:35:19 +02:00
Viktor Seifert
c4648fa9fb RED-6467: Implemented undeletion of dictionary entries by running a native query in chunks.
This avoids a limitation in the JDBC driver.
2023-04-13 15:34:07 +02:00
Corina Olariu
413ff8fa8a Pull request #668: RED-6548 - Username not saved / Email saved as username
Merge in RED/persistence-service from bugfix/RED-6548 to master

* commit '47df255e12a67059bf9f318fe03756ea15fa0d28':
  RED-6362 - Cannot add KMS signature - rework after review
  RED-6548 - Username not saved / Email saved as username - extend createUserRequest with username - update the username with the one provided - update also the username in case of updating profile with a new email address
2023-04-13 14:45:45 +02:00
Christoph Schabert
7ce9405cd6 Pull request #671: hotfix: extend azure connection string for SAS
Merge in RED/persistence-service from hotfix/sas to master

* commit 'd34aaff5000dffa6ea53b9014e5845c9a1c29aca':
  hotfix: extend azure connection string for SAS
2023-04-13 12:57:26 +02:00
Viktor Seifert
62dbe67d63 RED-6467: Implemented undeletion of dictionary entries via the criteria builder.
Hopefully, this solves the db-driver issue with large numbers of entries.
2023-04-13 12:08:48 +02:00
devplant
a2feec73e6 RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely)
- changed the lazy loading to eager for dossier in download status entity
2023-04-13 12:33:44 +03:00
Christoph Schabert
d34aaff500 hotfix: extend azure connection string for SAS 2023-04-13 11:27:50 +02:00
Viktor Seifert
e72c68843c RED-6467: Implemented undeletion as operation on entities 2023-04-12 18:22:53 +02:00
Viktor Seifert
7a6a357d03 RED-6467: Corrected criteria query 2023-04-12 17:38:27 +02:00
Christoph Schabert
079d48c0e4 Pull request #670: hotfix: Change Azure connection string db field limit
Merge in RED/persistence-service from AzureConectionString to master

* commit '3fa4693bd5765ce5bd7583d15f2291c776e56fea':
  hotfix: Change Azure connection string db field limit
2023-04-12 16:10:21 +02:00
Christoph Schabert
3fa4693bd5 hotfix: Change Azure connection string db field limit 2023-04-12 16:02:30 +02:00
Viktor Seifert
5092b00f41 RED-6467: Implemented undeletion of dictionary entries via the criteria builder.
Hopefully, this solves the db-driver issue with large numbers of entries.
2023-04-12 13:02:07 +02:00
devplant
47df255e12 RED-6362 - Cannot add KMS signature
- rework after review
2023-04-12 09:49:34 +03:00
Viktor Seifert
b14d56195e RED-6467: Fix test by using a comparison method that is not dependent on a specific sorting being provided by the client 2023-04-11 16:14:19 +02:00
Viktor Seifert
05e03b8982 RED-6467: Added some debugging information 2023-04-11 15:17:44 +02:00
Viktor Seifert
78fcb0a394 RED-6467: Added some debugging information 2023-04-11 14:34:02 +02:00
devplant
6f39a6582f RED-6548 - Username not saved / Email saved as username
- extend createUserRequest with username
- update the username with the one provided
- update also the username in case of updating profile with a new email address
2023-04-11 13:42:06 +03:00
Corina Olariu
796cc3c8cc Pull request #666: RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
Merge in RED/persistence-service from RED-5504-message to master

* commit 'd92409dadbeb8a48a377d079a5d49ac6d0476d43':
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - extract the name of the unique constraint
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - update the sql messages
2023-04-10 10:32:42 +02:00
Corina Olariu
f2a53d4da4 Pull request #667: RED-6362 - Cannot add KMS signature
Merge in RED/persistence-service from bugfix/RED-6362-kms to master

* commit '52480314c35562b8f15e7cee4e6b5f87538b1a3a':
  RED-6362 - Cannot add KMS signature - update saveDigitalSignatureKms signature - move the convert from DigitalSignatureKms to DigitalSignatureKmsEntity to the service - remove the magicConvertor which cause problem for the certificate
2023-04-10 10:32:31 +02:00
devplant
52480314c3 RED-6362 - Cannot add KMS signature
- update saveDigitalSignatureKms signature
- move the convert from DigitalSignatureKms to DigitalSignatureKmsEntity to the service
- remove the magicConvertor which cause problem for the certificate
2023-04-07 16:29:42 +03:00
devplant
d92409dadb RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- extract the name of the unique constraint
2023-04-07 16:22:07 +03:00
Corina Olariu
1fb1066436 Pull request #665: RED-6496 - By create new dossier states: DossierTemplateId and ColorCode mixed up
Merge in RED/persistence-service from bugfix/RED-6496 to master

* commit '64ff80c444cb23719e1e1b55eb04aaa24722cc28':
  RED-6496 - By create new dossier states: DossierTemplateId and ColorCode mixed up - switch the dossierTemplateId with color when retrieving information from repository into model DossierStatusInfo
2023-04-06 21:47:34 +02:00
devplant
64ff80c444 RED-6496 - By create new dossier states: DossierTemplateId and ColorCode mixed up
- switch the dossierTemplateId with color when retrieving information from repository into model DossierStatusInfo
2023-04-06 16:36:37 +03:00
devplant
be0978a299 RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- update the sql messages
2023-04-06 16:34:26 +03:00
Timo Bejan
76d264ec43 Pull request #664: RED-6523 - ui multitenancy issue for dev realms
Merge in RED/persistence-service from RED-6523-ui-multitenancy to master

* commit 'd8d37170667996f08ed2c31e507a278c4d9533f8':
  RED-6523 - ui multitenancy issue for dev realms
2023-04-05 15:22:37 +02:00
Viktor Seifert
4df0a54c9e Pull request #663: RED-6501
Merge in RED/persistence-service from RED-6501 to master

* commit '45d23e3ff48ed858e359a86703ceffce5fd2fb98':
  RED-6501: Re-added a simpler manual definition of deletion methods.
  RED-6501: Removed unneeded manually implemented delete queries
  RED-6501: Corrected manual-redaction deletion.
2023-04-05 14:00:32 +02:00
Timo Bejan
d8d3717066 RED-6523 - ui multitenancy issue for dev realms 2023-04-05 13:58:08 +03:00
Viktor Seifert
45d23e3ff4 Merge branch 'master' into RED-6501 2023-04-05 12:07:09 +02:00
Viktor Seifert
e3dbd3ea1d RED-6501: Re-added a simpler manual definition of deletion methods.
They are needed to prevent exceptions in the case of non-existing entities
2023-04-05 11:22:49 +02:00
Viktor Seifert
b81aaedeab RED-6501: Removed unneeded manually implemented delete queries 2023-04-04 16:13:07 +02:00
Corina Olariu
4c3e116447 Pull request #657: RED-5504
Merge in RED/persistence-service from RED-5504 to master

* commit '663770bf9b262c30af3f5c9ccf034bea65100dc2':
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - remove tenantsHostAndSchemaMap - update junit test
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - update junit test
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - add junit test
  RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants - add unique constraints to tenants table
2023-04-04 14:21:46 +02:00
devplant
663770bf9b RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- remove tenantsHostAndSchemaMap
- update junit test
2023-04-04 14:43:20 +03:00
Dominique Eiflaender
cf1e271546 Pull request #662: RED-6531: Enabled to set email, firstname and lastname for users at create realm
Merge in RED/persistence-service from RED-6531 to master

* commit '71d42dfdbb6062350481f02989e4893c0cc91c47':
  RED-6531: Enabled to set email, firstname and lastname for users at create realm
2023-04-04 11:21:59 +02:00
deiflaender
71d42dfdbb RED-6531: Enabled to set email, firstname and lastname for users at create realm 2023-04-04 11:08:09 +02:00
Dominique Eiflaender
d26cbbe3eb Pull request #661: RED-4515 ri
Merge in RED/persistence-service from RED-4515-ri to master

* commit '1d759c8e30abaf83a30638a4aeb39671dceb8f9f':
  RED-4515: Reimplemented datasource cache
  RED-4515: Enabled to set tenant connection pool size
2023-04-04 11:06:05 +02:00
deiflaender
1d759c8e30 RED-4515: Reimplemented datasource cache 2023-04-04 10:47:37 +02:00
deiflaender
3e1157f85f RED-4515: Enabled to set tenant connection pool size 2023-04-04 09:00:09 +02:00
Viktor Seifert
ffc4e9bd0e RED-6501: Corrected manual-redaction deletion.
Removed manual delete-query implementation because it was redundant and also contained an incorrect destination entity.
2023-04-03 16:56:34 +02:00
Dominique Eiflaender
b41aa58e54 Pull request #658: RED-6224: Fixed log output in tenant datasource cache
Merge in RED/persistence-service from RED-6224 to master

* commit 'ed33991438fa7d1871c167e6682f76416b2cc85e':
  RED-6224: Fixed log output in tenant datasource cache
2023-04-03 12:07:16 +02:00
deiflaender
ed33991438 RED-6224: Fixed log output in tenant datasource cache 2023-04-03 11:53:29 +02:00
devplant
de8d1178e7 RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- update junit test
2023-04-03 12:04:57 +03:00
devplant
308811f942 RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- add junit test
2023-04-03 09:56:39 +03:00
devplant
58accbd54d Merge branch 'master' of ssh://git.iqser.com:2222/red/persistence-service into RED-5504 2023-03-31 18:00:33 +03:00
Dominique Eiflaender
c674717ebe Pull request #656: RED-4515: Do not set schema when create datasource for tenant
Merge in RED/persistence-service from RED-4515 to master

* commit '8fd0dd5735d310927b19980fc099ef07bf18cfa2':
  RED-4515: Do not set schema when create datasource for tenant
2023-03-31 16:33:24 +02:00
deiflaender
8fd0dd5735 RED-4515: Do not set schema when create datasource for tenant 2023-03-31 16:25:38 +02:00
devplant
0decb33035 RED-5504 - Prevent using exact same database schema/buckets/index for multiple tenants
- add unique constraints to tenants table
2023-03-31 16:19:42 +03:00
Dominique Eiflaender
ab6b0a5313 Pull request #655: RED-6224: Fixed non working redis config for user cache
Merge in RED/persistence-service from RED-6224 to master

* commit '904de033a0917830ea63a5786f0fbb48abce8fe7':
  RED-6224: Fixed non working redis config for user cache
2023-03-31 13:56:31 +02:00
deiflaender
904de033a0 RED-6224: Fixed non working redis config for user cache 2023-03-31 13:01:26 +02:00
Viktor Seifert
a8c0ad42d1 Pull request #654: RED-6497 Porting to 4.0
Merge in RED/persistence-service from RED-6497 to master

* commit '78758a2a418a816f4efe0f7d64647926377ad4f7':
  RED-6497: Moved test to the same package as the class being tested
  RED-6497: Removed alternate file size check because it offers less error reporting capabilities
  RED-6497: Fixed issue where the file-size of download was saved incorrectly.
  RED-6497: Changed code to use a different method of getting a file size to have better error reporting
  RED-6497: Removed explicit variable initialization because its marked as a checkstyle violation.
  RED-6497: Removed alternate file size check because it offers less error reporting capabilities
2023-03-31 12:35:33 +02:00
Viktor Seifert
78758a2a41 RED-6497: Moved test to the same package as the class being tested 2023-03-31 12:03:40 +02:00
Viktor Seifert
4c25ac402d RED-6497: Removed alternate file size check because it offers less error reporting capabilities 2023-03-31 12:00:56 +02:00
Viktor Seifert
338b06079b RED-6497: Fixed issue where the file-size of download was saved incorrectly.
* Changed the update to the DownloadStatusEntity to use the entity object instead of using a query on JPA-repo.  This prevents values from the object being incorrectly inserted otherwise.
* Extended the DownloadPreparationTest to check the resulting download state and file size.
2023-03-31 12:00:42 +02:00
Viktor Seifert
6e9bcd7bb1 RED-6497: Changed code to use a different method of getting a file size to have better error reporting 2023-03-31 11:49:05 +02:00
Viktor Seifert
412b770e80 RED-6497: Removed explicit variable initialization because its marked as a checkstyle violation. 2023-03-31 11:48:42 +02:00
Viktor Seifert
8ef9a285b3 RED-6497: Removed alternate file size check because it offers less error reporting capabilities 2023-03-31 11:48:32 +02:00
Dominique Eiflaender
0a7043cbf9 Pull request #653: RED-4515: Set default client id for swagger-ui back to swagger-ui-client
Merge in RED/persistence-service from RED-4515 to master

* commit '41d5d0e29eb91cb29aa39aeadea75adee2c28047':
  RED-4515: Set default client id for swagger-ui back to swagger-ui-client
2023-03-31 09:45:25 +02:00
deiflaender
41d5d0e29e RED-4515: Set default client id for swagger-ui back to swagger-ui-client 2023-03-31 09:32:09 +02:00
Dominique Eiflaender
8972e81d3a Pull request #650: RED-6224: Enabled multitenancy for redis cache
Merge in RED/persistence-service from RED-6224 to master

* commit '5b7a6d5a4838fae44d20daf0ce29f39662b2484e':
  RED-6224: Enabled multitenancy for redis cache
2023-03-30 15:07:50 +02:00
deiflaender
5b7a6d5a48 RED-6224: Enabled multitenancy for redis cache 2023-03-30 14:57:52 +02:00
Dominique Eiflaender
a2261e081f Pull request #648: RED-6224: Fixed acl multitenancy datasource connection
Merge in RED/persistence-service from RED-6224 to master

* commit 'a96d5aa5cdbb1094419f90e479c8c316f54bb2fd':
  RED-6224: Fixed acl multitenancy datasource connection
2023-03-29 15:54:11 +02:00
deiflaender
a96d5aa5cd RED-6224: Fixed acl multitenancy datasource connection 2023-03-29 15:42:21 +02:00
Dominique Eiflaender
e53f82e539 Pull request #647: RED-4515: Fixed liquibase migration for tenants
Merge in RED/persistence-service from RED-4515 to master

* commit '12bf0d4eda6f7af9e116f2da2c1046a1f469f68a':
  RED-4515: Fixed liquibase migration for tenants
2023-03-29 15:34:03 +02:00
deiflaender
12bf0d4eda RED-4515: Fixed liquibase migration for tenants 2023-03-29 15:09:51 +02:00
Viktor Seifert
794788d643 Pull request #646: RED-6476
Merge in RED/persistence-service from RED-6476 to master

* commit '435657888cd9f27d5252d722e3ced1d7aac8090e':
  RED-6476: Corrected duplicate suppression after it was introduced by the merge with master
  RED-6476: Removed an unused variable (fixes a PMD violation)
  RED-6476: Fixed a PMD false-positive
  RED-6476: Changed handling of manual-remove-redactions.
2023-03-29 09:59:38 +02:00
Corina Olariu
e3348698c0 Pull request #644: Bugfix/RED-6265
Merge in RED/persistence-service from bugfix/RED-6265 to master

* commit '95f15cebd967d35a591e069b1b92e669de8c31b4':
  RED-6265 - Bulk dossier stats endpoint does not return dossier stats of dossiers, for which the current dossier does not have access permissions
  RED-6265 - Bulk dossier stats endpoint does not return dossier stats of dossiers, for which the current dossier does not have access permissions
2023-03-28 18:53:17 +02:00
devplant
95f15cebd9 Merge branch 'master' of ssh://git.iqser.com:2222/red/persistence-service into bugfix/RED-6265
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/TenantManagementService.java
2023-03-28 18:44:07 +03:00
Viktor Seifert
435657888c RED-6476: Corrected duplicate suppression after it was introduced by the merge with master 2023-03-28 17:38:35 +02:00
Viktor Seifert
393527609d Merge branch 'master' into RED-6476
# Conflicts:
#	persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/service/TenantManagementService.java
2023-03-28 17:24:08 +02:00
Timo Bejan
59b4fd137b Pull request #645: RED-4515 - tenants endpoint public
Merge in RED/persistence-service from RED-4515-sec-fix to master

* commit '3b9e212eceaafb4e7e9658900b405e9ba8593475':
  RED-4515 - tenants endpoint public
  RED-4515 - tenants endpoint public
2023-03-28 17:18:41 +02:00
Timo Bejan
3b9e212ece RED-4515 - tenants endpoint public 2023-03-28 18:12:45 +03:00
Timo Bejan
1b58c2603f RED-4515 - tenants endpoint public 2023-03-28 18:07:17 +03:00
Viktor Seifert
89ba09dea9 RED-6476: Removed an unused variable (fixes a PMD violation) 2023-03-28 16:56:14 +02:00
Viktor Seifert
1e323ee948 RED-6476: Fixed a PMD false-positive 2023-03-28 16:54:39 +02:00
Viktor Seifert
bfafe1d8b0 RED-6476: Changed handling of manual-remove-redactions.
For cases where a manual-remove-redaction was applied to a redaction, that has multiple source (e.g. dictionary + rule), we still apply it when merging the redaction-log, instead of skipping it.  This prevents a redaction from reappearing, when it has been removed by the user.
2023-03-28 15:55:24 +02:00
devplant
0e4112645d RED-6265 - Bulk dossier stats endpoint does not return dossier stats of dossiers, for which the current dossier does not have access permissions
- fix pmd rules
2023-03-28 15:31:13 +03:00
devplant
caf0b63daa RED-6265 - Bulk dossier stats endpoint does not return dossier stats of dossiers, for which the current dossier does not have access permissions
- update to VIEW_ACCESS
- remove deprecated
2023-03-28 13:09:57 +03:00
Dominique Eiflaender
92279c631b Pull request #643: RED-4644: Simplified user creation in AbstractPersistenceServerServiceTest
Merge in RED/persistence-service from RED-4644 to master

* commit 'c536e129c38fd8e9f9633dc1ff176bad6bfa89a4':
  RED-4644: Simplified user creation in AbstractPersistenceServerServiceTest
2023-03-28 09:38:29 +02:00
deiflaender
c536e129c3 RED-4644: Simplified user creation in AbstractPersistenceServerServiceTest 2023-03-28 09:25:40 +02:00
Dominique Eiflaender
1cf848486f Pull request #642: RED-6503: Do not override ocred pages on ocr successful
Merge in RED/persistence-service from RED-6503 to master

* commit '6201c042f018002ecfff23e9e637946f11099444':
  RED-6503: Do not override ocred pages on ocr successful, fixed unittest
  RED-6503: Do not override ocred pages on ocr successful
2023-03-28 09:24:10 +02:00
deiflaender
6201c042f0 RED-6503: Do not override ocred pages on ocr successful, fixed unittest 2023-03-28 09:12:45 +02:00
deiflaender
a60684cf8e RED-6503: Do not override ocred pages on ocr successful 2023-03-27 15:17:06 +02:00
Dominique Eiflaender
5646211cc1 Pull request #640: RED-4644: Enabled to create default users at createTenant
Merge in RED/persistence-service from RED-4644 to master

* commit '44ec59c992ac69204ce40685ee474a2633d742c9':
  RED-4644: Enabled to create default users at createTenant
2023-03-27 13:27:48 +02:00
deiflaender
44ec59c992 RED-4644: Enabled to create default users at createTenant 2023-03-27 13:16:21 +02:00
Dominique Eiflaender
e71adaaa37 Pull request #639: RED-4515: Get tenant from bearer token
Merge in RED/persistence-service from RED-4515 to master

* commit 'a20ed3a6af19b51345d43516095934c576110d6f':
  RED-4515: Fixed wrong setting of resource
  RED-4515: Get tenant from bearer token
2023-03-24 18:16:29 +01:00
deiflaender
a20ed3a6af RED-4515: Fixed wrong setting of resource 2023-03-24 18:09:36 +01:00
deiflaender
aea1326253 RED-4515: Get tenant from bearer token 2023-03-24 17:32:03 +01:00
Dominique Eiflaender
48df7bf273 Pull request #638: RED-4515
Merge in RED/persistence-service from RED-4515 to master

* commit '8a0591d4b967b3c7880a4e04584d259b7499af7d':
  RED-4515: Create schema on createTenant
  RED-4515: Rename master realm client to redaction as this make configuration much easier
  RED-4515: Create default user set valid redirect uis
  RED-4515: Changed swagger back to authorizationCode flow
  RED-4515: Fixed kc config
  RED-4515 - kc createRealm
  RED-4515 - kc createRealm
  RED-4515 - kc createRealm
  RED-4515: Create realm on create tenant
  RED-4515: Create realm on createTenant
2023-03-24 15:43:06 +01:00
deiflaender
8a0591d4b9 RED-4515: Create schema on createTenant 2023-03-24 15:26:09 +01:00
deiflaender
94aa4287ba RED-4515: Rename master realm client to redaction as this make configuration much easier 2023-03-24 13:18:56 +01:00
deiflaender
ac5955ca6b RED-4515: Create default user set valid redirect uis 2023-03-24 12:07:59 +01:00
deiflaender
1a41edbef9 RED-4515: Changed swagger back to authorizationCode flow 2023-03-24 10:34:14 +01:00
deiflaender
09291ea39d RED-4515: Fixed kc config 2023-03-24 09:17:02 +01:00
Timo Bejan
336a34a55e RED-4515 - kc createRealm 2023-03-23 17:29:13 +02:00
Timo Bejan
883ecf6461 RED-4515 - kc createRealm 2023-03-23 17:24:34 +02:00
Timo Bejan
91efd63311 RED-4515 - kc createRealm 2023-03-23 17:24:34 +02:00
deiflaender
e69a988e39 RED-4515: Create realm on create tenant 2023-03-23 17:24:34 +02:00
deiflaender
710a2f88ac RED-4515: Create realm on createTenant 2023-03-23 17:24:34 +02:00
Timo Bejan
d781c2263b Pull request #637: RED-4515 - Swagger multitenancy fix
Merge in RED/persistence-service from RED-4515-swagger-fix to master

* commit '208c1397c86b8171c2a1d40a2106bba102aeb099':
  RED-4515 - Swagger multitenancy fix
2023-03-23 09:03:27 +01:00
Timo Bejan
208c1397c8 RED-4515 - Swagger multitenancy fix 2023-03-23 09:56:30 +02:00
Timo Bejan
f896452ec9 Pull request #636: RED-6440 fixed point issue in manual redaction
Merge in RED/persistence-service from RED-6440 to master

* commit '4c9ea27207ecfdcf3284095e239da2c256cd5484':
  RED-6440 fixed point issue in manual redaction
2023-03-22 13:55:57 +01:00
Thomas Beyer
067a8e51dc Pull request #635: RED-4875 1
Merge in RED/persistence-service from RED-4875_1 to master

* commit '7437ed3ebc3755bd24d7613b73df3a03a98f5df0':
  RED-4875 - reformat code
  RED-4875 - update version of pdftron-service to newest (release)
  RED-4875 - set version of pdftron-service to latest
  RED-4875 - delete tmp log
  RED-4875 - add tmp log
  RED-4875 - change version of pdftron-service to newest
  RED-4875 - add new column keepHiddenText in dossiertemplate and corresponding classes/methods, and set version of pdftron-service to newest
2023-03-22 13:39:22 +01:00
Timo Bejan
4c9ea27207 RED-6440 fixed point issue in manual redaction 2023-03-22 14:16:20 +02:00
Timo Bejan
f476693409 Pull request #634: RED-4515 - Swagger multitenancy
Merge in RED/persistence-service from RED-4515-swagger to master

* commit '8561bca4ba0948c822c304057eb8ddbc82ed8fd0':
  RED-4515 - Swagger multitenancy
  RED-4515 - Swagger multitenancy
2023-03-22 13:09:38 +01:00
Thomas Beyer
7437ed3ebc RED-4875 - reformat code 2023-03-22 13:04:51 +01:00
Corina Olariu
d3247e41b2 Pull request #632: RED-6216
Merge in RED/persistence-service from RED-6216 to master

* commit '274e82f79935ecea0f7977b9afca4c2145732a39':
  RED-6216- Allow add-to-dict for expressions consisting of less than 2 characters
  RED-6216- Allow add-to-dict for expressions consisting of less than 2 characters
2023-03-22 13:01:29 +01:00
Thomas Beyer
5f542a31d5 RED-4875 - update version of pdftron-service to newest (release) 2023-03-22 13:01:20 +01:00
Timo Bejan
8561bca4ba RED-4515 - Swagger multitenancy 2023-03-22 14:00:51 +02:00
Dominique Eiflaender
e7e13d4508 Pull request #633: RED-4515: Intercept keycloak authentication and choose realm from tenant header
Merge in RED/persistence-service from RED-4515 to master

* commit '618e27d0e9d8094764e1ade975619c99001ef4c1':
  RED-4515: Added suppression of a false-positive PMD violation
  RED-4515: Intercept keycloak authentication and choose realm from tenant header
2023-03-22 12:38:31 +01:00
Timo Bejan
0c1afb6e58 RED-4515 - Swagger multitenancy 2023-03-22 13:19:06 +02:00
Viktor Seifert
618e27d0e9 RED-4515: Added suppression of a false-positive PMD violation 2023-03-22 11:25:46 +01:00
deiflaender
be364e2c6d RED-4515: Intercept keycloak authentication and choose realm from tenant header 2023-03-22 10:41:53 +01:00
devplant
274e82f799 RED-6216- Allow add-to-dict for expressions consisting of less than 2 characters
- update junit test
2023-03-21 15:24:03 +02:00
devplant
c0b01d202b RED-6216- Allow add-to-dict for expressions consisting of less than 2 characters
- remove limitation of at least 2 characters for expression
- add to stopwords all ascii printable characters (lower case)
2023-03-21 15:02:11 +02:00
Thomas Beyer
428088e46c RED-4875 - set version of pdftron-service to latest 2023-03-21 13:13:17 +01:00
Dominique Eiflaender
112a27561b Pull request #631: RED-6444: Download with onetime token uses tenant from request parameter
Merge in RED/persistence-service from RED-6444 to master

* commit '3f65a7ff002ffe2d37cb1d0ab9cf3c4632de18a2':
  RED-6444: Download with onetime token uses tenant from request parameter
2023-03-21 13:12:18 +01:00
Dominique Eiflaender
ae86178cc0 Pull request #630: RED-6224: Enabled multitenancy for user cache
Merge in RED/persistence-service from RED-6224 to master

* commit 'd392c1dae77a8ac46f243f586154b104867cf736':
  RED-6224: Enabled multitenancy for user cache
2023-03-21 12:58:28 +01:00
deiflaender
3f65a7ff00 RED-6444: Download with onetime token uses tenant from request parameter 2023-03-21 12:54:34 +01:00
deiflaender
d392c1dae7 RED-6224: Enabled multitenancy for user cache 2023-03-21 12:28:36 +01:00
Thomas Beyer
f85a6a7757 RED-4875 - delete tmp log 2023-03-20 14:31:20 +01:00
Thomas Beyer
67622e65f7 RED-4875 - add tmp log 2023-03-20 13:57:55 +01:00
Thomas Beyer
96e2eb6237 RED-4875 - change version of pdftron-service to newest 2023-03-20 11:32:17 +01:00
Thomas Beyer
c024b8bc59 RED-4875 - add new column keepHiddenText in dossiertemplate and corresponding classes/methods, and set version of pdftron-service to newest 2023-03-20 09:53:15 +01:00
Dominique Eiflaender
aaf59bd437 Pull request #629: RED-5481: Reuse datasource if only schema is different
Merge in RED/persistence-service from RED-5481 to master

* commit '246cc0d6deced94b2f985a46b903c9253f4660a8':
  RED-5481: Reuse datasource if only schema is different
2023-03-17 12:11:00 +01:00
deiflaender
246cc0d6de RED-5481: Reuse datasource if only schema is different 2023-03-17 11:48:28 +01:00
Dominique Eiflaender
d3b0ce243c Pull request #628: RED-4515
Merge in RED/persistence-service from RED-4515 to master

* commit '71a5f56fd5975e11160719dc8ab315c6633634af':
  RED-4515: Added workaround to keep swagger running without tenant header for now
  RED-4515: Removed workarounds that set default tenant if no tenant is available
2023-03-17 08:55:31 +01:00
deiflaender
71a5f56fd5 RED-4515: Added workaround to keep swagger running without tenant header for now 2023-03-16 13:14:25 +01:00
deiflaender
ef859f527d RED-4515: Removed workarounds that set default tenant if no tenant is available 2023-03-16 12:07:09 +01:00
Viktor Seifert
33dafca80e Pull request #626: RED-6310
Merge in RED/persistence-service from RED-6310 to master

* commit 'ac5406291ab286d793a23c674ecfe10b069cc734':
  RED-6310: Fixed and cleaned up test after the merge from release 3.6
  RED-6310: Changed element-collection fetch to eager because lazy loading runs into timing based errors
  RED-6310: Updated test for download preparation test to execute all preparation steps.
2023-03-15 11:02:51 +01:00
Thomas Beyer
12aa71d4b5 Pull request #627: RED-4874 - add new column/field keepImageMetadata in convert-method
Merge in RED/persistence-service from RED-4874_3 to master

* commit '16d7b78a3f506616131ffa32bbfb977a9786c8d8':
  RED-4874 - add new column/field keepImageMetadata in convert-method
2023-03-15 10:22:02 +01:00
Thomas Beyer
16d7b78a3f RED-4874 - add new column/field keepImageMetadata in convert-method 2023-03-15 09:41:57 +01:00
Viktor Seifert
ac5406291a RED-6310: Fixed and cleaned up test after the merge from release 3.6 2023-03-14 16:17:23 +01:00
Viktor Seifert
550c9c3bf0 RED-6310: Changed element-collection fetch to eager because lazy loading runs into timing based errors 2023-03-14 14:07:19 +01:00
Viktor Seifert
1e2388dcae RED-6310: Updated test for download preparation test to execute all preparation steps.
Previously the last step was not executed.
2023-03-14 14:07:19 +01:00
Thomas Beyer
751cc93453 Pull request #625: RED-4874 2
Merge in RED/persistence-service from RED-4874_2 to master

* commit 'dc1f1c3562f5c4546dd5810f7be398bfe6311d4b':
  RED-4874 - only slighty change of a comment for bamboo-test
  RED-4874 - add column keepImageMetadata to CreateOrUpdateDossierTemplateRequest
  RED-4874 - activated keepImageMetaData and set pdftron-version to newest
2023-03-14 10:19:15 +01:00
Timo Bejan
a8e5aa022a Pull request #623: RED-6162 - swagger fix
Merge in RED/persistence-service from RED-6162 to master

* commit '5291820052378081bdac698da658f5e7fa05e2e7':
  RED-6162 - swagger fix
2023-03-13 17:21:38 +01:00
Thomas Beyer
dc1f1c3562 RED-4874 - only slighty change of a comment for bamboo-test 2023-03-13 16:56:40 +01:00
Timo Bejan
5291820052 RED-6162 - swagger fix 2023-03-13 17:16:03 +02:00
Thomas Beyer
06d1290b5e RED-4874 - add column keepImageMetadata to CreateOrUpdateDossierTemplateRequest 2023-03-13 16:11:40 +01:00
Thomas Beyer
a7fc2619e9 RED-4874 - activated keepImageMetaData and set pdftron-version to newest 2023-03-13 15:00:31 +01:00
Dominique Eiflaender
1e6bd14b88 Pull request #622: RED-4645: Multitenancy for storage
Merge in RED/persistence-service from RED-4645 to master

* commit 'eb2580e8428afc4e1888d80b988076cd96a5eff5':
  RED-4645: Multitenancy for storage
2023-03-10 16:39:43 +01:00
Timo Bejan
b4cdc43499 Pull request #621: RED-6162 - bumped version
Merge in RED/persistence-service from RED-6162 to master

* commit 'f30714b123aa2605cc6d5b81d3b20793edc50ada':
  RED-6162 - bumped version
  RED-6162 - bumped version
  RED-6162 - bumped version
2023-03-10 15:22:53 +01:00
deiflaender
eb2580e842 RED-4645: Multitenancy for storage 2023-03-10 15:16:03 +01:00
Timo Bejan
f30714b123 RED-6162 - bumped version 2023-03-10 16:09:32 +02:00
Timo Bejan
7a2d756d3a RED-6162 - bumped version 2023-03-10 16:02:06 +02:00
Timo Bejan
f731f732d7 RED-6162 - bumped version 2023-03-10 15:50:55 +02:00
Timo Bejan
e26fba1c63 Pull request #620: RED-6162 - fixed swagger url
Merge in RED/persistence-service from RED-6162 to master

* commit 'cf6af4ba916b2666df6aab21730fc16fa69e2585':
  RED-5255 - ported to merged version - pmd fix
  RED-5255 - ported to merged version
  RED-6162 - fixed swagger url
2023-03-10 13:22:42 +01:00
Timo Bejan
cf6af4ba91 RED-5255 - ported to merged version - pmd fix 2023-03-10 13:26:23 +02:00
Timo Bejan
273563076b RED-5255 - ported to merged version 2023-03-10 13:24:39 +02:00
Timo Bejan
c58c9012bf RED-6162 - fixed swagger url 2023-03-10 12:57:18 +02:00
Timo Bejan
917474bd1c Pull request #619: RED-6162 Redaction Gateway - Persistence Service Merge Updates
Merge in RED/persistence-service from RED-6162 to master

* commit '2126073c59432b68fc6405157deda7e80502a503':
  RED-6162 - test fixes
  RED-6162 - redis test container
  RED-6162 - transactional fixes
  RED-6162 - migration fixes
  RED-6162 - pmd fix and gw ports
  RED-6162
2023-03-10 11:27:29 +01:00
Timo Bejan
2126073c59 RED-6162 - test fixes 2023-03-10 10:56:58 +02:00
Timo Bejan
47e0e16fd9 RED-6162 - redis test container 2023-03-10 10:47:41 +02:00
Timo Bejan
cabdb5a507 RED-6162 - transactional fixes 2023-03-10 10:39:59 +02:00
Timo Bejan
5f772026b7 RED-6162 - migration fixes 2023-03-10 09:02:07 +02:00
Timo Bejan
1b13a19c70 RED-6162 - pmd fix and gw ports 2023-03-10 09:01:25 +02:00
Timo Bejan
72b0a3d933 RED-6162 2023-03-10 08:58:51 +02:00
Timo Bejan
94061a38de Pull request #617: RED-6254 - hotfix
Merge in RED/persistence-service from tbejan/EncryptionDecryptionServicejava-1678290630008 to master

* commit 'd6948571c5839105762d9efe0051ed43a5e503b3':
  RED-6254 - hotfix
2023-03-08 16:53:27 +01:00
Timo Bejan
d6948571c5 RED-6254 - hotfix 2023-03-08 16:50:50 +01:00
Viktor Seifert
dcc83474e6 Pull request #616: RED-6310
Merge in RED/persistence-service from RED-6310 to master

* commit '45bd8e600328ce85c8457525b605da2c16dd70c8':
  RED-6310: Moved code to create user-preferences to a separate class so that the calling code can handle a persistence exception
  RED-6310: Corrected services so that they use the user id instead of wrongly using the entity id
  RED-6310: Moved code for multithreaded tests to a helper class
  RED-6310: Removed not needed code from test
  RED-6310: Added setup of tenant id to fix the service test
  RED-6310: Added tests to check if concurrent access to notification-preferences works
  RED-6310: Refomatted sql query for readability
2023-03-08 09:32:53 +01:00
Viktor Seifert
45bd8e6003 RED-6310: Moved code to create user-preferences to a separate class so that the calling code can handle a persistence exception 2023-03-07 18:43:11 +01:00
Dominique Eiflaender
315e26f571 Pull request #615: RED-6254
Merge in RED/persistence-service from RED-6254 to master

* commit 'ec7ad9a0e86a6a0616acc6cc670e3d4e4ee90067':
  RED-6254: Store all connection information in master database
  RED-5481: Split jdbc-url field into multiple fields
2023-03-07 16:57:14 +01:00
deiflaender
ec7ad9a0e8 RED-6254: Store all connection information in master database 2023-03-07 16:51:00 +01:00
Viktor Seifert
643ffc8723 RED-6310: Corrected services so that they use the user id instead of wrongly using the entity id 2023-03-07 13:34:05 +01:00
Viktor Seifert
40d6961742 RED-6310: Moved code for multithreaded tests to a helper class 2023-03-07 11:36:44 +01:00
Viktor Seifert
fd7f39bc7e RED-6310: Removed not needed code from test 2023-03-07 10:57:33 +01:00
Viktor Seifert
b1d79970c0 RED-6310: Added setup of tenant id to fix the service test 2023-03-07 10:53:47 +01:00
Viktor Seifert
ef36f5c10f RED-6310: Added tests to check if concurrent access to notification-preferences works 2023-03-06 18:58:07 +01:00
Viktor Seifert
1fb8e0c135 RED-6310: Refomatted sql query for readability 2023-03-06 18:48:37 +01:00
Viktor Seifert
63741b08d6 RED-5481: Split jdbc-url field into multiple fields
Replaced the single jdbc-url field with multiple fields for each url part.  This makes it possible to use just a part of the db-connection.  We need the schema for multitenancy.
2023-03-06 11:55:14 +01:00
Corina Olariu
a32d2bbd41 Pull request #614: RED-4988 junit
Merge in RED/persistence-service from RED-4988-junit to master

* commit 'c735a5d0eff5f6c00a893c3fa0cfe103e405c006':
  RED-4988- Check jacoco version in poms and update to a current compatible version
  RED-4988- Check jacoco version in poms and update to a current compatible version
  RED-4988- Check jacoco version in poms and update to a current compatible version
  RED-4988- Check jacoco version in poms and update to a current compatible version
  RED-4988- Check jacoco version in poms and update to a current compatible version
2023-03-02 09:41:50 +01:00
devplant
c735a5d0ef RED-4988- Check jacoco version in poms and update to a current compatible version
- update junit test
2023-03-01 15:57:18 +02:00
devplant
9b5c6b876e RED-4988- Check jacoco version in poms and update to a current compatible version
- update junit failure
2023-03-01 14:59:51 +02:00
devplant
119c5aeb33 RED-4988- Check jacoco version in poms and update to a current compatible version
- update junit test failure
2023-03-01 14:51:41 +02:00
devplant
ec002c399b RED-4988- Check jacoco version in poms and update to a current compatible version
- update junit test
2023-03-01 14:47:18 +02:00
devplant
dc1ccebcbe RED-4988- Check jacoco version in poms and update to a current compatible version
- update junit tests from 4 to 5
2023-03-01 14:38:44 +02:00
Shamel Hussain
fd7b36f9f7 Pull request #613: RED-5718: Update base image version to allow using random user ids
Merge in RED/persistence-service from shussain/Dockerfile-1677589736908 to master

* commit '1143ca31f4bbb5f2e294868872f322188eb52a2b':
  RED-5718: Update base image version to allow using random user ids
2023-02-28 14:56:50 +01:00
Shamel Hussain
1143ca31f4 RED-5718: Update base image version to allow using random user ids 2023-02-28 14:09:03 +01:00
Shamel Hussain
478247a136 Pull request #612: RED-5718: Add a specific user to the persistence service
Merge in RED/persistence-service from RED-5718-persistenceUser1001 to master

* commit 'eb4eef486e09cc84d73b279e3ca0b84451ffb223':
  RED-5718: Add a specific user to the persistence service
2023-02-27 09:23:12 +01:00
shamel-hussain
eb4eef486e RED-5718: Add a specific user to the persistence service 2023-02-27 08:12:47 +01:00
Corina Olariu
cbd84e9e25 Pull request #611: RED-4988- Check jacoco version in poms and update to a current compatible version
Merge in RED/persistence-service from RED-4988 to master

* commit '5e302a74c28a80dbbbf263c40867d0868da0d0a0':
  RED-4988- Check jacoco version in poms and update to a current compatible version
2023-02-20 15:20:19 +01:00
devplant
5e302a74c2 RED-4988- Check jacoco version in poms and update to a current compatible version
- update platform dependency and platform commons dependency
2023-02-20 13:12:53 +02:00
1462 changed files with 590295 additions and 21883 deletions

15
.dev/docker-compose.yaml Normal file → Executable file
View File

@ -1,7 +1,18 @@
version: '2'
services:
keycloak:
image: quay.io/keycloak/keycloak:20.0
command: start-dev
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- 8080:8080
redis:
image: redis
ports:
- "6379:6379"
db:
image: postgres
restart: always
@ -10,7 +21,7 @@ services:
environment:
POSTGRES_USER: redaction
POSTGRES_PASSWORD: redaction
POSTGRES_DB: redaction
POSTGRES_DB: master
rabbitmq:
image: 'rabbitmq:3.9-alpine'
mem_limit: 500m

8
.gitignore vendored
View File

@ -26,3 +26,11 @@
**/.DS_Store
**/classpath-data.json
**/dependencies-and-licenses-overview.txt
gradle.properties
gradlew
gradlew.bat
gradle/
**/.gradle
**/build

24
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,24 @@
variables:
SONAR_PROJECT_KEY: 'RED_persistence-service'
include:
- project: 'gitlab/gitlab'
ref: 'main'
file: 'ci-templates/gradle_java.yml'
deploy:
stage: deploy
tags:
- dind
script:
- echo "Building with gradle version ${BUILDVERSION}"
- gradle -Pversion=${BUILDVERSION} publish
- gradle bootBuildImage --publishImage -PbuildbootDockerHostNetwork=true -Pversion=${BUILDVERSION}
- echo "BUILDVERSION=$BUILDVERSION" >> version.env
artifacts:
reports:
dotenv: version.env
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ /^release/
- if: $CI_COMMIT_BRANCH =~ /^feature/
- if: $CI_COMMIT_TAG

57
README.md Normal file
View File

@ -0,0 +1,57 @@
![badge](https://img.shields.io/badge/license-knecon-brightgreen)
## Description
*TODO*
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Tests](#tests)
- [API](#api)
## Installation
*TODO*
## Usage
*TODO*
## License
![badge](https://img.shields.io/badge/license-knecon-brightgreen)<br />
This application is covered by the proprietary knecon license.
## Tests
*TODO*
## API
### Files
The OpenAPI specifications for RedactManager and Documine are located here:<br> `./persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api`
The Redocly configuration file `redocly.yaml` is located in the root directory of the project. It contains the settings for linting the specifications and generating the API documentation. If you run the redocly commands from there, you do not need to specify the path to the configuration file.
The Redocly files are located in the `redocly` directory:
* The `templates` directory contains the [Handlebars](https://handlebarsjs.com/) templates for RedactManager and Documine, respectively.
* The `build` directory is the default output directory for the generated API documentation.
### Redocly Installation
Execute the following command to install the Redocly CLI.
```bash
npm install -g @redocly/cli@latest
```
### Redocly Linting
Execute the following commands in the root directory of the project to lint the OpenAPI specifications.
Please refer to the Redocly documentation for detailed information on the linting rules.
```bash
redocly lint redactmanager
redocly lint documine
```
### Redocly Docs Generation
Execute the following commands in the root directory of the project to generate the API documentation.
```bash
redocly build-docs redactmanager --output ./redocly/build/redactmanager.html
redocly build-docs documine --output ./redocly/build/documine.html
```

View File

@ -1,37 +0,0 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs-parent</artifactId>
<version>8.1.3</version>
<relativePath/>
</parent>
<artifactId>bamboo-specs</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs-api</artifactId>
</dependency>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!-- run 'mvn test' to perform offline validation of the plan -->
<!-- run 'mvn -Ppublish-specs' to upload the plan to your Bamboo server -->
</project>

View File

@ -1,126 +0,0 @@
package buildjob;
import static com.atlassian.bamboo.specs.builders.task.TestParserTask.createJUnitParserTask;
import java.time.LocalTime;
import com.atlassian.bamboo.specs.api.BambooSpec;
import com.atlassian.bamboo.specs.api.builders.BambooKey;
import com.atlassian.bamboo.specs.api.builders.Variable;
import com.atlassian.bamboo.specs.api.builders.docker.DockerConfiguration;
import com.atlassian.bamboo.specs.api.builders.permission.PermissionType;
import com.atlassian.bamboo.specs.api.builders.permission.Permissions;
import com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions;
import com.atlassian.bamboo.specs.api.builders.plan.Job;
import com.atlassian.bamboo.specs.api.builders.plan.Plan;
import com.atlassian.bamboo.specs.api.builders.plan.PlanIdentifier;
import com.atlassian.bamboo.specs.api.builders.plan.Stage;
import com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup;
import com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement;
import com.atlassian.bamboo.specs.api.builders.project.Project;
import com.atlassian.bamboo.specs.builders.task.CheckoutItem;
import com.atlassian.bamboo.specs.builders.task.InjectVariablesTask;
import com.atlassian.bamboo.specs.builders.task.ScriptTask;
import com.atlassian.bamboo.specs.builders.task.VcsCheckoutTask;
import com.atlassian.bamboo.specs.builders.task.VcsTagTask;
import com.atlassian.bamboo.specs.builders.trigger.BitbucketServerTrigger;
import com.atlassian.bamboo.specs.builders.trigger.ScheduledTrigger;
import com.atlassian.bamboo.specs.model.task.InjectVariablesScope;
import com.atlassian.bamboo.specs.model.task.ScriptTaskProperties.Location;
import com.atlassian.bamboo.specs.util.BambooServer;
/**
* Plan configuration for Bamboo.
* Learn more on: <a href="https://confluence.atlassian.com/display/BAMBOO/Bamboo+Specs">https://confluence.atlassian.com/display/BAMBOO/Bamboo+Specs</a>
*/
@BambooSpec
public class PlanSpec {
private static final String SERVICE_NAME = "persistence-service";
private static final String SERVICE_KEY = SERVICE_NAME.toUpperCase().replaceAll("-", "");
/**
* Run main to publish plan on Bamboo
*/
public static void main(final String[] args) throws Exception {
//By default, credentials are read from the '.credentials' file.
BambooServer bambooServer = new BambooServer("http://localhost:8085");
Plan buildPlan = new PlanSpec().createPlanBuild();
bambooServer.publish(buildPlan);
PlanPermissions buildPlanPermission = new PlanSpec().createPlanPermission(buildPlan.getIdentifier());
bambooServer.publish(buildPlanPermission);
Plan secPlan = new PlanSpec().createSecBuild();
bambooServer.publish(secPlan);
PlanPermissions secPlanPermission = new PlanSpec().createPlanPermission(secPlan.getIdentifier());
bambooServer.publish(secPlanPermission);
}
private PlanPermissions createPlanPermission(PlanIdentifier planIdentifier) {
Permissions permission = new Permissions().userPermissions("atlbamboo",
PermissionType.EDIT,
PermissionType.VIEW,
PermissionType.ADMIN,
PermissionType.CLONE,
PermissionType.BUILD)
.groupPermissions("development", PermissionType.EDIT, PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD)
.groupPermissions("devplant", PermissionType.EDIT, PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD)
.loggedInUserPermissions(PermissionType.VIEW)
.anonymousUserPermissionView();
return new PlanPermissions(planIdentifier.getProjectKey(), planIdentifier.getPlanKey()).permissions(permission);
}
private Project project() {
return new Project().name("RED").key(new BambooKey("RED"));
}
public Plan createPlanBuild() {
return new Plan(project(), SERVICE_NAME, new BambooKey(SERVICE_KEY)).description("Build Plan for Persitence Service")
.variables(new Variable("maven_add_param", ""))
.stages(new Stage("Default Stage").jobs(new Job("Default Job", new BambooKey("JOB1")).tasks(new ScriptTask().description("Clean")
.inlineBody("#!/bin/bash\n" + "set -e\n" + "rm -rf ./*"),
new VcsCheckoutTask().description("Checkout Default Repository").cleanCheckout(true).checkoutItems(new CheckoutItem().defaultRepository()),
new ScriptTask().description("Build").location(Location.FILE).fileFromPath("bamboo-specs/src/main/resources/scripts/build-java.sh").argument(SERVICE_NAME),
createJUnitParserTask().description("Resultparser")
.resultDirectories("**/test-reports/*.xml, **/target/surefire-reports/*.xml, **/target/failsafe-reports/*.xml")
.enabled(true),
new InjectVariablesTask().description("Inject git Tag").path("git.tag").namespace("g").scope(InjectVariablesScope.LOCAL),
new VcsTagTask().description("${bamboo.g.gitTag}").tagName("${bamboo.g.gitTag}").defaultRepository())
.dockerConfiguration(new DockerConfiguration().image("nexus.iqser.com:5001/infra/maven:3.8.4-openjdk-17-slim")
.dockerRunArguments("--net=host")
.volume("/etc/maven/settings.xml", "/usr/share/maven/ref/settings.xml")
.volume("/var/run/docker.sock", "/var/run/docker.sock"))))
.linkedRepositories("RED / " + SERVICE_NAME)
.triggers(new BitbucketServerTrigger())
.planBranchManagement(new PlanBranchManagement().createForVcsBranch()
.delete(new BranchCleanup().whenInactiveInRepositoryAfterDays(14))
.notificationForCommitters());
}
public Plan createSecBuild() {
return new Plan(project(), SERVICE_NAME + "-Sec", new BambooKey(SERVICE_KEY + "SEC")).description("Security Analysis Plan")
.stages(new Stage("Default Stage").jobs(new Job("Default Job", new BambooKey("JOB1")).tasks(new ScriptTask().description("Clean")
.inlineBody("#!/bin/bash\n" + "set -e\n" + "rm -rf ./*"),
new VcsCheckoutTask().description("Checkout Default Repository").cleanCheckout(true).checkoutItems(new CheckoutItem().defaultRepository()),
new ScriptTask().description("Sonar").location(Location.FILE).fileFromPath("bamboo-specs/src/main/resources/scripts/sonar-java.sh").argument(SERVICE_NAME))
.dockerConfiguration(new DockerConfiguration().image("nexus.iqser.com:5001/infra/maven:3.8.4-openjdk-17-slim")
.dockerRunArguments("--net=host")
.volume("/etc/maven/settings.xml", "/usr/share/maven/conf/settings.xml")
.volume("/var/run/docker.sock", "/var/run/docker.sock"))))
.linkedRepositories("RED / " + SERVICE_NAME)
.triggers(new ScheduledTrigger().scheduleOnceDaily(LocalTime.of(23, 00)))
.planBranchManagement(new PlanBranchManagement().createForVcsBranchMatching("release.*").notificationForCommitters());
}
}

View File

@ -1,61 +0,0 @@
#!/bin/bash
set -e
SERVICE_NAME=$1
set SERVER_PORT=$(shuf -i 20000-65000 -n 1)
if [[ "$bamboo_planRepository_branchName" == "master" ]]
then
branchVersion=$(cat pom.xml | grep -Eo " <version>.*-SNAPSHOT</version>" | sed -s 's|<version>\(.*\)\..*\(-*.*\)</version>|\1|' | tr -d ' ')
latestVersion=$( semver $(git tag -l "${branchVersion}.*" ) | tail -n1 )
newVersion="$(semver $latestVersion -p -i minor)"
elif [[ "$bamboo_planRepository_branchName" == release* ]]
then
branchVersion=$(echo $bamboo_planRepository_branchName | sed -s 's|release\/\([0-9]\+\.[0-9]\+\)\.x|\1|')
latestVersion=$( semver $(git tag -l "${branchVersion}.*" ) | tail -n1 )
newVersion="$(semver $latestVersion -p -i patch)"
elif [[ "${bamboo_version_tag}" != "dev" ]]
then
newVersion="${bamboo_version_tag}"
else
mvn -f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
--no-transfer-progress \
${bamboo_maven_add_param} \
clean install \
-Djava.security.egd=file:/dev/./urandomelse
echo "gitTag=${bamboo_planRepository_1_branch}_${bamboo_buildNumber}" > git.tag
exit 0
fi
echo "gitTag=${newVersion}" > git.tag
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
versions:set \
-DnewVersion=${newVersion}
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-image-v1/pom.xml \
versions:set \
-DnewVersion=${newVersion}
mvn -f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
--no-transfer-progress \
clean deploy \
${bamboo_maven_add_param} \
-e \
-DdeployAtEnd=true \
-Dmaven.wagon.http.ssl.insecure=true \
-Dmaven.wagon.http.ssl.allowall=true \
-Dmaven.wagon.http.ssl.ignore.validity.dates=true \
-DaltDeploymentRepository=iqser_release::default::https://nexus.iqser.com/repository/red-platform-releases
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-image-v1/pom.xml \
package
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-image-v1/pom.xml \
docker:push

View File

@ -1,45 +0,0 @@
#!/bin/bash
set -e
SERVICE_NAME=$1
set SERVER_PORT=$(shuf -i 20000-65000 -n 1)
echo "build jar binaries"
mvn -f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
--no-transfer-progress \
clean install \
-Djava.security.egd=file:/dev/./urandomelse
echo "dependency-check:aggregate"
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
org.owasp:dependency-check-maven:aggregate
if [[ -z "${bamboo_repository_pr_key}" ]]
then
echo "Sonar Scan for branch: ${bamboo_planRepository_1_branch}"
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
sonar:sonar \
-Dsonar.projectKey=RED_$SERVICE_NAME \
-Dsonar.host.url=https://sonarqube.iqser.com \
-Dsonar.login=${bamboo_sonarqube_api_token_secret} \
-Dsonar.branch.name=${bamboo_planRepository_1_branch} \
-Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json \
-Dsonar.dependencyCheck.xmlReportPath=target/dependency-check-report.xml \
-Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html
else
echo "Sonar Scan for PR with key1: ${bamboo_repository_pr_key}"
mvn --no-transfer-progress \
-f ${bamboo_build_working_directory}/$SERVICE_NAME-v1/pom.xml \
sonar:sonar \
-Dsonar.projectKey=RED_$SERVICE_NAME \
-Dsonar.host.url=https://sonarqube.iqser.com \
-Dsonar.login=${bamboo_sonarqube_api_token_secret} \
-Dsonar.pullrequest.key=${bamboo_repository_pr_key} \
-Dsonar.pullrequest.branch=${bamboo_repository_pr_sourceBranch} \
-Dsonar.pullrequest.base=${bamboo_repository_pr_targetBranch} \
-Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json \
-Dsonar.dependencyCheck.xmlReportPath=target/dependency-check-report.xml \
-Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html
fi

View File

@ -1,21 +0,0 @@
package buildjob;
import org.junit.Test;
import com.atlassian.bamboo.specs.api.builders.plan.Plan;
import com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException;
import com.atlassian.bamboo.specs.api.util.EntityPropertiesBuilders;
public class PlanSpecTest {
@Test
public void checkYourPlanOffline() throws PropertiesValidationException {
Plan buildPlan = new PlanSpec().createPlanBuild();
EntityPropertiesBuilders.build(buildPlan);
Plan secPlan = new PlanSpec().createSecBuild();
EntityPropertiesBuilders.build(secPlan);
}
}

View File

@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}
repositories {
gradlePluginPortal()
}

View File

@ -0,0 +1,79 @@
plugins {
`java-library`
`maven-publish`
pmd
checkstyle
jacoco
}
val redactionServiceVersion by rootProject.extra { "4.290.0" }
val pdftronRedactionServiceVersion by rootProject.extra { "4.90.0-RED10115.0" }
val redactionReportServiceVersion by rootProject.extra { "4.81.0" }
val searchServiceVersion by rootProject.extra { "2.90.0" }
val documentVersion by rootProject.extra { "4.433.0" }
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://nexus.knecon.com/repository/gindev/");
credentials {
username = providers.gradleProperty("mavenUser").getOrNull();
password = providers.gradleProperty("mavenPassword").getOrNull();
}
}
}
group = "com.iqser.red.service"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
pmd {
isConsoleOutput = true
}
tasks.pmdMain {
pmd.ruleSetFiles = files("${rootDir}/config/pmd/pmd.xml")
}
tasks.pmdTest {
pmd.ruleSetFiles = files("${rootDir}/config/pmd/test_pmd.xml")
}
tasks.named<Test>("test") {
useJUnitPlatform()
reports {
junitXml.outputLocation.set(layout.buildDirectory.dir("reports/junit"))
}
minHeapSize = "512m"
maxHeapSize = "2048m"
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(true)
csv.required.set(false)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
java {
withJavadocJar()
}
allprojects {
tasks.withType<Javadoc> {
options {
this as StandardJavadocDocletOptions
addBooleanOption("Xdoclint:none", true)
addStringOption("Xmaxwarns", "1")
}
}
}

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property
name="severity"
value="error"/>
<module name="TreeWalker">
<module name="SuppressWarningsHolder"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="AnnotationLocation"/>
<module name="JavadocStyle"/>
<module name="NonEmptyAtclauseDescription"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="RedundantModifier"/>
<module name="EmptyBlock"/>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="ExplicitInitialization"/>
<module name="IllegalInstantiation"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleVariableDeclarations"/>
<module name="PackageDeclaration"/>
<module name="ParameterAssignment"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="OneStatementPerLine"/>
<module name="FinalClass"/>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
<module name="OuterTypeFilename"/>
</module>
<module name="FileTabCharacter"/>
<module name="SuppressWarningsFilter"/>
</module>

20
config/pmd/pmd.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
Knecon ruleset checks the code for bad stuff
</description>
<rule ref="category/java/errorprone.xml">
<exclude name="MissingSerialVersionUID"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="AvoidDuplicateLiterals"/>
<exclude name="NullAssignment"/>
<exclude name="AssignmentInOperand"/>
<exclude name="BeanMembersShouldSerialize"/>
</rule>
</ruleset>

22
config/pmd/test_pmd.xml Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
Knecon test ruleset checks the code for bad stuff
</description>
<rule ref="category/java/errorprone.xml">
<exclude name="MissingSerialVersionUID"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="AvoidDuplicateLiterals"/>
<exclude name="NullAssignment"/>
<exclude name="AssignmentInOperand"/>
<exclude name="TestClassWithoutTestCases"/>
<exclude name="BeanMembersShouldSerialize"/>
</rule>
</ruleset>

1
gradle.properties.kts Normal file
View File

@ -0,0 +1 @@
version = 2.0-SNAPSHOT

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>com.iqser.red</groupId>
<artifactId>platform-docker-dependency</artifactId>
<version>1.2.0</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>persistence-service-image-v1</artifactId>
<groupId>com.iqser.red.service</groupId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<service.server>persistence-service-server-v1</service.server>
<platform.jar>${service.server}.jar</platform.jar>
<docker.skip.push>false</docker.skip.push>
<docker.image.name>${docker.image.prefix}/${service.server}</docker.image.name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>download-platform-jar</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${service.server}</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>${platform.jar}</destFileName>
</dependency>
</artifactItems>
<outputDirectory>${docker.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${docker.image.name}</name>
<build>
<dockerFileDir>${docker.build.directory}</dockerFileDir>
<args>
<PLATFORM_JAR>${platform.jar}</PLATFORM_JAR>
</args>
<tags>
<tag>${docker.image.version}</tag>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -1,9 +0,0 @@
FROM red/base-image:2.0.0
ARG PLATFORM_JAR
ENV PLATFORM_JAR ${PLATFORM_JAR}
ENV USES_ELASTICSEARCH false
COPY ["${PLATFORM_JAR}", "/"]

View File

@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>persistence-service-v1</artifactId>
<groupId>com.iqser.red.service</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>persistence-service-api-v1</artifactId>
<dependencies>
<dependency>
<groupId>com.iqser.red.service</groupId>
<artifactId>redaction-service-api-v1</artifactId>
<exclusions>
<exclusion>
<groupId>com.iqser.red.service</groupId>
<artifactId>persistence-service-api-v1</artifactId>
</exclusion>
<exclusion>
<groupId>com.iqser.red.service</groupId>
<artifactId>pdftron-redaction-service-api-v1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.iqser.red.service</groupId>
<artifactId>pdftron-redaction-service-api-v1</artifactId>
<exclusions>
<exclusion>
<groupId>com.iqser.red.service</groupId>
<artifactId>redaction-service-api-v1</artifactId>
</exclusion>
<exclusion>
<groupId>com.iqser.red.service</groupId>
<artifactId>persistence-service-api-v1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- This dependency contains annotations that are used in specifying REST endpoints. -->
<!-- It is optional since not all users of this API might use Feign. -->
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<optional>true</optional>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<scope>compile</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>com.iqser.red.commons</groupId>
<artifactId>jackson-commons</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessors>
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor>
<annotationProcessor>com.dslplatform.json.processor.CompiledJsonAnnotationProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,8 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations;
public enum AnnotationStatus {
REQUESTED,
APPROVED,
DECLINED
}

View File

@ -1,48 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.IdRemoval;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualForceRedaction;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualImageRecategorization;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualLegalBasisChange;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualRedactionEntry;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualResizeRedaction;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ManualRedactions {
@Builder.Default
private Set<IdRemoval> idsToRemove = new HashSet<>();
@Builder.Default
private Set<ManualRedactionEntry> entriesToAdd = new HashSet<>();
@Builder.Default
private Set<ManualForceRedaction> forceRedactions = new HashSet<>();
@Builder.Default
private Set<ManualImageRecategorization> imageRecategorization = new HashSet<>();
@Builder.Default
private Set<ManualLegalBasisChange> legalBasisChanges = new HashSet<>();
@Builder.Default
private Set<ManualResizeRedaction> resizeRedactions = new HashSet<>();
@Builder.Default
private Map<String, List<Comment>> comments = new HashMap<>();
}

View File

@ -1,19 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UpdateRedactionRequest {
private List<String> annotationIds;
private AnnotationStatus annotationStatus;
}

View File

@ -1,31 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class BaseAnnotation {
private String annotationId;
private String fileId;
private String user;
private AnnotationStatus status;
private OffsetDateTime requestDate;
private OffsetDateTime processedDate;
private OffsetDateTime softDeletedTime;
public boolean isApproved() {
return AnnotationStatus.APPROVED == status;
}
}

View File

@ -1,35 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class IdRemoval extends BaseAnnotation {
private boolean removeFromDictionary;
@Builder
public IdRemoval(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
boolean removeFromDictionary) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.removeFromDictionary = removeFromDictionary;
}
}

View File

@ -1,34 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualForceRedaction extends BaseAnnotation {
private String legalBasis;
@Builder
public ManualForceRedaction(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
String legalBasis) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.legalBasis = legalBasis;
}
}

View File

@ -1,34 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualImageRecategorization extends BaseAnnotation {
private String type;
@Builder
public ManualImageRecategorization(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
String type) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.type = type;
}
}

View File

@ -1,40 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualLegalBasisChange extends BaseAnnotation {
private String section;
private String value;
private String legalBasis;
@Builder
public ManualLegalBasisChange(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
String legalBasis,
String section,
String value) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.legalBasis = legalBasis;
this.section = section;
this.value = value;
}
}

View File

@ -1,70 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.Rectangle;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualRedactionEntry extends BaseAnnotation {
private String type;
private String value;
private String reason;
private String legalBasis;
private String section;
private boolean rectangle;
private boolean addToDictionary;
private boolean addToDossierDictionary;
private List<Rectangle> positions = new ArrayList<>();
private String textBefore;
private String textAfter;
private String sourceId;
@Builder
public ManualRedactionEntry(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
String value,
String textBefore,
String textAfter,
boolean rectangle,
boolean addToDictionary,
boolean addToDossierDictionary,
String legalBasis,
String section,
String reason,
String type,
List<Rectangle> positions,
String sourceId) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.textBefore = textBefore;
this.textAfter = textAfter;
this.value = value;
this.rectangle = rectangle;
this.addToDictionary = addToDictionary;
this.addToDossierDictionary = addToDossierDictionary;
this.legalBasis = legalBasis;
this.section = section;
this.reason = reason;
this.type = type;
this.positions = positions != null ? positions : new ArrayList<>();
this.sourceId = sourceId;
}
}

View File

@ -1,47 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AnnotationStatus;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.Rectangle;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualResizeRedaction extends BaseAnnotation {
private String value;
private List<Rectangle> positions = new ArrayList<>();
private String textBefore;
private String textAfter;
private Boolean updateDictionary;
@Builder
public ManualResizeRedaction(String annotationId,
String fileId,
String user,
AnnotationStatus status,
OffsetDateTime requestDate,
OffsetDateTime processedDate,
OffsetDateTime softDeletedTime,
String value,
String textBefore,
String textAfter,
List<Rectangle> positions) {
super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
this.textBefore = textBefore;
this.textAfter = textAfter;
this.value = value;
this.positions = positions != null ? positions : new ArrayList<>();
}
}

View File

@ -1,23 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate;
import java.util.ArrayList;
import java.util.List;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.DictionarySummary;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DossierTemplateDictionaryStats {
private String dossierTemplateId;
private int numberOfDictionaries; // number of Types for the dossierTemplate
private List<DictionarySummary> dictionarySummaryList = new ArrayList<>();
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate;
public enum DossierTemplateStatus {
INCOMPLETE,
INACTIVE,
ACTIVE
}

View File

@ -1,10 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate;
public enum DownloadFileType {
ORIGINAL,
PREVIEW,
REDACTED,
ANNOTATED,
FLATTEN,
DELTA_PREVIEW
}

View File

@ -1,22 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ReportTemplateUpdateRequest {
@NonNull
private String fileName;
private boolean multiFileReport;
private boolean activeByDefault;
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration;
public enum DigitalSignatureType {
CERTIFICATE,
KMS,
HSM;
}

View File

@ -1,30 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration;
import java.time.OffsetDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Watermark {
private Long id;
private String name;
private boolean enabled;
private String dossierTemplateId;
private String text;
private String hexColor;
private int opacity;
private int fontSize;
private String fontType;
private String createdBy;
private OffsetDateTime dateAdded;
private OffsetDateTime dateModified;
private WatermarkOrientation orientation;
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration;
public enum WatermarkOrientation {
VERTICAL,
HORIZONTAL,
DIAGONAL
}

View File

@ -1,8 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier;
public enum DossierAttributeType {
TEXT,
NUMBER,
DATE,
IMAGE
}

View File

@ -1,13 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier;
import lombok.Data;
@Data
public class DossierInformation {
private int numberOfActiveDossiers;
private int numberOfArchivedDossiers;
private int numberOfSoftDeletedDossiers;
private int numberOfHardDeletedDossiers;
}

View File

@ -1,37 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier;
import java.time.OffsetDateTime;
import java.util.Map;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.ProcessingStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.WorkflowStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(of = {"dossierId"})
public class DossierStats {
private String dossierId;
private int numberOfFiles;
private int numberOfSoftDeletedFiles;
private int numberOfPages; // sum of pages
private int numberOfExcludedPages; // sum of excludedPages
private boolean hasRedactionsFilePresent; // true if at least one file in the dossier has redactions
private boolean hasHintsNoRedactionsFilePresent; // true if at least one file in the dossier has hints but doesn't have redactions
private boolean hasSuggestionsFilePresent; // true if at least one file in the dossier has suggestions
private boolean hasUpdatesFilePresent; //true if at least one file in the dossier has updates
private boolean hasNoFlagsFilePresent; // true if at least one file in the dossier has none of the other flags
private Map<ProcessingStatus, Integer> fileCountPerProcessingStatus;
private Map<WorkflowStatus, Integer> fileCountPerWorkflowStatus;
private OffsetDateTime lastFileUpdateDate;
private OffsetDateTime fileManipulationDate;
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier;
public enum DossierVisibility {
PRIVATE,
PUBLIC;
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file;
public enum FileAttributeType {
TEXT,
NUMBER,
DATE
}

View File

@ -1,30 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file;
import lombok.Getter;
public enum FileType {
UNTOUCHED(".pdf"),
ORIGIN(".pdf"),
REDACTION_LOG(".json"),
SIMPLIFIED_TEXT(".json"),
SECTION_GRID(".json"),
TEXT(".json"),
NER_ENTITIES(".json"),
IMAGE_INFO(".json"),
IMPORTED_REDACTIONS(".json"),
TEXT_HIGHLIGHTS(".json"),
FIGURE(".json"),
TABLES(".json"),
COMPONENTS(".json");
@Getter
private final String extension;
FileType(String extension) {
this.extension = extension;
}
}

View File

@ -1,8 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file;
public enum WorkflowStatus {
NEW,
UNDER_REVIEW,
UNDER_APPROVAL,
APPROVED
}

View File

@ -1,73 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.importexport;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierAttributeConfig;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierTemplate;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.FileAttributesGeneralConfiguration;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ReportTemplateUploadRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.Colors;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.Watermark;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.DossierStatusInfo;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.FileAttributeConfig;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.legalbasis.LegalBasis;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.Type;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImportTemplateResult {
public String dossierTemplateId;
public String userId;
public boolean updateExistingTemplate;
public DossierTemplate dossierTemplate;
@Builder.Default
public List<Watermark> watermarks = new ArrayList<>();
public Colors colors;
@Builder.Default
public List<DossierStatusInfo> dossierStatusInfos = new ArrayList<>();
@Builder.Default
public List<DossierAttributeConfig> dossierAttributesConfigs = new ArrayList<>();
public FileAttributesGeneralConfiguration fileAttributesGeneralConfiguration;
@Builder.Default
public List<FileAttributeConfig> fileAttributesConfigs = new ArrayList<>();
@Builder.Default
public List<LegalBasis> legalBases = new ArrayList<>();
public String ruleSet;
@Builder.Default
public List<ReportTemplateUploadRequest> reportTemplateUploadRequests = new ArrayList<>();
@Builder.Default
public List<Type> types = new ArrayList<>();
@Builder.Default
public Map<String, List<String>> entries = new HashMap<>();
@Builder.Default
public Map<String, List<String>> falsePositives = new HashMap<>();
@Builder.Default
public Map<String, List<String>> falseRecommendations = new HashMap<>();
}

View File

@ -1,22 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DictionaryEntry implements Serializable {
private long entryId;
private String value;
private long version;
private boolean deleted;
private String typeId;
}

View File

@ -1,7 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type;
public enum DictionaryEntryType {
ENTRY,
FALSE_POSITIVE,
FALSE_RECOMMENDATION
}

View File

@ -1,19 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DictionarySummary {
private String id; // type id
private String type; // type
private String name; // label
private long entriesCount; // entries size
}

View File

@ -1,8 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.download;
public enum DownloadStatusValue {
QUEUED,
GENERATING,
READY,
FAILED
}

View File

@ -1,48 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.license;
import java.time.Instant;
import java.time.Year;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(of = "requestId")
public class LicenseReportRequest {
private String requestId;
private Instant startDate;
private Instant endDate;
private List<String> dossierIds = new ArrayList<>();
public Instant getStartDate() {
if (startDate == null) {
startDate = Year.of(getEndDate().atOffset(ZoneOffset.UTC).getYear()).atMonth(1).atDay(1).atStartOfDay().toInstant(ZoneOffset.UTC);
}
return startDate;
}
public Instant getEndDate() {
if (endDate == null) {
endDate = Instant.now();
}
return endDate;
}
}

View File

@ -1,28 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.license;
import java.time.Instant;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.WorkflowStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ReportData {
private String dossier;
private String fileName;
private Instant addedDate;
private Instant lastUpdatedDate;
private Instant deletedDate;
private int numberOfAnalyzedPages;
private int numberOfOcrPages;
private WorkflowStatus workflowStatus;
private int analysisCount;
}

View File

@ -1,28 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.multitenancy;
import javax.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TenantRequest {
@NotBlank
private String tenantId;
@NotBlank
private String displayName;
private String guid;
@NotBlank
private String jdbcUrl;
@NotBlank
private String user;
@NotBlank
private String password;
}

View File

@ -1,20 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.model.multitenancy;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TenantResponse {
private String tenantId;
private String displayName;
private String guid;
private String jdbcUrl;
private String user;
}

View File

@ -1,27 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.ApplicationConfig;
@ResponseStatus(value = HttpStatus.OK)
public interface ApplicationConfigurationResource {
String APPLICATION_CONFIG_PATH = "/app-config";
@ResponseStatus(value = HttpStatus.CREATED)
@PostMapping(value = APPLICATION_CONFIG_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
ApplicationConfig createOrUpdateAppConfig(@RequestBody ApplicationConfig appConfig);
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = APPLICATION_CONFIG_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
ApplicationConfig getCurrentApplicationConfig();
}

View File

@ -1,45 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.audit.AuditModel;
import com.iqser.red.service.persistence.service.v1.api.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.model.audit.AuditSearchRequest;
import com.iqser.red.service.persistence.service.v1.api.model.audit.CategoryModel;
import com.iqser.red.service.persistence.service.v1.api.model.common.Page;
public interface AuditResource {
String PATH = "/audit";
/**
* @param auditRequest - details to audit
* @throws org.springframework.web.server.ResponseStatusException - 404 - Not Found in case the object doesn't exist
*/
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void audit(@RequestBody AuditRequest auditRequest);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = PATH + "/search", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
Page<AuditModel> search(@RequestBody AuditSearchRequest auditSearchRequest);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = PATH + "/categories", produces = MediaType.APPLICATION_JSON_VALUE)
List<CategoryModel> getCategories();
}

View File

@ -1,43 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.component.ComponentsOverrides;
import com.iqser.red.service.persistence.service.v1.api.model.component.RevertOverrideRequest;
public interface ComponentOverrideResource {
String PATH = "/component";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void addOverrides(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody ComponentsOverrides componentsOverrides);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ComponentsOverrides getOverrides(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = PATH + "/revert" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void revertOverrides(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody RevertOverrideRequest revertOverrideRequest);
}

View File

@ -1,113 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.Colors;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.DictionaryEntry;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.DictionaryEntryType;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.Type;
@ResponseStatus(value = HttpStatus.OK)
public interface DictionaryResource {
String DICTIONARY_PATH = "/dictionary";
String TYPE_PATH = DICTIONARY_PATH + "/type";
String TYPE_PARAMETER_NAME = "type";
String TYPE_PATH_VARIABLE = "/{" + TYPE_PARAMETER_NAME + "}";
String INCLUDE_DELETED_PARAMETER_NAME = "includeDeleted";
String DOSSIER_TEMPLATE_PARAMETER_NAME = "dossierTemplateId";
String DOSSIER_TEMPLATE_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_PARAMETER_NAME + "}";
String DOSSIER_ID_PARAMETER_NAME = "dossierId";
String DOSSIER_PATH = "/dossier";
String DOSSIER_ID_PATH_VARIABLE = "/{" + DOSSIER_ID_PARAMETER_NAME + "}";
String FROM_VERSION_PARAM = "fromVersion";
String COLOR_PATH = "/color";
String VERSION_PATH = "/version";
String ENTRIES_PATH = "/entries";
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = DICTIONARY_PATH + TYPE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void addEntries(@PathVariable(TYPE_PARAMETER_NAME) String typeId,
@RequestBody List<String> entries,
@RequestParam(value = "removeCurrent", required = false, defaultValue = "false") boolean removeCurrent,
@RequestParam(value = "ignoreInvalidEntries", required = false, defaultValue = "false") boolean ignoreInvalidEntries,
@RequestParam(value = "dictionaryEntryType", required = false, defaultValue = "ENTRY") DictionaryEntryType dictionaryEntryType);
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = DICTIONARY_PATH + TYPE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void deleteEntries(@PathVariable(TYPE_PARAMETER_NAME) String typeId,
@RequestBody List<String> entries,
@RequestParam(value = "dictionaryEntryType", required = false, defaultValue = "ENTRY") DictionaryEntryType dictionaryEntryType);
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = TYPE_PATH + TYPE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateTypeValue(@PathVariable(TYPE_PARAMETER_NAME) String typeId, @RequestBody Type typeValue);
@ResponseStatus(HttpStatus.CREATED)
@PostMapping(value = TYPE_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
Type addType(@RequestBody Type typeValue);
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = TYPE_PATH + TYPE_PATH_VARIABLE)
void deleteType(@PathVariable(TYPE_PARAMETER_NAME) String typeId);
@GetMapping(value = TYPE_PATH + DOSSIER_TEMPLATE_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<Type> getAllTypesForDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = INCLUDE_DELETED_PARAMETER_NAME, required = false, defaultValue = "false") boolean includeDeleted);
@GetMapping(value = TYPE_PATH + DOSSIER_PATH + DOSSIER_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<Type> getAllTypesForDossier(@PathVariable(DOSSIER_ID_PARAMETER_NAME) String dossierId,
@RequestParam(value = INCLUDE_DELETED_PARAMETER_NAME, required = false, defaultValue = "false") boolean includeDeleted);
@GetMapping(value = DICTIONARY_PATH + TYPE_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
Type getDictionaryForType(@PathVariable(TYPE_PARAMETER_NAME) String typeId, @RequestParam(value = FROM_VERSION_PARAM, required = false) Long fromVersion);
@GetMapping(value = DICTIONARY_PATH + TYPE_PATH_VARIABLE + ENTRIES_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<DictionaryEntry> getEntriesForType(@PathVariable(TYPE_PARAMETER_NAME) String typeId,
@RequestParam(value = FROM_VERSION_PARAM, required = false) Long fromVersion,
@RequestParam(value = "dictionaryEntryType", required = false, defaultValue = "ENTRY") DictionaryEntryType dictionaryEntryType);
@GetMapping(value = VERSION_PATH + DOSSIER_TEMPLATE_PATH_VARIABLE)
long getVersion(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId);
@GetMapping(value = VERSION_PATH + DOSSIER_PATH + DOSSIER_ID_PATH_VARIABLE)
long getVersionForDossier(@PathVariable(DOSSIER_ID_PARAMETER_NAME) String dossierId);
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = COLOR_PATH + DOSSIER_TEMPLATE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void setColors(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId, @RequestBody Colors colors);
@ResponseBody
@GetMapping(value = COLOR_PATH + DOSSIER_TEMPLATE_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
Colors getColors(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId);
}

View File

@ -1,69 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.DigitalSignature;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.DigitalSignatureKms;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.DigitalSignatureType;
@ResponseStatus(value = HttpStatus.OK)
public interface DigitalSignatureResource {
String DIGITAL_SIGNATURE_PATH = "/digital-signature";
String DIGITAL_SIGNATURE_TYPE_PATH = DIGITAL_SIGNATURE_PATH + "/type";
String DIGITAL_SIGNATURE_KMS_PATH = DIGITAL_SIGNATURE_PATH + "/kms";
String DIGITAL_SIGNATURE_TYPE = "digitalSignatureType";
String DIGITAL_SIGNATURE_TYPE_VARIABLE = "/{" + DIGITAL_SIGNATURE_TYPE + "}";
@GetMapping(value = DIGITAL_SIGNATURE_TYPE_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
DigitalSignatureType getActiveDigitalSignatureType();
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = DIGITAL_SIGNATURE_TYPE_PATH + DIGITAL_SIGNATURE_TYPE_VARIABLE)
void setActiveDigitalSignatureType(@PathVariable(DIGITAL_SIGNATURE_TYPE) DigitalSignatureType digitalSignatureType);
@ResponseStatus(HttpStatus.CREATED)
@PostMapping(value = DIGITAL_SIGNATURE_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DigitalSignature saveDigitalSignature(@RequestBody DigitalSignature digitalSignatureModel);
@ResponseStatus(HttpStatus.CREATED)
@PutMapping(value = DIGITAL_SIGNATURE_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
void updateDigitalSignature(@RequestBody DigitalSignature digitalSignatureModel);
@GetMapping(value = DIGITAL_SIGNATURE_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
DigitalSignature getDigitalSignature();
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = DIGITAL_SIGNATURE_PATH)
void deleteDigitalSignature();
@ResponseStatus(HttpStatus.CREATED)
@PostMapping(value = DIGITAL_SIGNATURE_KMS_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DigitalSignatureKms saveDigitalSignatureKms(@RequestBody DigitalSignatureKms digitalSignature);
@GetMapping(value = DIGITAL_SIGNATURE_KMS_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
DigitalSignatureKms getDigitalSignatureKms();
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = DIGITAL_SIGNATURE_KMS_PATH)
void deleteDigitalSignatureKms();
}

View File

@ -1,57 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierAttributeConfig;
public interface DossierAttributesConfigResource {
String DOSSIER_ATTRIBUTE_PATH = "/dossier-attribute";
String DOSSIER_TEMPLATE_ID = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_ID + "}";
String DOSSIER_ATTRIBUTE_ID = "dossierAttributeId";
String DOSSIER_ATTRIBUTE_ID_PATH_VARIABLE = "/{" + DOSSIER_ATTRIBUTE_ID + "}";
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PostMapping(value = DOSSIER_ATTRIBUTE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierAttributeConfig addOrUpdateDossierAttribute(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestBody DossierAttributeConfig dossierAttributeConfig);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PutMapping(value = DOSSIER_ATTRIBUTE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierAttributeConfig> setDossierAttributesConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId,
@RequestBody List<DossierAttributeConfig> dossierAttributesConfig);
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = DOSSIER_ATTRIBUTE_PATH + DOSSIER_ATTRIBUTE_ID_PATH_VARIABLE)
void deleteDossierAttribute(@PathVariable(DOSSIER_ATTRIBUTE_ID) String dossierAttributeId);
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = DOSSIER_ATTRIBUTE_PATH + "/delete")
void deleteDossierAttributes(@RequestBody List<String> dossierAttributeIds);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@GetMapping(value = DOSSIER_ATTRIBUTE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierAttributeConfig> getDossierAttributes(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
}

View File

@ -1,42 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.DossierAttribute;
public interface DossierAttributesResource {
String REST_PATH = "/dossierAttributes";
String SET_PATH = "/set";
String UPDATE_PATH = "/update";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String DOSSIER_ATTRIBUTE_ID_PARAM = "dossierAttributeId";
String DOSSIER_ATTRIBUTE_ID_PATH_PARAM = "/{" + DOSSIER_ATTRIBUTE_ID_PARAM + "}";
@PostMapping(value = REST_PATH + SET_PATH + DOSSIER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierAttribute> setDossierAttributes(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody List<DossierAttribute> dossierAttributes);
@PostMapping(value = REST_PATH + UPDATE_PATH + DOSSIER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierAttribute addOrUpdateDossierAttribute(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody DossierAttribute dossierAttribute);
@GetMapping(value = REST_PATH + DOSSIER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierAttribute> getDossierAttributes(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@DeleteMapping(value = REST_PATH + SET_PATH + DOSSIER_ID_PATH_PARAM + DOSSIER_ATTRIBUTE_ID_PATH_PARAM)
void deleteDossierAttribute(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(DOSSIER_ATTRIBUTE_ID_PARAM) String dossierAttributeId);
}

View File

@ -1,115 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Set;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.CreateOrUpdateDossierRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.Dossier;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.DossierChange;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.DossierInformation;
@ResponseStatus(value = HttpStatus.OK)
public interface DossierResource {
String REST_PATH = "/dossier";
String DOSSIER_TEMPLATE_PATH = "/dossier-template";
String INFO_PATH = "/dossier-info";
String DELETED_DOSSIERS_PATH = "/deletedDossiers";
String HARD_DELETE_PATH = "/hardDelete";
String UNDELETE_PATH = "/undelete";
String ARCHIVE_DOSSIERS_PATH = "/archivedDossiers";
String ARCHIVE_PATH = "/archive";
String UNARCHIVE_PATH = "/unarchive";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String DOSSIER_TEMPLATE_ID_PARAM = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_PARAM = "/{" + DOSSIER_TEMPLATE_ID_PARAM + "}";
String INCLUDE_DELETED_PARAM = "includeDeleted";
String INCLUDE_ARCHIVED_PARAM = "includeArchived";
String CHANGES_PATH = "/changes";
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = REST_PATH + CHANGES_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
Set<DossierChange> changesSince(@RequestBody JSONPrimitive<OffsetDateTime> since);
@PostMapping(value = REST_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
Dossier addDossier(@RequestBody CreateOrUpdateDossierRequest dossierRequest);
@PostMapping(value = REST_PATH + DOSSIER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
Dossier updateDossier(@RequestBody CreateOrUpdateDossierRequest dossierRequest, @PathVariable(DOSSIER_ID_PARAM) String dossierId);
@DeleteMapping(value = REST_PATH + DOSSIER_ID_PATH_PARAM)
void delete(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@GetMapping(value = REST_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<Dossier> getAllDossiers(@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted);
@GetMapping(value = REST_PATH + DOSSIER_TEMPLATE_PATH + DOSSIER_TEMPLATE_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<Dossier> getAllDossiersForDossierTemplateId(@PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted);
@PostMapping(value = INFO_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierInformation getDossierInformation(@RequestBody List<String> filteredDossierIds);
@GetMapping(value = REST_PATH + DOSSIER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
Dossier getDossierById(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted);
@GetMapping(value = ARCHIVE_DOSSIERS_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<Dossier> getArchivedDossiers();
@GetMapping(value = ARCHIVE_DOSSIERS_PATH + DOSSIER_TEMPLATE_PATH + DOSSIER_TEMPLATE_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<Dossier> getArchivedDossiersForDossierTemplateId(@PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId);
@GetMapping(value = DELETED_DOSSIERS_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<Dossier> getSoftDeletedDossiers();
@DeleteMapping(value = DELETED_DOSSIERS_PATH + HARD_DELETE_PATH)
void hardDeleteDossiers(@RequestBody Set<String> dossierIds);
@PostMapping(value = DELETED_DOSSIERS_PATH + UNDELETE_PATH)
void undeleteDossiers(@RequestBody Set<String> dossierIds);
@PostMapping(value = ARCHIVE_DOSSIERS_PATH + ARCHIVE_PATH)
void archiveDossiers(@RequestBody Set<String> dossierIds);
@PostMapping(value = ARCHIVE_DOSSIERS_PATH + UNARCHIVE_PATH)
void unarchiveDossiers(@RequestBody Set<String> dossierIds);
}

View File

@ -1,31 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import java.util.Set;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.DossierStats;
public interface DossierStatsResource {
String REST_PATH = "/dossier-stats";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
@Deprecated
@GetMapping(value = REST_PATH + DOSSIER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
DossierStats getDossierStats(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@Deprecated
@PostMapping(value = REST_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierStats> getDossierStats(@RequestBody Set<String> dossierIds);
}

View File

@ -1,79 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.CloneDossierTemplateRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.CreateOrUpdateDossierTemplateRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierTemplate;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.importexport.ExportDownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.importexport.ImportDossierTemplateRequest;
public interface DossierTemplateResource {
String DOSSIER_TEMPLATE_PATH = "/dossier-template";
String DOSSIER_TEMPLATE_ID = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_ID + "}";
String USER_ID_PARAM = "userId";
String CLONE_PATH = "/clone";
String EXPORT_PATH = "/export";
String IMPORT_PATH = "/import";
@ResponseBody
@ResponseStatus(HttpStatus.ACCEPTED)
@PostMapping(value = DOSSIER_TEMPLATE_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
DossierTemplate createOrUpdateDossierTemplate(@RequestBody CreateOrUpdateDossierTemplateRequest dossierTemplate);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = DOSSIER_TEMPLATE_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierTemplate> getAllDossierTemplates();
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = DOSSIER_TEMPLATE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierTemplate getDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
@ResponseBody
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@DeleteMapping(value = DOSSIER_TEMPLATE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE)
void deleteDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestParam(USER_ID_PARAM) String deletingUserId);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PostMapping(value = DOSSIER_TEMPLATE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE + CLONE_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
DossierTemplate cloneDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestBody CloneDossierTemplateRequest cloneDossierTemplateRequest);
@PostMapping(value = DOSSIER_TEMPLATE_PATH + EXPORT_PATH + "/prepare", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> prepareExportDownload(@RequestBody ExportDownloadRequest request);
@PostMapping(value = DOSSIER_TEMPLATE_PATH + EXPORT_PATH + "/create", consumes = MediaType.APPLICATION_JSON_VALUE)
void createExportDownload(@RequestParam String userId, @RequestParam String storageId);
@ResponseBody
@PostMapping(value = DOSSIER_TEMPLATE_PATH + IMPORT_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierTemplate importDossierTemplate(@RequestBody ImportDossierTemplateRequest request);
}

View File

@ -1,35 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import java.util.Set;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierTemplateDictionaryStats;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.DossierTemplateStats;
public interface DossierTemplateStatsResource {
String REST_PATH = "/dossier-template-stats";
String DICTIONARY_PATH = "/dictionary";
String DOSSIER_TEMPLATE_ID = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_ID + "}";
@PostMapping(value = REST_PATH + DICTIONARY_PATH, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
List<DossierTemplateDictionaryStats> getDossierTemplateDictionaryStats(@RequestBody Set<String> dossierTemplateIds);
@PostMapping(value = REST_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
DossierTemplateStats getDossierTemplateStats(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
@PostMapping(value = REST_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<DossierTemplateStats> getDossierTemplateStats();
}

View File

@ -1,42 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import com.iqser.red.service.persistence.service.v1.api.model.download.DownloadWithOptionRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.download.DownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.model.download.DownloadStatus;
@ResponseStatus(value = HttpStatus.OK)
public interface DownloadResource {
String REST_PATH = "/download";
String USER_ID = "userId";
@PostMapping(value = REST_PATH + "/prepare", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> prepareDownload(@RequestBody DownloadRequest request);
@PostMapping(value = REST_PATH + "/prepare-option", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> prepareDownload(@RequestBody DownloadWithOptionRequest request);
@GetMapping(value = REST_PATH + "/status/{" + USER_ID + "}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<DownloadStatus> getDownloadStatus(@PathVariable(USER_ID) String userId);
@PostMapping(value = REST_PATH + "/setDownloaded", consumes = MediaType.APPLICATION_JSON_VALUE)
void setDownloaded(@RequestBody JSONPrimitive<String> setDownloadedRequest);
@PostMapping(value = REST_PATH + "/delete", consumes = MediaType.APPLICATION_JSON_VALUE)
void deleteDownloadStatus(@RequestBody JSONPrimitive<String> setDownloadedRequest);
}

View File

@ -1,77 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.FileAttributesGeneralConfiguration;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.FileAttributeConfig;
public interface FileAttributesConfigResource {
String FILE_ATTRIBUTES_PATH = "/fileAttributes";
String FILE_ATTRIBUTE_PATH = "/fileAttribute";
String BASE_CONFIG_PATH = "/baseConfig";
String DELETE_PATH = "/delete";
String DOSSIER_TEMPLATE_ID = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_ID + "}";
String FILE_ATTRIBUTE_ID = "fileAttributeId";
String FILE_ATTRIBUTE_ID_PATH_VARIABLE = "/{" + FILE_ATTRIBUTE_ID + "}";
String UTF_ENCODING = "UTF-8";
String ASCII_ENCODING = "ASCII";
String ISO_ENCODING = "ISO";
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PutMapping(value = FILE_ATTRIBUTES_PATH + BASE_CONFIG_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
FileAttributesGeneralConfiguration setFileAttributesGeneralConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId,
@RequestBody FileAttributesGeneralConfiguration fileAttributesConfig);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@GetMapping(value = FILE_ATTRIBUTES_PATH + BASE_CONFIG_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
FileAttributesGeneralConfiguration getFileAttributesGeneralConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PostMapping(value = FILE_ATTRIBUTES_PATH + FILE_ATTRIBUTE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
FileAttributeConfig addOrUpdateFileAttributeConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestBody FileAttributeConfig fileAttributeConfig);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@PutMapping(value = FILE_ATTRIBUTES_PATH + FILE_ATTRIBUTE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileAttributeConfig> setFileAttributesConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestBody List<FileAttributeConfig> fileAttributesConfig);
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = FILE_ATTRIBUTES_PATH + FILE_ATTRIBUTE_PATH + FILE_ATTRIBUTE_ID_PATH_VARIABLE)
void deleteFileAttributeConfigs(@PathVariable(FILE_ATTRIBUTE_ID) String fileAttributeId);
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = FILE_ATTRIBUTES_PATH + FILE_ATTRIBUTE_PATH + DELETE_PATH)
void deleteFileAttributeConfigs(@RequestBody List<String> fileAttributeIds);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@GetMapping(value = FILE_ATTRIBUTES_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileAttributeConfig> getFileAttributeConfigs(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
}

View File

@ -1,33 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.Map;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ImportCsvRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ImportCsvResponse;
public interface FileAttributesResource {
String REST_PATH = "/fileAttributes";
String CSV_IMPORT_PATH = "/csvImport";
String SET_PATH = "/set";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
@PostMapping(value = REST_PATH + CSV_IMPORT_PATH + DOSSIER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
ImportCsvResponse importCsv(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody ImportCsvRequest importCsvRequest);
@PostMapping(value = REST_PATH + SET_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void setFileAttributes(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody Map<String, String> fileAttributes);
}

View File

@ -1,79 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.pdftron.redaction.v1.api.model.UntouchedDocumentResponse;
import com.iqser.red.service.redaction.v1.model.AnalyzeResult;
public interface FileStatusProcessingUpdateResource {
String STATUS_PATH = "/status-updates";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/preprocessing-successful", consumes = MediaType.APPLICATION_JSON_VALUE)
void preprocessingSuccessful(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody UntouchedDocumentResponse untouchedDocumentResponse);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/preprocessing-failed")
void preprocessingFailed(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/analysis-successful", consumes = MediaType.APPLICATION_JSON_VALUE)
void analysisSuccessful(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody AnalyzeResult analyzeResult);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/ocr-successful")
void ocrSuccessful(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/analysis-failed")
void analysisFailed(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/pre-processing")
void preProcessing(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/ocr-processing")
void ocrProcessing(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/ocr-failed")
void ocrFailed(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/indexing")
void indexing(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/indexing-successful")
void indexingSuccessful(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/indexing-failed")
void indexingFailed(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
}

View File

@ -1,23 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.license.LicenseReport;
import com.iqser.red.service.persistence.service.v1.api.model.license.LicenseReportRequest;
public interface LicenseReportResource {
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = "/report/license", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
LicenseReport getLicenseReport(@RequestBody LicenseReportRequest licenseReportRequest,
@RequestParam(value = "offset", defaultValue = "0") int offset,
@RequestParam(value = "limit", defaultValue = "20") int limit);
}

View File

@ -1,179 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.AddRedactionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.Comment;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.CommentRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ForceRedactionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ImageRecategorizationRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.LegalBasisChangeRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ManualAddResponse;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ManualRedactions;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.RemoveRedactionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ResizeRedactionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.UpdateRedactionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.IdRemoval;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualForceRedaction;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualImageRecategorization;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualLegalBasisChange;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualRedactionEntry;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.entitymapped.ManualResizeRedaction;
@ResponseStatus(value = HttpStatus.OK)
public interface ManualRedactionResource {
String MANUAL_REDACTION_REST_PATH = "/manualRedaction";
String DOSSIER_ID = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID + "}";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String ANNOTATION_ID = "annotationId";
String ANNOTATION_ID_PATH_VARIABLE = "/{" + ANNOTATION_ID + "}";
String COMMENT_ID = "commentId";
String COMMENT_ID_PATH_VARIABLE = "/{" + COMMENT_ID + "}";
String DELETE_PATH = "/delete";
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/add" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addAddRedaction(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<AddRedactionRequest> addRedactionRequests);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/remove" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addRemoveRedaction(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<RemoveRedactionRequest> removeRedactionRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/force" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addForceRedaction(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<ForceRedactionRequest> forceRedactionRequests);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/legalBasis" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addLegalBasisChange(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<LegalBasisChangeRequest> legalBasisChangeRequests);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/recategorize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addImageRecategorization(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<ImageRecategorizationRequest> imageRecategorizationRequests);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/comment" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
Comment addComment(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@PathVariable(ANNOTATION_ID) String annotationId,
@RequestBody CommentRequest comment);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/resize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ManualAddResponse> addResizeRedaction(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody List<ResizeRedactionRequest> resizeRedactionRequests);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/add" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualRedactionEntry getAddRedaction(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/remove" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
IdRemoval getRemoveRedaction(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/force" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualForceRedaction getForceRedaction(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/legalBasis" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualLegalBasisChange getLegalBasisChange(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/recategorize" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualImageRecategorization getImageRecategorization(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/comment" + COMMENT_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
Comment getComment(@PathVariable(COMMENT_ID) long commentId);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + "/resize" + FILE_ID_PATH_VARIABLE + ANNOTATION_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualResizeRedaction getResizeRedaction(@PathVariable(FILE_ID) String fileId, @PathVariable(ANNOTATION_ID) String annotationId);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/add" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteAddRedaction(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/remove" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteRemoveRedaction(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/force" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteForceRedaction(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/legalBasis" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteLegalBasisChange(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/recategorize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteImageRecategorization(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/comment" + FILE_ID_PATH_VARIABLE)
void deleteComment(@PathVariable(FILE_ID) String fileId, @RequestBody List<Long> commentIds);
@PostMapping(MANUAL_REDACTION_REST_PATH + DELETE_PATH + "/resize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteResizeRedaction(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody List<String> annotationIds);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/add" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateAddRedactionStatus(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody UpdateRedactionRequest updateStatusRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/remove" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateRemoveRedactionStatus(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody UpdateRedactionRequest updateStatusRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/force" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateForceRedactionStatus(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody UpdateRedactionRequest updateStatusRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/legalBasis" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateLegalBasisChangeStatus(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody UpdateRedactionRequest updateStatusRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/recategorize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateImageRecategorizationStatus(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody UpdateRedactionRequest updateStatusRequest);
@PostMapping(value = MANUAL_REDACTION_REST_PATH + "/status/resize" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateResizeRedactionStatus(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody UpdateRedactionRequest updateStatusRequest);
@GetMapping(value = MANUAL_REDACTION_REST_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ManualRedactions getManualRedactions(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId);
}

View File

@ -1,34 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.notification.NotificationPreferences;
public interface NotificationPreferencesResource {
String REST_PATH = "/notification-preferences";
String USER_ID_PARAM = "userId";
String USER_ID_PATH_PARAM = "/{" + USER_ID_PARAM + "}";
@PostMapping(value = REST_PATH + USER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE)
void setNotificationPreferences(@PathVariable(USER_ID_PARAM) String userId, @RequestBody NotificationPreferences notificationRequest);
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = REST_PATH + USER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
NotificationPreferences getNotificationPreferences(@PathVariable(USER_ID_PARAM) String userId);
@DeleteMapping(value = REST_PATH + USER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE)
void deleteNotificationPreferences(@PathVariable(USER_ID_PARAM) String userId);
}

View File

@ -1,64 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.time.OffsetDateTime;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.audit.AddNotificationRequest;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.notification.Notification;
@ResponseStatus(value = HttpStatus.OK)
public interface NotificationResource {
String NOTIFICATION_PATH = "/notification";
String TOGGLE_SEEN_PATH = "/toggle-seen";
String TOGGLE_READ_PATH = "/toggle-read";
String CHANGES_PATH = "/has-changes";
String USER_ID_PARAM = "userId";
String USER_ID_PATH_PARAM = "/{" + USER_ID_PARAM + "}";
String INCLUDE_SEEN_PARAM = "includeSeen";
String SET_SEEN_PARAM = "setSeen";
String SET_READ_PARAM = "setRead";
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = NOTIFICATION_PATH + CHANGES_PATH + USER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<Boolean> hasNewNotificationsSince(@PathVariable(USER_ID_PARAM) String userId, @RequestBody JSONPrimitive<OffsetDateTime> since);
@PostMapping(value = NOTIFICATION_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void addNotification(@RequestBody AddNotificationRequest addNotificationRequest);
@PostMapping(value = NOTIFICATION_PATH + TOGGLE_SEEN_PATH + USER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE)
void toggleSeen(@PathVariable(USER_ID_PARAM) String userId, @RequestBody List<Long> notificationIds, @RequestParam(SET_SEEN_PARAM) boolean setSeen);
@PostMapping(value = NOTIFICATION_PATH + TOGGLE_READ_PATH + USER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE)
void toggleRead(@PathVariable(USER_ID_PARAM) String userId, @RequestBody List<Long> notificationIds, @RequestParam(SET_READ_PARAM) boolean setRead);
@DeleteMapping(value = NOTIFICATION_PATH + USER_ID_PATH_PARAM, consumes = MediaType.APPLICATION_JSON_VALUE)
void softDelete(@PathVariable(USER_ID_PARAM) String userId, @RequestBody List<Long> notificationIds);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = NOTIFICATION_PATH + USER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<Notification> getNotifications(@PathVariable(USER_ID_PARAM) String userId, @RequestParam(INCLUDE_SEEN_PARAM) boolean includeSeen);
}

View File

@ -1,74 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.Set;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.pdftron.redaction.v1.api.model.ByteContentDocument;
import com.iqser.red.service.pdftron.redaction.v1.api.model.highlights.TextHighlightConversionRequest;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.DeleteImportedRedactionsRequest;
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public interface ReanalysisResource {
String REANALYZE_PATH = "/reanalyze";
String IMPORT_REDACTIONS_PATH = "/import-redactions";
String CONVERT_TEXT_HIGHLIGHTS_PATH = "/convert-texthighlights";
String OCR_REANALYZE_PATH = "/ocr/reanalyze";
String REINDEX_PATH = "/reindex";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String FILE_ID_PARAM = "fileId";
String FILE_ID_PATH_PARAM = "/{" + FILE_ID_PARAM + "}";
String BULK_REST_PATH = "/bulk";
String FALSE = "false";
@PostMapping(value = REANALYZE_PATH + DOSSIER_ID_PATH_PARAM)
void reanalyzeDossier(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestParam(value = "force", required = false, defaultValue = FALSE) boolean force);
@PostMapping(value = REANALYZE_PATH + DOSSIER_ID_PATH_PARAM + BULK_REST_PATH)
void reanalyzeFiles(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@RequestBody Set<String> fileIds,
@RequestParam(value = "force", required = false, defaultValue = FALSE) boolean force);
@PostMapping(value = OCR_REANALYZE_PATH + DOSSIER_ID_PATH_PARAM)
void ocrDossier(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@PostMapping(value = OCR_REANALYZE_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_PARAM)
void ocrFile(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID_PARAM) String fileId,
@RequestParam(value = "force", required = false, defaultValue = FALSE) boolean force);
@PostMapping(value = OCR_REANALYZE_PATH + DOSSIER_ID_PATH_PARAM + BULK_REST_PATH)
void ocrFiles(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody Set<String> fileIds);
@PostMapping(value = REINDEX_PATH)
void reindex(@RequestParam(value = DOSSIER_ID_PARAM, required = false) String dossierId,
@RequestParam(value = "dropIndex", required = false, defaultValue = FALSE) boolean dropIndex,
@RequestBody Set<String> fileIds);
@PostMapping(value = IMPORT_REDACTIONS_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void importRedactions(@RequestBody ByteContentDocument documentRequest);
@PostMapping(value = IMPORT_REDACTIONS_PATH + "/delete", consumes = MediaType.APPLICATION_JSON_VALUE)
void deleteImportedRedactions(@RequestBody DeleteImportedRedactionsRequest deleteImportedRedactionsRequest);
@PostMapping(value = CONVERT_TEXT_HIGHLIGHTS_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void convertTextHighlights(@RequestBody TextHighlightConversionRequest textHighlightRequest);
}

View File

@ -1,48 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.redactionlog.FilteredRedactionLogRequest;
import com.iqser.red.service.redaction.v1.model.RedactionLog;
import com.iqser.red.service.redaction.v1.model.SectionGrid;
@ResponseStatus(value = HttpStatus.OK)
public interface RedactionLogResource {
String REDACTION_LOG_PATH = "/redactionLog";
String SECTION_GRID_PATH = "/sectionGrid";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
@GetMapping(value = REDACTION_LOG_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
RedactionLog getRedactionLog(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = "excludedType", required = false) List<String> excludedTypes,
@RequestParam(value = "withManualRedactions", required = false, defaultValue = "true") boolean withManualRedactions,
@RequestParam(value = "includeFalsePositives", required = false, defaultValue = "false") boolean includeFalsePositives);
@GetMapping(value = SECTION_GRID_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
SectionGrid getSectionGrid(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@PostMapping(value = REDACTION_LOG_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE + "/filtered", produces = MediaType.APPLICATION_JSON_VALUE)
RedactionLog getFilteredRedactionLog(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody FilteredRedactionLogRequest filteredRedactionLogRequest);
}

View File

@ -1,57 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ReportTemplate;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ReportTemplateDownload;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ReportTemplateUpdateRequest;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.ReportTemplateUploadRequest;
public interface ReportTemplateResource {
String REPORT_TEMPLATE_UPLOAD_PATH = "/templateUpload";
String DOSSIER_TEMPLATE_ID = "dossierTemplateId";
String DOSSIER_TEMPLATE_ID_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_ID + "}";
String TEMPLATE_ID = "templateId";
String TEMPLATE_ID_PATH_VARIABLE = "/{" + TEMPLATE_ID + "}";
String DOWNLOAD_PATH = "download";
String UPDATE_PATH = "update";
@PostMapping(value = REPORT_TEMPLATE_UPLOAD_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
ReportTemplate uploadTemplate(@RequestBody ReportTemplateUploadRequest reportTemplateUploadRequest);
@GetMapping(value = REPORT_TEMPLATE_UPLOAD_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ReportTemplate> getAvailableReportTemplates(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId);
@GetMapping(value = REPORT_TEMPLATE_UPLOAD_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE + TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ReportTemplate getReportTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @PathVariable(TEMPLATE_ID) String templateId);
@GetMapping(value = REPORT_TEMPLATE_UPLOAD_PATH + DOWNLOAD_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE + TEMPLATE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
ReportTemplateDownload downloadReportTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @PathVariable(TEMPLATE_ID) String templateId);
@DeleteMapping(value = REPORT_TEMPLATE_UPLOAD_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE + TEMPLATE_ID_PATH_VARIABLE)
void deleteTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @PathVariable(TEMPLATE_ID) String templateId);
@PutMapping(value = REPORT_TEMPLATE_UPLOAD_PATH + UPDATE_PATH + DOSSIER_TEMPLATE_ID_PATH_VARIABLE + TEMPLATE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId,
@PathVariable(TEMPLATE_ID) String templateId,
@RequestBody ReportTemplateUpdateRequest reportTemplateUpdateRequest);
}

View File

@ -1,38 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
public interface RulesResource {
String PATH = "/rules";
String DOSSIER_TEMPLATE_PARAMETER_NAME = "dossierTemplateId";
String DOSSIER_TEMPLATE_PATH_VARIABLE = "/{" + DOSSIER_TEMPLATE_PARAMETER_NAME + "}";
String VERSION_PATH = "/version";
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping(value = PATH + DOSSIER_TEMPLATE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void setRules(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId, @RequestBody JSONPrimitive<String> rules);
@ResponseBody
@ResponseStatus(HttpStatus.OK)
@GetMapping(value = PATH + DOSSIER_TEMPLATE_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> getRules(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId);
@ResponseStatus(HttpStatus.OK)
@GetMapping(value = PATH + DOSSIER_TEMPLATE_PATH_VARIABLE + VERSION_PATH)
long getVersion(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId);
}

View File

@ -1,46 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.SMTPConfiguration;
public interface SMTPConfigurationResource {
String SMTP_PATH = "/smtp";
String TEST_PATH = "/test";
String TEST_EMAIL = "testEmail";
String MASK_PASSWORD = "maskPassword";
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = SMTP_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
SMTPConfiguration getCurrentSMTPConfiguration(@RequestParam(value = MASK_PASSWORD, required = false, defaultValue = "true") boolean maskPassword);
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@PostMapping(value = SMTP_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void updateSMTPConfiguration(@RequestBody SMTPConfiguration smtpConfigurationModel);
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = SMTP_PATH + TEST_PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
void testSMTPConfiguration(@RequestParam(value = TEST_EMAIL, required = false) String testEmail, @RequestBody SMTPConfiguration smtpConfigurationModel);
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@DeleteMapping(value = SMTP_PATH)
void clearSMTPConfiguration();
}

View File

@ -1,129 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Set;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.FileModel;
public interface StatusResource {
String STATUS_PATH = "/status";
String DELETED_PATH = "/softdeleted";
String ALL_PATH = "/all";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String CHANGES_PATH = "/has-changes";
String EXCLUDED_STATUS_PARAM = "excluded";
String EXCLUDED_FROM_AUTOMATIC_ANALYSIS_PARAM = "excludedFromAutomaticAnalysis";
String APPROVER_ID_REQUEST_PARAM = "approverId";
String ASSIGNEE_ID_REQUEST_PARAM = "assigneeId";
String USER_ID_REQUEST_PARAM = "userId";
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@PostMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + CHANGES_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<Boolean> hasChangesSince(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody JSONPrimitive<OffsetDateTime> since);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileModel> getDossierStatus(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + ALL_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileModel> getAllDossierStatus(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = STATUS_PATH + DELETED_PATH + DOSSIER_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileModel> getSoftDeletedDossierStatus(@PathVariable(DOSSIER_ID_PARAM) String dossierId);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = STATUS_PATH + DELETED_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<FileModel> getSoftDeletedForDossierList(@RequestBody List<String> dossierIds);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = STATUS_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
FileModel getFileStatus(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@ResponseBody
@ResponseStatus(value = HttpStatus.ACCEPTED)
@PostMapping(value = STATUS_PATH + "/update-modification-date" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void updateFileModificationDate(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@PostMapping(value = STATUS_PATH + "/assignee" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void setCurrentFileAssignee(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = ASSIGNEE_ID_REQUEST_PARAM, required = false) String assigneeId);
@PostMapping(value = STATUS_PATH + "/underreview" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void setStatusUnderReview(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = USER_ID_REQUEST_PARAM, required = false) String userId);
@PostMapping(value = STATUS_PATH + "/underapproval" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void setStatusUnderApproval(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = APPROVER_ID_REQUEST_PARAM, required = false) String approverId);
@PostMapping(value = STATUS_PATH + "/approved" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void setStatusApproved(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = APPROVER_ID_REQUEST_PARAM, required = false) String approverId);
@PostMapping(value = STATUS_PATH + "/new" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void setStatusNew(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@PostMapping(value = STATUS_PATH + "/toggle-analysis" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void toggleExclusion(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestParam(EXCLUDED_STATUS_PARAM) boolean excluded);
@PostMapping(value = STATUS_PATH + "/toggle-automatic-analysis" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void toggleAutomaticAnalysis(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(EXCLUDED_STATUS_PARAM) boolean excludedFromAutomaticAnalysis);
@PostMapping(value = STATUS_PATH + "/exclude-pages" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void excludePages(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody Set<Integer> pages);
@PostMapping(value = STATUS_PATH + "/include-pages" + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void includePages(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody Set<Integer> pages);
}

View File

@ -1,35 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.multitenancy.TenantRequest;
import com.iqser.red.service.persistence.service.v1.api.model.multitenancy.TenantResponse;
@ResponseStatus(value = HttpStatus.OK)
public interface TenantsResource {
String TENANT_ID_PARAM = "tenantId";
String TENANT_ID_PATH_PARAM = "/{" + TENANT_ID_PARAM + "}";
@PostMapping(value = "/tenants", consumes = MediaType.APPLICATION_JSON_VALUE)
void createTenant(@RequestBody TenantRequest tenantRequest);
@GetMapping(value = "/tenants", produces = MediaType.APPLICATION_JSON_VALUE)
List<TenantResponse> getTenants();
@GetMapping(value = "/deploymentKey" + TENANT_ID_PATH_PARAM, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> getDeploymentKey(@PathVariable(TENANT_ID_PARAM) String tenantId);
}

View File

@ -1,50 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.Set;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.dossier.file.AddFileRequest;
@ResponseStatus(value = HttpStatus.OK)
public interface UploadResource {
String REST_PATH = "/file";
String DELETE_PATH = REST_PATH + "/delete";
String UPLOAD_PATH = REST_PATH + "/upload";
String HARD_DELETE_PATH = REST_PATH + "/hardDelete";
String UNDELETE_PATH = REST_PATH + "/undelete";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String DOSSIER_ID_PARAM = "dossierId";
String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";
@PostMapping(value = UPLOAD_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<String> upload(@RequestBody AddFileRequest request,
@RequestParam(value = "keepManualRedactions", required = false, defaultValue = "false") boolean keepManualRedactions);
@DeleteMapping(value = DELETE_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE)
void deleteFile(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId);
@DeleteMapping(value = HARD_DELETE_PATH + DOSSIER_ID_PATH_PARAM)
void hardDeleteFiles(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody Set<String> fileIds);
@PostMapping(value = UNDELETE_PATH + DOSSIER_ID_PATH_PARAM)
void undeleteFiles(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @RequestBody Set<String> fileIds);
}

View File

@ -1,42 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.fasterxml.jackson.databind.JsonNode;
public interface UserPreferenceResource {
String PREFERENCES_PATH = "/preferences";
String KEY_PARAMETER_NAME = "key";
String KEY_PATH_VARIABLE = "/{" + KEY_PARAMETER_NAME + "}";
String USER_ID_PARAMETER_NAME = "userId";
String USER_ID_PATH_VARIABLE = "/{" + USER_ID_PARAMETER_NAME + "}";
@ResponseStatus(HttpStatus.NO_CONTENT)
@PutMapping(value = PREFERENCES_PATH + USER_ID_PATH_VARIABLE + KEY_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void savePreferences(@PathVariable(USER_ID_PARAMETER_NAME) String userId, @PathVariable(KEY_PARAMETER_NAME) String key, @RequestBody JsonNode jsonNode);
@ResponseBody
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = PREFERENCES_PATH + USER_ID_PATH_VARIABLE + KEY_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
JsonNode getPreferences(@PathVariable(USER_ID_PARAMETER_NAME) String userId, @PathVariable(KEY_PARAMETER_NAME) String key);
@ResponseBody
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@DeleteMapping(value = PREFERENCES_PATH + USER_ID_PATH_VARIABLE + KEY_PATH_VARIABLE)
void deletePreferences(@PathVariable(USER_ID_PARAMETER_NAME) String userId, @PathVariable(KEY_PARAMETER_NAME) String key);
}

View File

@ -1,39 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.annotations.ViewedPage;
@ResponseStatus(value = HttpStatus.OK)
public interface ViewedPagesResource {
String REST_PATH = "/viewedPages";
String FILE_ID = "fileId";
String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";
String ROLE = "role";
String ROLE_PATH_VARIABLE = "/{" + ROLE + "}";
@PostMapping(value = REST_PATH + FILE_ID_PATH_VARIABLE + ROLE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void addPage(@PathVariable(FILE_ID) String fileId, @PathVariable(ROLE) String role, @RequestBody Integer page);
@DeleteMapping(value = REST_PATH + FILE_ID_PATH_VARIABLE + ROLE_PATH_VARIABLE, consumes = MediaType.APPLICATION_JSON_VALUE)
void removePage(@PathVariable(FILE_ID) String fileId, @PathVariable(ROLE) String role, @RequestBody Integer page);
@GetMapping(value = REST_PATH + FILE_ID_PATH_VARIABLE + ROLE_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
List<ViewedPage> getViewedPages(@PathVariable(FILE_ID) String fileId, @PathVariable(ROLE) String role);
}

View File

@ -1,51 +0,0 @@
package com.iqser.red.service.persistence.service.v1.api.resources;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.iqser.red.service.persistence.service.v1.api.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.configuration.Watermark;
@ResponseStatus(value = HttpStatus.OK)
public interface WatermarkResource {
String WATERMARK_PATH = "/watermark";
String CHECK_USED_REST_PATH = "/used";
String WATERMARK_ID_PARAMETER_NAME = "watermarkId";
String WATERMARK_ID_PATH_VARIABLE = "/{" + WATERMARK_ID_PARAMETER_NAME + "}";
String DOSSIER_TEMPLATE_ID_PARAMETER_NAME = "dossierTemplateId";
@ResponseStatus(HttpStatus.OK)
@PostMapping(value = WATERMARK_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
Watermark createOrUpdateWatermark(@RequestBody Watermark watermark);
@GetMapping(value = WATERMARK_PATH + WATERMARK_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
Watermark getWatermark(@PathVariable(WATERMARK_ID_PARAMETER_NAME) long watermarkId);
@GetMapping(value = WATERMARK_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
List<Watermark> getWatermarksForDossierTemplateId(@RequestParam(DOSSIER_TEMPLATE_ID_PARAMETER_NAME) String dossierTemplateId);
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping(value = WATERMARK_PATH + WATERMARK_ID_PATH_VARIABLE)
void deleteWatermark(@PathVariable(WATERMARK_ID_PARAMETER_NAME) long watermarkId);
@ResponseStatus(value = HttpStatus.OK)
@GetMapping(value = WATERMARK_PATH + CHECK_USED_REST_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
JSONPrimitive<Boolean> isWatermarkUsed(@RequestParam(WATERMARK_ID_PARAMETER_NAME) long watermarkId);
}

View File

@ -0,0 +1,12 @@
plugins {
id("com.iqser.red.service.java-conventions")
id("io.spring.dependency-management") version "1.1.6"
id("org.sonarqube") version "4.4.1.3373"
id("io.freefair.lombok") version "8.6"
}
dependencies {
api(project(":persistence-service-processor-v1"))
}
description = "persistence-service-external-api-impl-v1"

View File

@ -0,0 +1,10 @@
package com.iqser.red.persistence.service.v1.external.api.impl;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
public class PersistenceServiceExternalApiConfiguration {
}

View File

@ -0,0 +1,74 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_APP_CONFIG;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_APP_CONFIG;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.entity.configuration.ApplicationConfigurationEntity;
import com.iqser.red.service.persistence.management.v1.processor.service.ApplicationConfigService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
import com.iqser.red.service.persistence.service.v1.api.external.resource.ApplicationConfigurationResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.configuration.ApplicationConfig;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import jakarta.persistence.Column;
import jakarta.validation.Valid;
import lombok.Builder;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class ApplicationConfigurationController implements ApplicationConfigurationResource {
private final ApplicationConfigService applicationConfigService;
private final AuditPersistenceService auditPersistenceService;
@Override
@PreAuthorize("hasAuthority('" + WRITE_APP_CONFIG + "')")
public ApplicationConfig createOrUpdateAppConfig(@Valid @RequestBody ApplicationConfig appConfig) {
var result = MagicConverter.convert(applicationConfigService.saveApplicationConfiguration(convert(appConfig)),
ApplicationConfig.class);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId("ApplicationConfig")
.category(AuditCategory.SETTINGS.name())
.message("Application config has been changed.")
.build());
return result;
}
@Override
@PreAuthorize("hasAuthority('" + READ_APP_CONFIG + "')")
public ApplicationConfig getCurrentApplicationConfig() {
return MagicConverter.convert(applicationConfigService.getApplicationConfig(), ApplicationConfig.class);
}
private ApplicationConfigurationEntity convert(ApplicationConfig appConfig){
var entity = ApplicationConfigurationEntity.builder()
.downloadCleanupDownloadFilesHours(appConfig.getDownloadCleanupDownloadFilesHours())
.downloadCleanupNotDownloadFilesHours(appConfig.getDownloadCleanupNotDownloadFilesHours())
.softDeleteCleanupTime(appConfig.getSoftDeleteCleanupTime())
.build();
if(appConfig.getHardDeleteCleanupRetryTime() != null){
entity.setHardDeleteCleanupRetryTime(appConfig.getHardDeleteCleanupRetryTime());
}
return entity;
}
}

View File

@ -0,0 +1,56 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.SEARCH_AUDIT_LOG;
import static com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter.convert;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.AuditResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditModel;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditSearchRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.CategoryModel;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class AuditController implements AuditResource {
private final AuditPersistenceService auditPersistenceService;
@Override
@PreAuthorize("hasAuthority('" + SEARCH_AUDIT_LOG + "')")
public AuditResponse searchAuditLog(@RequestBody AuditSearchRequest auditSearchRequest) {
var auditModels = convert(auditPersistenceService.search(auditSearchRequest), AuditModel.class);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(auditSearchRequest.getObjectId())
.category(AuditCategory.AUDIT.name())
.message("Audit Log has been viewed.")
.build());
return new AuditResponse(auditModels.getElements(), auditModels.getTotalHits(), auditModels.getPage(), auditModels.getPageSize());
}
@Override
@PreAuthorize("hasAuthority('" + SEARCH_AUDIT_LOG + "')")
public List<CategoryModel> getAuditCategories() {
return auditPersistenceService.getCategories();
}
}

View File

@ -0,0 +1,78 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.MANAGE_ACL_PERMISSIONS;
import java.util.List;
import java.util.Set;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.acl.custom.service.CustomPermissionService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.CustomPermissionMappingResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.permission.CustomPermissionMappingModel;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import lombok.RequiredArgsConstructor;
@RestController
@RequiredArgsConstructor
public class CustomPermissionMappingController implements CustomPermissionMappingResource {
private final CustomPermissionService customPermissionService;
private final AuditPersistenceService auditPersistenceService;
@Override
@PreAuthorize("hasAuthority('" + MANAGE_ACL_PERMISSIONS + "')")
public List<CustomPermissionMappingModel> getCustomPermissionMappings(@PathVariable(TARGET_OBJECT_NAME) String targetObject) {
return customPermissionService.getCustomPermissionMappings(targetObject);
}
@Override
@PreAuthorize("hasAuthority('" + MANAGE_ACL_PERMISSIONS + "')")
public void saveCustomPermissionMappings(@PathVariable(TARGET_OBJECT_NAME) String targetObject, @RequestBody List<CustomPermissionMappingModel> customPermissionMappingModels) {
customPermissionService.saveCustomPermissionMappings(targetObject, customPermissionMappingModels);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(targetObject)
.category(AuditCategory.SETTINGS.name())
.message("Custom permissions have been changed.")
.build());
}
@Override
@PreAuthorize("hasAuthority('" + MANAGE_ACL_PERMISSIONS + "')")
public List<CustomPermissionMappingModel> getValidMapping(@PathVariable(TARGET_OBJECT_NAME) String targetObject) {
return customPermissionService.getExistingPermissions(targetObject);
}
@Override
@PreAuthorize("hasAuthority('" + MANAGE_ACL_PERMISSIONS + "')")
public Set<String> getAllSupportedTargetObjects() {
return customPermissionService.getAllSupportedTargetObjects();
}
@Override
@PreAuthorize("hasAuthority('" + MANAGE_ACL_PERMISSIONS + "')")
public void syncAllCustomPermissions() {
customPermissionService.syncAllCustomPermissions();
}
}

View File

@ -0,0 +1,380 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.DictionaryDifferenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.DictionaryService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.utils.StringEncodingUtils;
import com.iqser.red.service.persistence.management.v1.processor.utils.TypeValueMapper;
import com.iqser.red.service.persistence.service.v1.api.external.model.UpdateEntries;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DictionaryResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.CreateTypeValue;
import com.iqser.red.service.persistence.service.v1.api.shared.model.TypeResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.TypeValue;
import com.iqser.red.service.persistence.service.v1.api.shared.model.UpdateTypeValue;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dictionary.Dictionary;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dictionary.DictionaryDifferenceResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.configuration.Colors;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.type.DictionaryEntryType;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.type.Type;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import feign.FeignException;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DictionaryController implements DictionaryResource {
private final DictionaryService dictionaryService;
private final AuditPersistenceService auditClient;
private final AccessControlService accessControlService;
private final DictionaryDifferenceService dictionaryDifferenceService;
@Override
public void addEntry(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestBody List<String> entries,
@RequestParam(name = REMOVE_CURRENT_REQUEST_PARAM, defaultValue = "false", required = false) boolean removeCurrent,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = DICTIONARY_ENTRY_TYPE_PARAM, required = false, defaultValue = DEFAULT_DICTIONARY_ENTRY_TYPE) DictionaryEntryType dictionaryEntryType) {
addEntries(type, dossierTemplateId, entries, removeCurrent, dossierId, dictionaryEntryType);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary entries were added.")
.details(Map.of("Type", type, "Number", entries.size()))
.build());
}
private void addEntries(String type, String dossierTemplateId, List<String> entries, boolean removeCurrent, String dossierId, DictionaryEntryType dictionaryEntryType) {
if (dossierId == null) {
dictionaryService.addGlobalEntries(type, dossierTemplateId, entries, removeCurrent, dictionaryEntryType);
} else {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
dictionaryService.addDossierEntries(type, dossierTemplateId, entries, removeCurrent, dossierId, dictionaryEntryType);
}
}
@Override
public void deleteEntry(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@PathVariable(ENTRY_PARAMETER_NAME) String entry,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = DICTIONARY_ENTRY_TYPE_PARAM, required = false, defaultValue = DEFAULT_DICTIONARY_ENTRY_TYPE) DictionaryEntryType dictionaryEntryType) {
deleteEntries(type, dossierTemplateId, Arrays.asList(entry), dossierId, dictionaryEntryType);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary entry was deleted.")
.details(Map.of("Type", type, "Value", entry))
.build());
}
@Override
public void updateEntries(String type, String dossierTemplateId, UpdateEntries updateEntries, String dossierId, DictionaryEntryType dictionaryEntryType) {
if (dossierId == null) {
dictionaryService.updateGlobalEntries(type, dossierTemplateId, updateEntries.entriesToAdd(), updateEntries.entriesToDelete(), dictionaryEntryType);
} else {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
dictionaryService.updateDossierEntries(type, dossierTemplateId, updateEntries.entriesToAdd(), updateEntries.entriesToDelete(), dossierId, dictionaryEntryType);
}
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary entries were updated.")
.details(Map.of("Type",
type,
"Number of added entries",
updateEntries.entriesToAdd() == null ? 0 : updateEntries.entriesToAdd().size(),
"Number of deleted entries",
updateEntries.entriesToDelete() == null ? 0 : updateEntries.entriesToDelete().size()))
.build());
}
@Override
public void deleteEntries(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestBody List<String> entries,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = DICTIONARY_ENTRY_TYPE_PARAM, required = false, defaultValue = DEFAULT_DICTIONARY_ENTRY_TYPE) DictionaryEntryType dictionaryEntryType) {
if (dossierId == null) {
dictionaryService.deleteGlobalEntries(type, dossierTemplateId, entries, dictionaryEntryType);
} else {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
dictionaryService.deleteDossierEntries(type, dossierTemplateId, entries, dossierId, dictionaryEntryType);
}
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary entries were deleted.")
.details(Map.of("Type", type, "Number", entries.size()))
.build());
}
@Override
public void updateType(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestBody UpdateTypeValue typeValue) {
dictionaryService.updateGlobalType(type, dossierTemplateId, typeValue);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary type was updated.")
.details(Map.of("Type", type))
.build());
}
@Override
public TypeValue addType(@Valid @RequestBody CreateTypeValue typeValue) {
Type result = dictionaryService.addGlobalType(typeValue);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(typeValue.getDossierTemplateId())
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary type was added.")
.details(Map.of("Type", typeValue.getType()))
.build());
return MagicConverter.convert(result, TypeValue.class, new TypeValueMapper());
}
@Override
public void deleteType(@PathVariable(TYPE_PARAMETER_NAME) String type, @PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId) {
dictionaryService.deleteGlobalType(type, dossierTemplateId);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary type was deleted.")
.details(Map.of("Type", type))
.build());
}
@Override
public void deleteTypes(@RequestBody List<String> types, @PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId) {
List<String> errorIds = new ArrayList<>();
for (var type : types) {
try {
dictionaryService.deleteGlobalType(type, dossierTemplateId);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary type was deleted.")
.details(Map.of("Type", type))
.build());
} catch (FeignException e) {
errorIds.add(type);
}
}
if (errorIds.size() > 0) {
throw new BadRequestException("Failed to delete dictionary types: " + errorIds);
}
}
@Override
public TypeResponse getAllTypes(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = INCLUDE_DELETED_PARAMETER_NAME, required = false, defaultValue = "false") boolean includeDeleted) {
return dictionaryService.getAllTypes(dossierTemplateId, dossierId, includeDeleted);
}
@Override
public Colors getColors(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId) {
return dictionaryService.getColors(dossierTemplateId);
}
@Override
public void uploadDictionary(@RequestPart(name = "file", required = false) MultipartFile file,
@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = DICTIONARY_ENTRY_TYPE_PARAM, required = false, defaultValue = DEFAULT_DICTIONARY_ENTRY_TYPE) DictionaryEntryType dictionaryEntryType) {
validateFile(file);
try {
addEntries(type,
dossierTemplateId,
new String(file.getBytes(), StandardCharsets.UTF_8).lines()
.collect(Collectors.toList()),
true,
dossierId,
dictionaryEntryType);
} catch (IOException e) {
log.debug(e.getMessage(), e);
throw new BadRequestException("Could not upload file.", e);
}
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary has been uploaded.")
.details(Map.of("Type", type))
.build());
}
private void validateFile(@RequestPart(name = "file", required = false) MultipartFile file) {
if (file == null || file.isEmpty()) {
throw new BadRequestException("File cannot be null or empty");
}
}
@Override
public ResponseEntity<?> downloadDictionary(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId,
@RequestParam(value = DICTIONARY_ENTRY_TYPE_PARAM, required = false, defaultValue = DEFAULT_DICTIONARY_ENTRY_TYPE) DictionaryEntryType dictionaryEntryType) {
byte[] data = null;
switch (dictionaryEntryType) {
case ENTRY:
data = String.join("\n", getDictionaryForType(type, dossierTemplateId, dossierId).getEntries()).getBytes();
break;
case FALSE_POSITIVE:
data = String.join("\n", getDictionaryForType(type, dossierTemplateId, dossierId).getFalsePositiveEntries()).getBytes();
break;
case FALSE_RECOMMENDATION:
data = String.join("\n", getDictionaryForType(type, dossierTemplateId, dossierId).getFalseRecommendationEntries()).getBytes();
break;
}
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.TEXT_PLAIN);
httpHeaders.add("Content-Disposition", "attachment; filename*=utf-8''" + StringEncodingUtils.urlEncode(type) + ".txt");
InputStream is = new ByteArrayInputStream(data);
return new ResponseEntity<>(new InputStreamResource(is), httpHeaders, HttpStatus.OK);
}
@Override
public Dictionary getDictionaryForType(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME, required = false) String dossierId) {
return dictionaryService.getDictionaryForType(type, dossierTemplateId, dossierId);
}
@Override
public Dictionary getMergedDictionaries(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@RequestParam(value = DOSSIER_ID_PARAMETER_NAME) String dossierId) {
return dictionaryService.getMergedDictionaryForType(type, dossierTemplateId, dossierId);
}
@Override
public void setColors(@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId, @RequestBody Colors colors) {
dictionaryService.setColors(dossierTemplateId, colors);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Colors have been changed.")
.build());
}
@Override
public void changeFlags(@PathVariable(TYPE_PARAMETER_NAME) String type,
@PathVariable(DOSSIER_TEMPLATE_PARAMETER_NAME) String dossierTemplateId,
@PathVariable(value = DOSSIER_ID_PARAMETER_NAME) String dossierId,
@RequestParam(value = "addToDictionaryAction") boolean addToDictionaryAction) {
dictionaryService.changeAddToDictionary(type, dossierTemplateId, dossierId, addToDictionaryAction);
}
@Override
public DictionaryDifferenceResponse getDictionaryDifference(String dossierTemplateId, Set<String> types) {
DictionaryDifferenceResponse dictionaryDifferenceResponse = dictionaryDifferenceService.calculatedDictionaryDifference(dossierTemplateId, types);
auditClient.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DICTIONARY.name())
.message("Dictionary differences was calculated.")
.details(Map.of("DictionaryDifferenceResponse", dictionaryDifferenceResponse, "types", types))
.build());
return dictionaryDifferenceResponse;
}
}

View File

@ -0,0 +1,198 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DIGITAL_SIGNATURE;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_DIGITAL_SIGNATURE;
import java.util.Base64;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.entity.configuration.DigitalSignatureEntity;
import com.iqser.red.service.persistence.management.v1.processor.entity.configuration.DigitalSignatureKmsEntity;
import com.iqser.red.service.persistence.management.v1.processor.service.DigitalSignatureKmsService;
import com.iqser.red.service.persistence.management.v1.processor.service.DigitalSignatureService;
import com.iqser.red.service.persistence.management.v1.processor.service.DigitalSignatureTypeService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DigitalSignatureResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DigitalSignatureKms;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DigitalSignatureKmsViewModel;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DigitalSignatureViewModel;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.configuration.DigitalSignature;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.configuration.DigitalSignatureType;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import lombok.RequiredArgsConstructor;
@RestController
@RequiredArgsConstructor
public class DigitalSignatureController implements DigitalSignatureResource {
private static final String DIGITAL_SIGNATURE_AUDIT_ID = "DigitalSignature";
private final DigitalSignatureTypeService digitalSignatureTypeService;
private final DigitalSignatureService digitalSignatureService;
private final DigitalSignatureKmsService digitalSignatureKmsService;
private final AuditPersistenceService auditPersistenceService;
@Override
@PreAuthorize("hasAuthority('" + READ_DIGITAL_SIGNATURE + "')")
public DigitalSignatureType getActiveDigitalSignatureType() {
return digitalSignatureTypeService.getActiveDigitalSignatureType();
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public void setActiveDigitalSignatureType(DigitalSignatureType digitalSignatureType) {
digitalSignatureTypeService.setActiveDigitalSignatureType(digitalSignatureType);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital signature type has been updated.")
.build());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public DigitalSignatureViewModel saveDigitalSignature(@RequestBody DigitalSignature digitalSignatureModel) {
DigitalSignatureViewModel digitalSignatureViewModel = convertToView(digitalSignatureService.saveDigitalSignature(convert(digitalSignatureModel)));
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital signature has been saved.")
.build());
return digitalSignatureViewModel;
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public void updateDigitalSignature(@RequestBody DigitalSignatureViewModel digitalSignatureModel) {
digitalSignatureService.updateDigitalSignature(convert(digitalSignatureModel));
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital signature has been updated.")
.build());
}
@Override
@PreAuthorize("hasAuthority('" + READ_DIGITAL_SIGNATURE + "')")
public DigitalSignatureViewModel getDigitalSignature() {
return convertToView(digitalSignatureService.getDigitalSignature());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public void deleteDigitalSignature() {
digitalSignatureService.deleteDigitalSignature();
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital signature has been deleted.")
.build());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public DigitalSignatureKmsViewModel saveDigitalSignatureKms(@RequestBody DigitalSignatureKms digitalSignature) {
DigitalSignatureKmsViewModel result = convert(digitalSignatureKmsService.saveDigitalSignature(digitalSignature));
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital KMS signature has been saved.")
.build());
return result;
}
@Override
@PreAuthorize("hasAuthority('" + READ_DIGITAL_SIGNATURE + "')")
public DigitalSignatureKmsViewModel getDigitalSignatureKms() {
return convert(digitalSignatureKmsService.getDigitalSignature());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DIGITAL_SIGNATURE + "')")
public void deleteDigitalSignatureKms() {
digitalSignatureKmsService.deleteDigitalSignature();
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(DIGITAL_SIGNATURE_AUDIT_ID)
.category(AuditCategory.SETTINGS.name())
.message("Digital KMS signature has been deleted.")
.build());
}
private DigitalSignatureKmsViewModel convert(DigitalSignatureKmsEntity digitalSignature) {
return DigitalSignatureKmsViewModel.builder()
.kmsAccessKey(digitalSignature.getKmsAccessKey())
.kmsKeyId(digitalSignature.getKmsKeyId())
.kmsRegion(digitalSignature.getKmsRegion())
.kmsServiceEndpoint(digitalSignature.getKmsServiceEndpoint())
.certificateName(digitalSignature.getCertificateName())
.build();
}
private DigitalSignatureEntity convert(DigitalSignatureViewModel digitalSignature) {
return DigitalSignatureEntity.builder()
.certificateName(digitalSignature.getCertificateName())
.contactInfo(digitalSignature.getContactInfo())
.location(digitalSignature.getLocation())
.reason(digitalSignature.getReason())
.build();
}
public DigitalSignatureViewModel convertToView(DigitalSignatureEntity model) {
return DigitalSignatureViewModel.builder()
.certificateName(model.getCertificateName())
.contactInfo(model.getContactInfo())
.location(model.getLocation())
.reason(model.getReason())
.build();
}
public DigitalSignatureEntity convert(DigitalSignature digitalSignature) {
return DigitalSignatureEntity.builder()
.certificateName(digitalSignature.getCertificateName())
.contactInfo(digitalSignature.getContactInfo())
.location(digitalSignature.getLocation())
.password(digitalSignature.getPassword())
.reason(digitalSignature.getReason())
.privateKey(Base64.getDecoder().decode(digitalSignature.getBase64EncodedPrivateKey()))
.build();
}
}

View File

@ -0,0 +1,186 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_REDACTION_LOG;
import static com.iqser.red.service.persistence.management.v1.processor.service.FeignExceptionHandler.processFeignException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileManagementStorageService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileStatusService;
import com.iqser.red.service.persistence.management.v1.processor.utils.StringEncodingUtils;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DocumentResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileType;
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
import com.knecon.fforesight.tenantcommons.TenantContext;
import feign.FeignException;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
@RestController
@RequiredArgsConstructor
public class DocumentController implements DocumentResource {
private final FileStatusService fileStatusService;
private final FileManagementStorageService fileManagementStorageService;
private final AccessControlService accessControlService;
@SneakyThrows
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public ResponseEntity<?> getDocumentText(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) {
// check access to resources and check for deletion
accessControlService.checkDossierExistenceAndViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
try {
return buildZipFileResponseEntity(fileId, dossierId, FileType.DOCUMENT_TEXT);
} catch (FeignException e) {
throw processFeignException(e);
}
}
@SneakyThrows
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public ResponseEntity<?> getDocumentPositions(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) {
// check access to resources and check for deletion
accessControlService.checkDossierExistenceAndViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
try {
return buildZipFileResponseEntity(fileId, dossierId, FileType.DOCUMENT_POSITION);
} catch (FeignException e) {
throw processFeignException(e);
}
}
@SneakyThrows
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public ResponseEntity<?> getDocumentStructure(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) {
// check access to resources and check for deletion
accessControlService.checkDossierExistenceAndViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
try {
return buildZipFileResponseEntity(fileId, dossierId, FileType.DOCUMENT_STRUCTURE);
} catch (FeignException e) {
throw processFeignException(e);
}
}
@SneakyThrows
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public ResponseEntity<?> getDocumentPages(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) {
// check access to resources and check for deletion
accessControlService.checkDossierExistenceAndViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
try {
return buildZipFileResponseEntity(fileId, dossierId, FileType.DOCUMENT_PAGES);
} catch (FeignException e) {
throw processFeignException(e);
}
}
@SneakyThrows
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public ResponseEntity<?> getSimplifiedSectionText(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) {
// check access to resources and check for deletion
accessControlService.checkDossierExistenceAndViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
try {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.parseMediaType("application/zip"));
var fileStatus = fileStatusService.getStatus(fileId);
String filename = fileStatus.getFilename();
if (filename != null) {
var index = filename.lastIndexOf(".");
String prefix = filename.substring(0, index);
filename = prefix + ".json";
httpHeaders.add("Content-Disposition", "attachment; filename*=utf-8''" + StringEncodingUtils.urlEncode(prefix) + ".zip");
}
byte[] zipBytes = getZippedBytes(dossierId, fileId, filename, FileType.SIMPLIFIED_TEXT);
return new ResponseEntity<>(zipBytes, httpHeaders, HttpStatus.OK);
} catch (StorageObjectDoesNotExist e) {
throw new RuntimeException("Simplified Text is not available", e);
} catch (FeignException e) {
throw processFeignException(e);
}
}
private ResponseEntity<byte[]> buildZipFileResponseEntity(String fileId, String dossierId, FileType fileType) throws IOException {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.parseMediaType("application/zip"));
var fileStatus = fileStatusService.getStatus(fileId);
String filename = fileStatus.getFilename();
if (filename != null) {
var index = filename.lastIndexOf(".");
String prefix = filename.substring(0, index);
filename = prefix + ".json";
httpHeaders.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=utf-8''" + StringEncodingUtils.urlEncode(prefix) + ".zip");
}
byte[] zipBytes = getZippedBytes(dossierId, fileId, filename, fileType);
httpHeaders.setContentLength(zipBytes.length);
return new ResponseEntity<>(zipBytes, httpHeaders, HttpStatus.OK);
}
private byte[] getZippedBytes(String dossierId, String fileId, String filename, FileType fileType) throws IOException {
try {
String objectId = dossierId + "/" + fileId + "." + fileType.name() + fileType.getExtension();
try (var inputStream = fileManagementStorageService.getObject(TenantContext.getTenantId(), objectId)) {
byte[] input = inputStream.readAllBytes();
inputStream.close();
return zipBytes(filename, input);
}
} catch (StorageObjectDoesNotExist e) {
throw new RuntimeException(String.format("%s is not available", fileType.name()), e);
}
}
public static byte[] zipBytes(String filename, byte[] input) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(baos);
ZipEntry entry = new ZipEntry(filename);
entry.setSize(input.length);
zos.putNextEntry(entry);
zos.write(input);
zos.closeEntry();
zos.close();
return baos.toByteArray();
}
}

View File

@ -0,0 +1,195 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER_ATTRIBUTES;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER_ATTRIBUTES_CONFIG;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_DOSSIER_ATTRIBUTES;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_DOSSIER_ATTRIBUTES_CONFIG;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_FILE_ATTRIBUTES;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.DossierPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.utils.DossierAttributeConfigMapper;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import com.iqser.red.service.persistence.management.v1.processor.entity.dossier.DossierAttributeConfigEntity;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierAttributesManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.DossierAttributeConfigPersistenceService;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierAttributesResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierAttributes;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierAttributesConfig;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierAttributeConfig;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.DossierAttribute;
import lombok.RequiredArgsConstructor;
@RestController
@RequiredArgsConstructor
public class DossierAttributesController implements DossierAttributesResource {
private final DossierPersistenceService dossierPersistenceService;
private final DossierAttributeConfigPersistenceService dossierAttributeConfigPersistenceService;
private final AuditPersistenceService auditPersistenceService;
private final DossierAttributesManagementService dossierAttributesManagementService;
private final AccessControlService accessControlService;
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES_CONFIG + "')")
public DossierAttributesConfig setDossierAttributesConfig(String dossierTemplateId, DossierAttributesConfig dossierAttributesConfig) {
var result = MagicConverter.convert(dossierAttributeConfigPersistenceService.setDossierAttributesConfig(dossierTemplateId,
MagicConverter.convert(dossierAttributesConfig.getDossierAttributeConfigs(),
DossierAttributeConfigEntity.class)),
DossierAttributeConfig.class, new DossierAttributeConfigMapper());
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Changed dossier attributes base configuration.")
.build());
return new DossierAttributesConfig(result);
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES_CONFIG + "')")
public DossierAttributeConfig addOrUpdateDossierAttributeConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId,
@RequestBody DossierAttributeConfig dossierAttribute) {
var result = MagicConverter.convert(dossierAttributeConfigPersistenceService.addOrUpdateDossierAttribute(dossierTemplateId,
MagicConverter.convert(dossierAttribute,
DossierAttributeConfigEntity.class)),
DossierAttributeConfig.class, new DossierAttributeConfigMapper());
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier attributes added/updated")
.build());
return result;
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES_CONFIG + "')")
public void deleteDossierAttributeConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @PathVariable(DOSSIER_ATTRIBUTE_ID) String dossierAttributeId) {
dossierAttributeConfigPersistenceService.deleteDossierAttribute(dossierAttributeId);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier attributes removed")
.details(Map.of("DossierAttributeId", dossierAttributeId))
.build());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES_CONFIG + "')")
public void deleteDossierAttributesConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestParam(DOSSIER_ATTRIBUTE_IDS) List<String> dossierAttributeIds) {
dossierAttributeConfigPersistenceService.deleteDossierAttributes(dossierAttributeIds);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier attributes removed")
.details(Map.of("DossierAttributeId", dossierAttributeIds))
.build());
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER_ATTRIBUTES_CONFIG + "')")
public DossierAttributesConfig getDossierAttributesConfig(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
var result = dossierAttributeConfigPersistenceService.getDossierAttributes(dossierTemplateId);
return new DossierAttributesConfig(MagicConverter.convert(result, DossierAttributeConfig.class, new DossierAttributeConfigMapper()));
}
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES + "')")
public DossierAttributes setDossierAttributes(@PathVariable(DOSSIER_ID) String dossierId, @RequestBody DossierAttributes dossierAttributes) {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
accessControlService.verifyUserIsDossierOwner(dossierId);
var result = dossierAttributesManagementService.setDossierAttributes(dossierId, dossierAttributes.getDossierAttributeList());
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Changed dossier attributes.")
.build());
return new DossierAttributes(result);
}
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES + "')")
public DossierAttributes addOrUpdateDossierAttribute(String dossierId, DossierAttribute dossierAttribute) {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
accessControlService.verifyUserIsDossierOwner(dossierId);
DossierAttribute result = dossierAttributesManagementService.addOrUpdateDossierAttribute(dossierId, dossierAttribute);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Added or updated dossier attributes.")
.build());
return new DossierAttributes(List.of(result)); // TODO should be single Object???
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER_ATTRIBUTES + "')")
public DossierAttributes getDossierAttributes(String dossierId) {
//check if dossier exists before verifying permissions
dossierPersistenceService.findByDossierId(dossierId);
List<DossierAttribute> result = Collections.emptyList();
if (accessControlService.hasUserViewPermissionsForDossier(dossierId)) {
result = dossierAttributesManagementService.getDossierAttributes(dossierId);
}
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Got dossier attributes.")
.build());
return new DossierAttributes(result);
}
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_ATTRIBUTES + "')")
public void deleteDossierAttribute(String dossierId, String dossierAttributeId) {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
accessControlService.verifyUserIsDossierOwner(dossierId);
dossierAttributesManagementService.deleteDossierAttribute(dossierId, dossierAttributeId);
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Changed dossier attributes.")
.build());
}
}

View File

@ -0,0 +1,633 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.ADD_UPDATE_DOSSIER;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.ARCHIVE_DOSSIER;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.DELETE_DOSSIER;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.UNARCHIVE_DOSSIER;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;
import com.iqser.red.service.persistence.management.v1.processor.entity.dossier.DossierAttributeEntity;
import com.iqser.red.service.persistence.management.v1.processor.model.websocket.DossierEventType;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierCreatorService;
import com.iqser.red.service.persistence.management.v1.processor.service.FilterByPermissionsService;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierChangeResponseV2;
import com.iqser.red.service.persistence.service.v1.api.shared.model.JsonNode;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.prepost.PostFilter;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PreFilter;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.google.common.collect.Lists;
import com.iqser.red.service.persistence.management.v1.processor.acl.custom.dossier.DossierACLService;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.roles.ApplicationRoles;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileStatusManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.websocket.WebsocketService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.DossierAttributePersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.NotificationPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.users.UserService;
import com.iqser.red.service.persistence.management.v1.processor.service.users.model.User;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierChangeEntry;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierInformation;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AddNotificationRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.CreateOrUpdateDossierRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.Dossier;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.DossierAttributes;
import com.iqser.red.service.persistence.service.v1.api.shared.model.notification.NotificationType;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DossierController implements DossierResource {
private static final Set<String> VALID_MEMBER_ROLES = Set.of(ApplicationRoles.RED_USER_ROLE, ApplicationRoles.RED_MANAGER_ROLE);
private final DossierManagementService dossierManagementService;
private final UserService userService;
private final FilterByPermissionsService filterByPermissionsService;
private final FileStatusManagementService fileStatusManagementService;
private final AuditPersistenceService auditPersistenceService;
private final NotificationPersistenceService notificationPersistenceService;
private final AccessControlService accessControlService;
private final DossierACLService dossierACLService;
private final DossierCreatorService dossierCreatorService;
private final WebsocketService websocketService;
private final DossierAttributePersistenceService dossierAttributePersistenceService;
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public DossierInformation getDossierInformation() {
return dossierManagementService.getDossierInformation(dossierACLService.getDossierIdsWithViewPermission());
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
@PostFilter("hasPermission(filterObject.dossierId, 'Dossier', 'VIEW_OBJECT')")
public List<DossierChangeEntry> changesSince(@RequestBody JSONPrimitive<OffsetDateTime> since) {
return dossierManagementService.changesSince(since)
.stream()
.map(d -> new DossierChangeEntry(d.getDossierId(), d.isDossierChanges(), d.isFileChanges()))
.collect(Collectors.toList());
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public DossierChangeResponseV2 changesSinceV2(@RequestBody JSONPrimitive<OffsetDateTime> since) {
DossierChangeResponseV2 changes = dossierManagementService.changesSinceV2(since);
// filter only viewables
changes.setFileChanges(filterByPermissionsService.onlyViewableHavingDossierId(changes.getFileChanges()));
changes.setDossierChanges(filterByPermissionsService.onlyViewableHavingDossierId(changes.getDossierChanges()));
return changes;
}
@Override
@PreAuthorize("hasAuthority('" + ADD_UPDATE_DOSSIER + "') && (#dossierRequest.dossierId == null || hasPermission(#dossierRequest.dossierId, 'Dossier', 'ACCESS_OBJECT') )")
public ResponseEntity<Dossier> createDossierOrUpdateDossier(@RequestBody DossierRequest dossierRequest) {
if (dossierRequest.getDossierId() != null && dossierRequest.getOwnerId() == null) {
throw new BadRequestException("Owner must be set for any update");
}
// this code always executes - members, approvers and owner must be valid
String ownerId = getAndValidateOwnerId(dossierRequest.getOwnerId());
Set<String> members = getAndValidateMembers(ownerId, dossierRequest.getMemberIds());
Set<String> approvers = getAndValidateMembers(ownerId, dossierRequest.getApproverIds());
members.addAll(approvers);
if ((dossierRequest.getDownloadFileTypes() == null || dossierRequest.getDownloadFileTypes().isEmpty()) && (dossierRequest.getReportTemplateIds() == null
|| dossierRequest.getReportTemplateIds().isEmpty())) {
throw new BadRequestException("Download and report types cannot both be empty");
}
// if dossierId is set - load dossier
if (StringUtils.isNotEmpty(dossierRequest.getDossierId())) {
Dossier existingDossier = dossierACLService.enhanceDossierWithACLData(dossierManagementService.getDossierById(dossierRequest.getDossierId(), true, false));
if (existingDossier.getArchivedTime() != null) {
checkValidityForArchivedDossierUpdateRequest(dossierRequest, existingDossier);
}
// update using data from request and computed owner/members/approvers
Dossier updatedDossier = dossierManagementService.updateDossier(CreateOrUpdateDossierRequest.builder()
.dossierName(dossierRequest.getDossierName())
.description(dossierRequest.getDescription())
.dossierTemplateId(dossierRequest.getDossierTemplateId())
.downloadFileTypes(dossierRequest.getDownloadFileTypes())
.dueDate(dossierRequest.getDueDate())
.reportTemplateIds(new ArrayList<>(dossierRequest.getReportTemplateIds()))
.watermarkId(dossierRequest.getWatermarkId())
.previewWatermarkId(dossierRequest.getPreviewWatermarkId())
.dossierStatusId(dossierRequest.getDossierStatusId())
.build(), existingDossier.getId());
dossierACLService.updateDossierACL(members, approvers, ownerId, updatedDossier.getId());
dossierACLService.enhanceDossierWithACLData(updatedDossier);
updateFileStatusForDossierFiles(updatedDossier.getId(), members);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(updatedDossier.getId())
.category(AuditCategory.DOSSIER.name())
.message("Dossier has been updated.")
.build());
if (existingDossier.getOwnerId() == null || !existingDossier.getOwnerId().equals(ownerId)) {
if (ownerId != null && !ownerId.equals(KeycloakSecurity.getUserId())) {
notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(ownerId)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.DOSSIER_OWNER_SET.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build());
}
if (existingDossier.getOwnerId() != null && !existingDossier.getOwnerId().equals(KeycloakSecurity.getUserId())) {
notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(existingDossier.getOwnerId())
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.DOSSIER_OWNER_REMOVED.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build());
}
}
Set<String> uniqueMembers = new LinkedHashSet<>(members);
uniqueMembers.addAll(approvers);
uniqueMembers.stream()
.filter(member -> !member.equals(ownerId) && !member.equals(KeycloakSecurity.getUserId()) && (existingDossier.getMemberIds() == null
|| !existingDossier.getMemberIds().contains(member)))
.forEach(member -> notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(member)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.USER_BECOMES_DOSSIER_MEMBER.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build()));
if (existingDossier.getMemberIds() != null) {
existingDossier.getMemberIds()
.stream()
.filter(member -> !members.contains(member) && !approvers.contains(member) && !member.equals(KeycloakSecurity.getUserId()))
.forEach(member -> notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(member)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.USER_REMOVED_AS_DOSSIER_MEMBER.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build()));
}
approvers.stream()
.filter(approver -> !KeycloakSecurity.getUserId().equals(approver) && existingDossier.getMemberIds() != null && existingDossier.getMemberIds()
.contains(approver) && (existingDossier.getApproverIds() == null || !existingDossier.getApproverIds().contains(approver)))
.forEach(approver -> notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(approver)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.USER_PROMOTED_TO_APPROVER.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build()));
members.stream()
.filter(member -> !member.equals(KeycloakSecurity.getUserId())
&& existingDossier.getApproverIds() != null
&& existingDossier.getApproverIds().contains(member)
&& !approvers.contains(member))
.forEach(member -> notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(member)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.USER_DEGRADED_TO_REVIEWER.name())
.target(Map.of("dossierId", dossierRequest.getDossierId()))
.build()));
websocketService.sendDossierEvent(dossierRequest.getDossierId(), DossierEventType.UPDATE);
updatedDossier.setDossierAttributes(convertDossierAttributes(dossierAttributePersistenceService.getDossierAttributes(updatedDossier.getId())));
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<>(updatedDossier, httpHeaders, HttpStatus.OK);
} else {
Dossier created = createNewDossier(dossierRequest, ownerId, members, approvers);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(created.getId())
.category(AuditCategory.DOSSIER.name())
.message("Dossier has been created.")
.build());
websocketService.sendDossierEvent(created.getId(), DossierEventType.CREATE);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<>(created, httpHeaders, HttpStatus.CREATED);
}
}
private String getAndValidateOwnerId(String ownerId) {
String currentUserId = KeycloakSecurity.getUserId();
// quick check if self, just proceed
if (currentUserId.equals(ownerId)) {
return currentUserId;
}
String actualOwnerId = ownerId == null ? currentUserId : ownerId;
var user = userService.getUserById(actualOwnerId);
if (user.isEmpty()) {
userService.removeDeletedUsers(Collections.singleton(ownerId));
actualOwnerId = null;
}
// check he has a manager role, thus he can be the owner
if (user.isPresent() && user.get().getRoles()
.stream()
.noneMatch(ApplicationRoles.RED_MANAGER_ROLE::equals)) {
throw new BadRequestException("Make sure provided user id has the manager role.");
}
return actualOwnerId;
}
private Set<String> getAndValidateMembers(String ownerId, Set<String> memberIds) {
Set<String> actualMemberIds = memberIds == null ? new TreeSet<>() : memberIds;
if (actualMemberIds.stream()
.anyMatch(Objects::isNull)) {
throw new BadRequestException("Member IDs cannot be null");
}
// add owner automatically
if (ownerId != null) {
actualMemberIds.add(ownerId);
}
List<User> users = userService.getUsersByIds(actualMemberIds);
if (users.size() != actualMemberIds.size()) {
Set<String> deletedUserIds = userService.removeDeletedUsers(actualMemberIds);
actualMemberIds.removeAll(deletedUserIds);
}
if (users.stream()
.anyMatch(u -> u.getRoles()
.stream()
.noneMatch(VALID_MEMBER_ROLES::contains))) {
throw new BadRequestException("Make sure each provided member id has the permission to be a member of a dossier.");
}
return actualMemberIds;
}
private void checkValidityForArchivedDossierUpdateRequest(DossierRequest updatedDossier, Dossier existingDossier) {
//these must not be editted for archived dossiers
checkEquality(updatedDossier.getDossierTemplateId(), existingDossier.getDossierTemplateId(), "dossier template id");
checkEquality(updatedDossier.getDossierName(), existingDossier.getDossierName(), "dossier name");
checkEquality(updatedDossier.getDescription(), existingDossier.getDescription(), "the description");
checkEquality(updatedDossier.getDueDate(), existingDossier.getDueDate(), "the due date");
checkEquality(updatedDossier.getDossierStatusId(), existingDossier.getDossierStatusId(), "dossier status id");
}
private void updateFileStatusForDossierFiles(String dossierId, Collection<String> members) {
fileStatusManagementService.getDossierStatus(dossierId)
.stream()
.filter(fileStatus -> !fileStatus.isSoftOrHardDeleted())
.forEach(f -> {
if (f.getAssignee() != null && !members.contains(f.getAssignee())) {
fileStatusManagementService.setCurrentFileAssignee(dossierId, f.getId(), null);
}
});
}
private Dossier createNewDossier(DossierRequest dossier, String ownerId, Set<String> members, Set<String> approvers) {
Dossier newDossier = dossierCreatorService.addDossier(CreateOrUpdateDossierRequest.builder()
.dossierName(dossier.getDossierName().trim())
.description(dossier.getDescription())
.dossierTemplateId(dossier.getDossierTemplateId())
.downloadFileTypes(dossier.getDownloadFileTypes())
.dueDate(dossier.getDueDate())
.reportTemplateIds(dossier.getReportTemplateIds()
!= null ? new ArrayList<>(dossier.getReportTemplateIds()) : Lists.newArrayList())
.watermarkId(dossier.getWatermarkId())
.previewWatermarkId(dossier.getPreviewWatermarkId())
.dossierStatusId(dossier.getDossierStatusId())
.build(), members, approvers, ownerId);
dossierACLService.enhanceDossierWithACLData(newDossier);
newDossier.setDossierAttributes(new DossierAttributes());
return newDossier;
}
private <T> void checkEquality(T updatedValue, T existingValue, String message) {
if (updatedValue == null && existingValue != null || updatedValue != null && existingValue == null) {
throw new BadRequestException(String.format("You cannot edit %s in an archived dossier.", message));
}
if (updatedValue == null && existingValue == null) {
return;
}
if (!updatedValue.equals(existingValue)) {
throw new BadRequestException(String.format("You cannot edit %s in an archived dossier.", message));
}
}
@PreAuthorize("hasAuthority('" + DELETE_DOSSIER + "')")
public void deleteDossier(@PathVariable(DOSSIER_ID_PARAM) String dossierId) {
Dossier dossier = dossierACLService.enhanceDossierWithACLData(dossierManagementService.getDossierById(dossierId, true, false));
accessControlService.checkAccessPermissionsToDossier(dossierId);
if (dossier.getOwnerId() != null && !dossier.getOwnerId().equals(KeycloakSecurity.getUserId())) {
throw new AccessDeniedException("Can not delete dossier that is owned by a different user");
}
dossierManagementService.softDeleteDossier(dossierId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Dossier moved to trash.")
.build());
dossier.getMemberIds()
.stream()
.filter(m -> !KeycloakSecurity.getUserId().equals(m))
.forEach(member -> notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(member)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.DOSSIER_DELETED.name())
.target(Map.of("dossierId", dossierId, "dossierName", dossier.getDossierName()))
.build()));
websocketService.sendDossierEvent(dossierId, DossierEventType.SOFT_DELETE);
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public JSONPrimitive<Map<String, Dossier>> getDossiersByIds(@RequestBody JSONPrimitive<Set<String>> dossierIds) {
// filter dossiers based on view
var viewableDossierIds = filterByPermissionsService.onlyViewableDossierIds(dossierIds.getValue());
// load dossiers
var dossiers = dossierManagementService.getDossiersByIds(viewableDossierIds);
// add attributes and ACL - already filtered before loading
enhanceDossiersWithAttributeAndACLData(dossiers,false);
// build response
var responseMap = new LinkedHashMap<String, Dossier>();
for (var dossier : dossiers) {
responseMap.put(dossier.getId(), dossier);
}
return new JSONPrimitive<>(responseMap);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public Dossier getDossier(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted) {
accessControlService.checkViewPermissionsToDossier(dossierId);
var dossier = dossierManagementService.getDossierById(dossierId, includeArchived, includeDeleted);
dossier.setDossierAttributes(convertDossierAttributes(dossierAttributePersistenceService.getDossierAttributes(dossierId)));
return dossierACLService.enhanceDossierWithACLData(dossier);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public List<Dossier> getDossiers(@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted) {
var dossiers = dossierManagementService.getAllDossiers(includeArchived, includeDeleted);
return enhanceDossiersWithAttributeAndACLData(dossiers);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public List<Dossier> getDossiersForDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
@RequestParam(name = INCLUDE_ARCHIVED_PARAM, defaultValue = "false", required = false) boolean includeArchived,
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted) {
var dossiers = dossierManagementService.getAllDossiersForDossierTemplateId(dossierTemplateId, includeArchived, includeDeleted);
return enhanceDossiersWithAttributeAndACLData(dossiers);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public List<Dossier> getSoftDeletedDossiers() {
var dossiers = dossierManagementService.getSoftDeletedDossiers();
return enhanceDossiersWithAttributeAndACLData(dossiers);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public List<Dossier> getArchivedDossiers() {
var dossiers = dossierManagementService.getArchivedDossiers();
return enhanceDossiersWithAttributeAndACLData(dossiers);
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public List<Dossier> getArchivedDossiersForDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId) {
var dossiers = dossierManagementService.getArchivedDossiersForDossierTemplateId(dossierTemplateId);
return enhanceDossiersWithAttributeAndACLData(dossiers);
}
@PreAuthorize("hasAuthority('" + ARCHIVE_DOSSIER + "')")
@PreFilter("hasPermission(filterObject, 'Dossier', 'ACCESS_OBJECT')")
public void archiveDossiers(@RequestBody Set<String> dossierIds) {
for (String dossierId : dossierIds) {
accessControlService.verifyUserIsDossierOwner(dossierId);
}
dossierManagementService.archiveDossiers(dossierIds);
for (String dossierId : dossierIds) {
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Dossier archived.")
.build());
websocketService.sendDossierEvent(dossierId, DossierEventType.ARCHIVE);
}
}
@PreAuthorize("hasAuthority('" + UNARCHIVE_DOSSIER + "')")
@PreFilter("hasPermission(filterObject, 'Dossier', 'ACCESS_OBJECT')")
public void unarchiveDossiers(@RequestBody Set<String> dossierIds) {
dossierManagementService.unarchiveDossiers(dossierIds);
for (String dossierId : dossierIds) {
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Dossier restored from archive.")
.build());
websocketService.sendDossierEvent(dossierId, DossierEventType.UNARCHIVE);
}
}
@PreAuthorize("hasAuthority('" + DELETE_DOSSIER + "')")
@PreFilter("hasPermission(filterObject, 'Dossier', 'ACCESS_OBJECT')")
public void hardDeleteDossiers(@RequestParam(DOSSIER_ID_PARAM) Set<String> dossierIds) {
var filteredDossierIds = filterDossierIdsByOwnedKeepUnowned(dossierIds);
dossierManagementService.hardDeleteDossiers(filteredDossierIds);
for (String dossierId : filteredDossierIds) {
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Dossier permanently deleted.")
.build());
websocketService.sendDossierEvent(dossierId, DossierEventType.HARD_DELETE);
}
}
@PreAuthorize("hasAuthority('" + DELETE_DOSSIER + "')")
@PreFilter("hasPermission(filterObject, 'Dossier', 'ACCESS_OBJECT')")
public void undeleteDossiers(@RequestBody Set<String> dossierIds) {
var filteredDossierIds = filterDossierIdsByOwnedKeepUnowned(dossierIds);
dossierManagementService.undeleteDossiers(filteredDossierIds);
for (String dossierId : filteredDossierIds) {
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierId)
.category(AuditCategory.DOSSIER.name())
.message("Dossier restored from trash.")
.build());
websocketService.sendDossierEvent(dossierId, DossierEventType.UNDELETE);
}
}
private Set<String> filterDossierIdsByOwnedKeepUnowned(Set<String> dossierIds) {
return dossierIds.stream()
.map(id -> dossierManagementService.getDossierById(id, true, true))
.map(dossierACLService::enhanceDossierWithACLData)
.filter(dossier -> dossier.getOwnerId() == null || dossier.getOwnerId().equals(KeycloakSecurity.getUserId()))
.map(Dossier::getId)
.collect(Collectors.toSet());
}
private DossierAttributes convertDossierAttributes(List<DossierAttributeEntity> dossierAttributeEntities) {
Map<String, String> attributeIdToValue = new HashMap<>();
for (DossierAttributeEntity dossierAttributeEntity : dossierAttributeEntities) {
attributeIdToValue.put(dossierAttributeEntity.getId().getDossierAttributeConfigId(), dossierAttributeEntity.getValue());
}
return new DossierAttributes(attributeIdToValue);
}
private List<Dossier> enhanceDossiersWithAttributeAndACLData(List<Dossier> dossiers) {
return enhanceDossiersWithAttributeAndACLData(dossiers, true);
}
private List<Dossier> enhanceDossiersWithAttributeAndACLData(List<Dossier> dossiers, boolean filter) {
// filter first, only load attributes and ACL for viewable dossiers
List<Dossier> filteredDossiers = filter ? filterByPermissionsService.onlyViewableDossiers(dossiers) : dossiers;
// load all attributes at once
var attributes = dossierAttributePersistenceService.getDossierAttributes(filteredDossiers.stream().map(Dossier::getId).collect(Collectors.toSet()));
var attributesMap = new HashMap<String, List<DossierAttributeEntity>>();
for (DossierAttributeEntity attribute : attributes) {
attributesMap.computeIfAbsent(attribute.getId().getDossierId(), k -> new ArrayList<>()).add(attribute);
}
for (var dossier : filteredDossiers) {
// set attributes
dossier.setDossierAttributes(convertDossierAttributes(attributesMap.getOrDefault(dossier.getId(), new ArrayList<>())));
// set ACL data
dossierACLService.enhanceDossierWithACLData(dossier);
}
return filteredDossiers;
}
}

View File

@ -0,0 +1,52 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PreFilter;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierStatsService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierStatsResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierStats;
import feign.FeignException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DossierStatsController implements DossierStatsResource {
private final DossierStatsService dossierStatsService;
private final AccessControlService accessControlService;
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
public DossierStats getDossierStats(@PathVariable(DOSSIER_ID_PARAM) String dossierId) {
accessControlService.checkViewPermissionsToDossier(dossierId);
return dossierStatsService.getDossierStats(dossierId);
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER + "')")
@PreFilter("hasPermission(filterObject, 'Dossier', 'VIEW_OBJECT')")
public List<DossierStats> getDossierStats(@RequestBody Set<String> dossierIds) {
return dossierIds.stream()
.map(dossierStatsService::getDossierStats)
.collect(Collectors.toList());
}
}

View File

@ -0,0 +1,121 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER_STATUS;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_DOSSIER_STATUS;
import java.util.List;
import jakarta.transaction.Transactional;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.DossierStatusPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.utils.ColorUtils;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierStatusResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierStatusRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.CreateOrUpdateDossierStatusRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.DossierStatusInfo;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DossierStatusController implements DossierStatusResource {
private final DossierStatusPersistenceService dossierStatusPersistenceService;
private final AuditPersistenceService auditPersistenceService;
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_STATUS + "')")
public DossierStatusInfo createOrUpdateDossierStatus(@RequestBody DossierStatusRequest dossierStatusRequest) {
if (dossierStatusRequest.getDossierTemplateId() == null) {
throw new BadRequestException("Dossier Template must be set for creation");
}
if (dossierStatusRequest.getName() == null || dossierStatusRequest.getName().isEmpty()) {
throw new BadRequestException("Dossier status name must be set");
}
//validate color
ColorUtils.validateColor(dossierStatusRequest.getColor());
//validate rank
if (dossierStatusRequest.getRank() < 0) {
throw new BadRequestException("The rank must not be negative");
}
var response = dossierStatusPersistenceService.createOrUpdateDossierStatus(CreateOrUpdateDossierStatusRequest.builder()
.dossierStatusId(dossierStatusRequest.getDossierStatusId())
.name(dossierStatusRequest.getName())
.description(dossierStatusRequest.getDescription())
.dossierTemplateId(dossierStatusRequest.getDossierTemplateId())
.rank(dossierStatusRequest.getRank())
.color(dossierStatusRequest.getColor())
.build());
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierStatusRequest.getDossierTemplateId())
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier states have been updated.")
.build());
return MagicConverter.convert(response, DossierStatusInfo.class);
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_STATUS + "')")
public List<DossierStatusInfo> getAllDossierStatusForTemplate(@PathVariable("dossierTemplateId") String dossierTemplateId) {
return dossierStatusPersistenceService.getAllDossierStatusForTemplate(dossierTemplateId);
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_STATUS + "')")
public List<DossierStatusInfo> getAllDossierStatuses(@RequestBody List<String> dossierTemplateIds) {
return dossierStatusPersistenceService.getAllDossierStatuses(dossierTemplateIds);
}
@Override
@Transactional
@PreAuthorize("hasAuthority('" + READ_DOSSIER_STATUS + "')")
public DossierStatusInfo getDossierStatus(@PathVariable("dossierStatusId") String dossierStatusId) {
return dossierStatusPersistenceService.getDossierStatusInfo(dossierStatusId);
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_STATUS + "')")
public void deleteDossierStatus(@PathVariable("dossierStatusId") String dossierStatusId,
@RequestParam(value = DOSSIER_STATUS_REPLACE_ID, required = false) String replaceDossierStatusId) {
var dossierTemplateId = dossierStatusPersistenceService.getDossierStatus(dossierStatusId).getDossierTemplateId();
dossierStatusPersistenceService.deleteDossierStatus(dossierStatusId, replaceDossierStatusId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier state has been deleted.")
.build());
}
}

View File

@ -0,0 +1,320 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER_TEMPLATES;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_DOSSIER_TEMPLATES;
import static com.iqser.red.service.persistence.management.v1.processor.service.FeignExceptionHandler.processFeignException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.iqser.red.service.persistence.management.v1.processor.acl.custom.dossier.DossierACLService;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.exception.ConflictException;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierTemplateManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierTemplateStatsService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.users.UserService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierTemplateResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierTemplateModel;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DownloadResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.CloneDossierTemplateRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.CreateOrUpdateDossierTemplateRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierTemplate;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierTemplateStats;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierTemplateStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.Dossier;
import com.iqser.red.service.persistence.management.v1.processor.dataexchange.models.ExportDownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.importexport.ImportDossierTemplateRequest;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import feign.FeignException;
import io.micrometer.core.annotation.Timed;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DossierTemplateController implements DossierTemplateResource {
private final DossierTemplateManagementService dossierTemplateManagementService;
private final DossierTemplateStatsService dossierTemplateStatsService;
private final AuditPersistenceService auditPersistenceService;
private final DossierManagementService dossierManagementService;
private final DossierACLService dossierACLService;
private final UserService userService;
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_TEMPLATES + "')")
public DossierTemplateModel createOrUpdateDossierTemplate(@RequestBody DossierTemplateModel dossierTemplateModel) {
String userId = KeycloakSecurity.getUserId();
dossierTemplateModel.setCreatedBy(userId);
dossierTemplateModel.setModifiedBy(userId);
var dossierTemplate = new CreateOrUpdateDossierTemplateRequest();
BeanUtils.copyProperties(dossierTemplateModel, dossierTemplate);
try {
DossierTemplateModel response = convert(dossierTemplateManagementService.createOrUpdateDossierTemplate(dossierTemplate));
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(response.getDossierTemplateId())
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier Template has been added or updated")
.build());
return response;
} catch (FeignException e) {
throw processFeignException(e);
}
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public List<DossierTemplateModel> getAllDossierTemplates() {
return dossierTemplateManagementService.getAllDossierTemplates()
.stream()
.map(this::convert)
.collect(Collectors.toList());
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public DossierTemplateModel getDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
try {
return convert(dossierTemplateManagementService.getDossierTemplate(dossierTemplateId));
} catch (FeignException e) {
throw processFeignException(e);
}
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_TEMPLATES + "')")
public void deleteDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
String userId = KeycloakSecurity.getUserId();
List<Dossier> dossiers = dossierManagementService.getAllDossiers(true, false);
if (dossiers != null && dossiers.stream()
.anyMatch(dossier -> dossier.getDossierTemplateId().equals(dossierTemplateId))) {
throw new ConflictException("Can not delete dossier template because there are dossiers based on it");
}
dossierTemplateManagementService.deleteDossierTemplate(dossierTemplateId, userId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier Template has been deleted")
.build());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_TEMPLATES + "')")
public void deleteDossierTemplates(@RequestBody List<String> dossierTemplateIds) {
String userId = KeycloakSecurity.getUserId();
List<String> errorIds = new ArrayList<>();
for (String dossierTemplateId : dossierTemplateIds) {
try {
List<Dossier> dossiers = dossierManagementService.getAllDossiers(true, false);
if (dossiers != null && dossiers.stream()
.anyMatch(dossier -> dossier.getDossierTemplateId().equals(dossierTemplateId))) {
throw new ConflictException("Can not delete dossier template because there are dossiers based on it");
}
dossierTemplateManagementService.deleteDossierTemplate(dossierTemplateId, userId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier template has been deleted")
.build());
} catch (FeignException e) {
errorIds.add(dossierTemplateId);
}
}
if (!errorIds.isEmpty()) {
throw new BadRequestException("Failed to delete dossier templates with ids: " + errorIds);
}
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_TEMPLATES + "')")
public DossierTemplateModel cloneDossierTemplate(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId,
@RequestBody CloneDossierTemplateRequest cloneDossierTemplateRequest) {
String userId = KeycloakSecurity.getUserId();
try {
DossierTemplateModel response = convert(dossierTemplateManagementService.cloneDossierTemplate(dossierTemplateId, cloneDossierTemplateRequest));
auditPersistenceService.audit(AuditRequest.builder()
.userId(userId)
.objectId(response.getDossierTemplateId())
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier Template has been cloned")
.build());
return response;
} catch (FeignException e) {
throw processFeignException(e);
}
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public DossierTemplateStats getDossierTemplateStats(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
try {
var stats = dossierTemplateStatsService.getDossierTemplateStats(dossierTemplateId);
enhanceDossierTemplateStatsWithACLMemberDetails(stats);
return stats;
} catch (FeignException e) {
throw processFeignException(e);
}
}
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public List<DossierTemplateStats> getDossierTemplateStats() {
try {
var statsList = dossierTemplateStatsService.getDossierTemplateStats();
statsList.forEach(this::enhanceDossierTemplateStatsWithACLMemberDetails);
return statsList;
} catch (FeignException e) {
throw processFeignException(e);
}
}
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public DownloadResponse prepareExportDownload(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
try {
ExportDownloadRequest request = ExportDownloadRequest.builder().dossierTemplateId(dossierTemplateId).userId(KeycloakSecurity.getUserId()).build();
var response = dossierTemplateManagementService.prepareExportDownload(request);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(response.getValue())
.category(AuditCategory.DOWNLOAD.name())
.message("Export Download was prepared")
.details(Map.of("dossierTemplateId", request.getDossierTemplateId()))
.build());
return new DownloadResponse(response.getValue());
} catch (FeignException e) {
throw processFeignException(e);
}
}
@Timed
@PreAuthorize("hasAuthority('" + WRITE_DOSSIER_TEMPLATES + "')")
public DossierTemplateModel importDossierTemplate(@RequestPart(name = "file") MultipartFile file,
@RequestParam(value = DOSSIER_TEMPLATE_ID, required = false) String dossierTemplateId,
@RequestParam(value = "updateExistingDossierTemplate", required = false, defaultValue = "false") boolean updateExistingDossierTemplate) {
String originalFileName = file.getOriginalFilename();
if (originalFileName == null || originalFileName.isEmpty()) {
throw new BadRequestException("Could not upload file, no filename provided.");
}
var extension = originalFileName.substring(originalFileName.lastIndexOf(".") + 1).toLowerCase(Locale.ROOT);
if ("zip".equalsIgnoreCase(extension)) {
if (StringUtils.isEmpty(dossierTemplateId) && updateExistingDossierTemplate) {
throw new BadRequestException("Could not update with dossier template empty");
}
try {
if (dossierTemplateId != null && updateExistingDossierTemplate) {
dossierTemplateManagementService.getDossierTemplate(dossierTemplateId); //check if the dossierTemplate to update exists
}
ImportDossierTemplateRequest request = ImportDossierTemplateRequest.builder()
.dossierTemplateId(dossierTemplateId)
.updateExistingDossierTemplate(updateExistingDossierTemplate)
.userId(KeycloakSecurity.getUserId())
.archive(file.getBytes())
.build();
DossierTemplate loadedDossierTemplate = dossierTemplateManagementService.importDossierTemplate(request);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(loadedDossierTemplate.getId())
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Dossier template was imported")
.details(Map.of("dossierTemplateId", loadedDossierTemplate.getId()))
.build());
return convert(loadedDossierTemplate);
} catch (IOException e) {
throw new BadRequestException(e.getMessage(), e);
} catch (FeignException e) {
throw processFeignException(e);
}
} else {
throw new BadRequestException("Invalid extension");
}
}
private void enhanceDossierTemplateStatsWithACLMemberDetails(DossierTemplateStats stats) {
Set<String> members = new HashSet<>();
stats.getDossiersInTemplate()
.forEach(d -> members.addAll(dossierACLService.getMembers(d)));
stats.setNumberOfPeople(members.size());
}
private DossierTemplateModel convert(DossierTemplate dossierTemplate) {
return DossierTemplateModel.builder()
.id(dossierTemplate.getId())
.name(dossierTemplate.getName())
.description(dossierTemplate.getDescription())
.dateAdded(dossierTemplate.getDateAdded())
.dateModified(dossierTemplate.getDateModified())
.createdBy(dossierTemplate.getCreatedBy())
.modifiedBy(dossierTemplate.getModifiedBy())
.validFrom(dossierTemplate.getValidFrom())
.validTo(dossierTemplate.getValidTo())
.downloadFileTypes(dossierTemplate.getDownloadFileTypes())
.status(DossierTemplateStatus.valueOf(dossierTemplate.getDossierTemplateStatus().name()))
.keepImageMetadata(dossierTemplate.isKeepImageMetadata())
.keepHiddenText(dossierTemplate.isKeepHiddenText())
.keepOverlappingObjects(dossierTemplate.isKeepOverlappingObjects())
.applyDictionaryUpdatesToAllDossiersByDefault(dossierTemplate.isApplyDictionaryUpdatesToAllDossiersByDefault())
.ocrByDefault(dossierTemplate.isOcrByDefault())
.removeWatermark(dossierTemplate.isRemoveWatermark())
.build();
}
}

View File

@ -0,0 +1,33 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOSSIER_TEMPLATES;
import java.util.List;
import java.util.Set;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierTemplateStatsService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DossierTemplateStatsResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierTemplateDictionaryStats;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DossierTemplateStatsController implements DossierTemplateStatsResource {
private final DossierTemplateStatsService dossierTemplateStatsService;
@Override
@PreAuthorize("hasAuthority('" + READ_DOSSIER_TEMPLATES + "')")
public List<DossierTemplateDictionaryStats> getDossierTemplateStats(Set<String> dossierTemplateIds) {
return dossierTemplateStatsService.getDossierTemplateStats(dossierTemplateIds);
}
}

View File

@ -0,0 +1,342 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.PROCESS_DOWNLOAD;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_DOWNLOAD_STATUS;
import java.io.BufferedInputStream;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.InputStreamResource;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import com.iqser.red.persistence.service.v1.external.api.impl.service.OneTimeTokenService;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.exception.NotFoundException;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.DossierManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.DownloadService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileManagementStorageService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileStatusManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileStatusService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.utils.StringEncodingUtils;
import com.iqser.red.service.persistence.service.v1.api.external.resource.DownloadResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DownloadResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.DownloadStatusResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.PrepareDownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.PrepareDownloadWithOptionRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.RemoveDownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.common.JSONPrimitive;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileModel;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.WorkflowStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.download.DownloadRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.download.DownloadStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.download.DownloadWithOptionRequest;
import com.iqser.red.storage.commons.service.StorageService;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import com.knecon.fforesight.tenantcommons.TenantContext;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class DownloadController implements DownloadResource {
private static final Pattern COLOR_PATTERN = Pattern.compile("^#[\\da-f]{6,6}$");
private final DossierManagementService dossierService;
private final FileStatusService fileStatusService;
private final DownloadService downloadService;
private final StorageService storageService;
private final AuditPersistenceService auditPersistenceService;
private final OneTimeTokenService oneTimeTokenDownloadService;
private final AccessControlService accessControlService;
private final FileManagementStorageService fileManagementStorageService;
private final FileStatusManagementService fileStatusManagementService;
private final String REPORT_INFO = "/REPORT_INFO.json";
@Value("${storage.backend}")
private String storageBackend;
@Deprecated(forRemoval = true)
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
public DownloadResponse prepareDownload(@RequestBody PrepareDownloadRequest request) {
if (request.getIncludeUnprocessed() == null) {
request.setIncludeUnprocessed(true);
}
// check the user is non-member or reviewer
accessControlService.verifyUserIsDossierOwnerOrApprover(request.getDossierId());
var response = downloadService.prepareDownload(convert(request));
auditPersistenceService.insertRecord(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(response.getValue())
.category(AuditCategory.DOWNLOAD.name())
.message("Download was prepared")
.details(Map.of("dossierId", request.getDossierId()))
.build());
return new DownloadResponse(response.getValue());
}
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
public DownloadResponse prepareDownload(@RequestBody PrepareDownloadWithOptionRequest request) {
if (request.getIncludeUnprocessed() == null) {
request.setIncludeUnprocessed(true);
}
validateDossierId(request.getDossierId());
validateAndFilterFileIds(request);
if ((request.getDownloadFileTypes() == null || request.getDownloadFileTypes().isEmpty()) && (request.getReportTemplateIds() == null || request.getReportTemplateIds()
.isEmpty())) {
throw new BadRequestException("Download and report types cannot both be empty");
}
if (request.getRedactionPreviewColor() != null && !COLOR_PATTERN.matcher(request.getRedactionPreviewColor()).matches()) {
throw new BadRequestException("The specified redaction-preview-color is malformed.");
}
var response = downloadService.prepareDownload(convert(request));
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(response.getValue())
.category(AuditCategory.DOWNLOAD.name())
.message("Download was prepared")
.details(Map.of("dossierId", request.getDossierId()))
.build());
return new DownloadResponse(response.getValue());
}
private void validateDossierId(String dossierId) {
if (StringUtils.isBlank(dossierId)) {
throw new BadRequestException("Empty dossier id");
}
dossierService.getDossierById(dossierId, true, false);
accessControlService.verifyUserIsDossierOwnerOrApprover(dossierId);
}
private void validateAndFilterFileIds(PrepareDownloadWithOptionRequest request) {
List<FileModel> validFiles = fileStatusService.getDossierStatus(request.getDossierId());
var fileIds = request.getFileIds();
if (fileIds != null && !fileIds.isEmpty()) { // validate the ids provided
if(fileIds.size() == 1) {
fileStatusManagementService.getFileStatus(fileIds.get(0), false);
}
validFiles = validFiles.stream()
.filter(f -> fileIds.contains(f.getId()))
.collect(Collectors.toList());
if (validFiles.isEmpty()) {
throw new NotFoundException("No provided file id was found");
}
} // otherwise consider the files from dossier
var validFilesAndNotProcessed = validFiles.stream()
.filter(f -> !(f.getAnalysisVersion() > 0 && f.getNumberOfAnalyses() > 0 && !f.isSoftOrHardDeleted()))
.collect(Collectors.toList());
if (!validFilesAndNotProcessed.isEmpty()) {
throw new BadRequestException("At least a file is in its initial analysis process");
}
request.setFileIds(validFiles.stream()
.map(FileModel::getId)
.collect(Collectors.toList()));
var approvedFiles = validFiles.stream()
.filter(f -> f.getWorkflowStatus().equals(WorkflowStatus.APPROVED))
.toList();
// special corner case: unapproved files, no reports and only REDACTED type selected
if (approvedFiles.isEmpty()
&& (request.getReportTemplateIds() == null || request.getReportTemplateIds().isEmpty())
&& request.getDownloadFileTypes() != null
&& request.getDownloadFileTypes().size() == 1
&& request.getDownloadFileTypes().contains(DownloadFileType.REDACTED)) {
throw new BadRequestException("Unapproved files in redacted state with no reports cannot be included");
}
}
private DownloadWithOptionRequest convert(PrepareDownloadWithOptionRequest request) {
return DownloadWithOptionRequest.builder()
.dossierId(request.getDossierId())
.userId(KeycloakSecurity.getUserId())
.fileIds(request.getFileIds())
.downloadFileTypes(request.getDownloadFileTypes())
.reportTemplateIds(request.getReportTemplateIds())
.redactionPreviewColor(request.getRedactionPreviewColor())
.includeUnprocessed(request.getIncludeUnprocessed())
.build();
}
@Override
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
public void deleteDownloadStatus(@RequestBody RemoveDownloadRequest removeDownloadRequest) {
removeDownloadRequest.getStorageIds()
.forEach(storageId -> {
downloadService.deleteDownloadStatus(JSONPrimitive.of(storageId));
fileManagementStorageService.deleteObject(storageId);
if (storageBackend.equals("s3")) {
var storageIdForS3 = generateReportJsonStorageIdForS3(storageId);
log.info("Deleting Report Json from S3 Storage {}", storageIdForS3);
fileManagementStorageService.deleteObject(storageIdForS3);
} else {
var storageIdForAzure = generateReportJsonStorageIdForAzure(storageId);
log.info("Deleting Report Json from Azure Storage {}", storageIdForAzure);
fileManagementStorageService.deleteObject(storageIdForAzure);
}
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(storageId)
.category(AuditCategory.DOWNLOAD.name())
.message("Remove Prepared Download")
.build());
});
}
@PreAuthorize("hasAuthority('" + READ_DOWNLOAD_STATUS + "')")
public DownloadStatusResponse getDownloadStatus() {
var resp = downloadService.getDownloadStatus(KeycloakSecurity.getUserId());
return new DownloadStatusResponse(resp);
}
@SneakyThrows
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
public void downloadFile(@RequestParam(STORAGE_ID) String storageId) {
var requestAttributes = RequestContextHolder.getRequestAttributes();
HttpServletResponse response = ((ServletRequestAttributes) requestAttributes).getResponse();
var userId = KeycloakSecurity.getUserId();
var downloadStatus = getDownloadStatus(storageId, userId);
var fileDownloadStream = getFileForDownload(storageId, userId);
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment" + "; filename*=utf-8''" + StringEncodingUtils.urlEncode(downloadStatus.getFilename()));
response.setHeader("Content-Length", String.valueOf(downloadStatus.getFileSize()));
org.apache.commons.io.IOUtils.copyLarge(fileDownloadStream.getInputStream(), response.getOutputStream());
response.flushBuffer();
}
private DownloadStatus getDownloadStatus(String storageId, String userId) {
// TODO Add endpoint to get single download status for userId and storageId.
var downloadStatusResponse = downloadService.getDownloadStatus(userId);
Optional<DownloadStatus> downloadStatusOptional = downloadStatusResponse.stream()
.filter(ds -> ds.getStorageId().equals(storageId))
.findFirst();
return downloadStatusOptional.orElseThrow(() -> new NotFoundException("Download status not found for this user"));
}
private InputStreamResource getFileForDownload(String storageId, String userId) {
try {
var response = storageService.getObject(TenantContext.getTenantId(), storageId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(userId)
.objectId(storageId)
.category(AuditCategory.DOWNLOAD.name())
.message("File was downloaded.")
.build());
downloadService.setDownloaded(JSONPrimitive.of(storageId));
return new InputStreamResource(new BufferedInputStream(response.getInputStream()));
} catch (Exception e) {
throw new NotFoundException(e.getMessage(), e);
}
}
@Override
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
public JSONPrimitive<String> generateOneTimeToken(@RequestBody JSONPrimitive<String> storageIdWrapper) {
log.debug("Generate one time token");
return JSONPrimitive.of(oneTimeTokenDownloadService.createToken(storageIdWrapper.getValue(), KeycloakSecurity.getUserId()).getTokenId());
}
@Override
@SneakyThrows
public void downloadFileUsingOTT(@PathVariable(OTT) String oneTimeToken, @RequestParam(value = "tenantId") String tenantId) {
TenantContext.setTenantId(tenantId);
var token = oneTimeTokenDownloadService.getToken(oneTimeToken);
var requestAttributes = RequestContextHolder.getRequestAttributes();
HttpServletResponse response = ((ServletRequestAttributes) requestAttributes).getResponse();
var downloadStatus = getDownloadStatus(token.getStorageId(), token.getUserId());
var fileDownloadStream = getFileForDownload(token.getStorageId(), token.getUserId());
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment" + "; filename*=utf-8''" + StringEncodingUtils.urlEncode(downloadStatus.getFilename()));
response.setHeader("Content-Length", String.valueOf(downloadStatus.getFileSize()));
org.apache.commons.io.IOUtils.copyLarge(fileDownloadStream.getInputStream(), response.getOutputStream());
response.flushBuffer();
}
private DownloadRequest convert(PrepareDownloadRequest request) {
return DownloadRequest.builder()
.dossierId(request.getDossierId())
.userId(KeycloakSecurity.getUserId())
.fileIds(request.getFileIds())
.includeUnprocessed(request.getIncludeUnprocessed())
.build();
}
private String generateReportJsonStorageIdForS3(String storageId) {
return storageId.substring(0, storageId.length() - 3) + REPORT_INFO;
}
private String generateReportJsonStorageIdForAzure(String storageId) {
return storageId.substring(0, storageId.length() - 4) + REPORT_INFO;
}
}

View File

@ -0,0 +1,80 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_REDACTION_LOG;
import java.util.ArrayList;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.mapper.EntityLogResponseMapper;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.EntityLogService;
import com.iqser.red.service.persistence.service.v1.api.external.resource.EntityLogResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLogResponse;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.FilteredEntityLogRequest;
import lombok.RequiredArgsConstructor;
@RestController
@RequiredArgsConstructor
public class EntityLogController implements EntityLogResource {
private final EntityLogService entityLogService;
private final AccessControlService accessControlService;
private final EntityLogResponseMapper entityLogResponseMapper = EntityLogResponseMapper.INSTANCE;
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public EntityLogResponse getEntityLog(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = "excludedTypes", required = false, defaultValue = "") List<String> excludedTypes,
@RequestParam(value = "includeUnprocessed", required = false, defaultValue = FALSE) boolean includeUnprocessed) {
accessControlService.checkViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
return entityLogResponseMapper.toLogResponse(entityLogService.getEntityLog(dossierId,
fileId,
excludedTypes == null ? new ArrayList<>() : excludedTypes,
includeUnprocessed));
}
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public EntityLogResponse getFilteredEntityLog(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestBody FilteredEntityLogRequest filteredEntityLogRequest) {
accessControlService.checkViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
return entityLogResponseMapper.toLogResponse(entityLogService.getFilteredEntityLog(dossierId, fileId, filteredEntityLogRequest));
}
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public EntityLogResponse getEntityLogWithEntriesOnPages(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@RequestParam(value = "pageNumbers", defaultValue = "") List<Integer> pageNumbers) {
accessControlService.checkViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
return entityLogResponseMapper.toLogResponse(entityLogService.getEntityLogWithEntriesOnPages(dossierId, fileId, pageNumbers));
}
@PreAuthorize("hasAuthority('" + READ_REDACTION_LOG + "')")
public EntityLogResponse getEntityLogDeltaUpdate(@PathVariable(DOSSIER_ID) String dossierId,
@PathVariable(FILE_ID) String fileId,
@PathVariable(ANALYSIS_NUMBER) Integer analysisNumber,
@RequestParam(value = "includeUnprocessed", required = false, defaultValue = FALSE) boolean includeUnprocessed) {
accessControlService.checkViewPermissionsToDossier(dossierId);
accessControlService.validateFileResourceExistence(fileId);
return entityLogResponseMapper.toLogResponse(entityLogService.getEntityLogWithEntriesWithEntriesSinceAnalysisNumber(dossierId, fileId, analysisNumber, includeUnprocessed));
}
}

View File

@ -0,0 +1,180 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
import com.iqser.red.commons.spring.ErrorMessage;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.exception.ConflictException;
import com.iqser.red.service.persistence.management.v1.processor.exception.NotAllowedException;
import com.iqser.red.service.persistence.management.v1.processor.exception.NotFoundException;
import com.knecon.fforesight.tenantcommons.TenantContext;
import com.mchange.rmi.NotAuthorizedException;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobDataMap;
import org.quartz.JobKey;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.support.MissingServletRequestPartException;
import java.time.OffsetDateTime;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@RequiredArgsConstructor
@RestControllerAdvice
@Order(Ordered.HIGHEST_PRECEDENCE)
public class ExternalControllerAdvice {
private final Scheduler scheduler;
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.NOT_FOUND)
@ExceptionHandler(value = NotFoundException.class)
public ErrorMessage handleContentNotFoundException(NotFoundException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
/* error handling */
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
@ExceptionHandler(value = BadRequestException.class)
public ErrorMessage handleBadRequestException(BadRequestException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.CONFLICT)
@ExceptionHandler(value = {ConflictException.class})
protected ErrorMessage handleConflictException(ConflictException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@ResponseBody
@ResponseStatus(value = HttpStatus.FORBIDDEN)
@ExceptionHandler({AccessDeniedException.class})
public ErrorMessage handleAccessDeniedException(AccessDeniedException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@ResponseBody
@ResponseStatus(value = HttpStatus.UNAUTHORIZED)
@ExceptionHandler({NotAuthorizedException.class})
public ErrorMessage handleNotAuthorizedException(NotAuthorizedException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@ResponseBody
@ResponseStatus(value = HttpStatus.FORBIDDEN)
@ExceptionHandler({NotAllowedException.class})
public ErrorMessage handleNotAllowedException(NotAllowedException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
@ExceptionHandler({org.springframework.security.acls.model.NotFoundException.class})
public ErrorMessage handleACLNotFound(org.springframework.security.acls.model.NotFoundException e) {
// in case this error occurs on a rest request / force trigger the sync job
try {
scheduler.triggerJob(new JobKey("SyncUserPermissionsJob"), new JobDataMap(Map.of("tenantId", TenantContext.getTenantId())));
} catch (SchedulerException ex) {
log.debug("Failed to force trigger SyncUserPermissionsJob", ex);
}
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
@ExceptionHandler({MethodArgumentNotValidException.class})
public ErrorMessage handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
var errorList = e.getFieldErrors();
String errorListAsString = errorList.stream()
.map(fieldError -> fieldError.getField() + ": " + fieldError.getDefaultMessage())
.collect(Collectors.joining(", "));
return new ErrorMessage(OffsetDateTime.now(), String.format("You have empty/wrong formatted parameters: %s", errorListAsString));
}
@Hidden
@ResponseBody
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
@ExceptionHandler({MissingServletRequestPartException.class})
public ErrorMessage handleMissingServletRequestPartException(MissingServletRequestPartException e) {
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@Hidden
@ResponseBody
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler({HttpMessageNotReadableException.class})
public ErrorMessage handleHttpMessageNotReadableException(HttpMessageNotReadableException e) {
var cause = e.getCause();
if (cause instanceof InvalidFormatException) {
InvalidFormatException invalidFormatException = (InvalidFormatException) cause;
Class<?> targetType = invalidFormatException.getTargetType();
if (targetType != null && targetType.isEnum()) {
return new ErrorMessage(OffsetDateTime.now(), String.format("Unsupported value for %s", targetType.getSimpleName()));
}
return new ErrorMessage(OffsetDateTime.now(), cause.getMessage());
}
return new ErrorMessage(OffsetDateTime.now(), e.getMessage());
}
@Order(10000)
public static class BinderControllerAdvice {
@InitBinder
public void setAllowedFields(WebDataBinder dataBinder) {
// This code protects Spring Core from a "Remote Code Execution" attack (dubbed "Spring4Shell").
// By applying this mitigation, you prevent the "Class Loader Manipulation" attack vector from firing.
// For more details, see this post: https://www.lunasec.io/docs/blog/spring-rce-vulnerabilities/
String[] denylist = new String[]{"class.*", "Class.*", "*.class.*", "*.Class.*"};
dataBinder.setDisallowedFields(denylist);
}
}
}

View File

@ -0,0 +1,180 @@
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_FILE_ATTRIBUTES_CONFIG;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_FILE_ATTRIBUTES;
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.WRITE_FILE_ATTRIBUTES_CONFIG;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.iqser.red.service.persistence.management.v1.processor.model.websocket.FileEventType;
import com.iqser.red.service.persistence.management.v1.processor.service.websocket.WebsocketService;
import com.iqser.red.service.persistence.management.v1.processor.utils.FileAttributeConfigMapper;
import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity;
import com.iqser.red.service.persistence.management.v1.processor.entity.configuration.FileAttributesGeneralConfigurationEntity;
import com.iqser.red.service.persistence.management.v1.processor.entity.dossier.FileAttributeConfigEntity;
import com.iqser.red.service.persistence.management.v1.processor.exception.BadRequestException;
import com.iqser.red.service.persistence.management.v1.processor.exception.NotAllowedException;
import com.iqser.red.service.persistence.management.v1.processor.service.AccessControlService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileAttributesManagementService;
import com.iqser.red.service.persistence.management.v1.processor.service.FileStatusService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService;
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.FileAttributeConfigPersistenceService;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
import com.iqser.red.service.persistence.service.v1.api.external.resource.FileAttributesResource;
import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory;
import com.iqser.red.service.persistence.service.v1.api.shared.model.FileAttributes;
import com.iqser.red.service.persistence.service.v1.api.shared.model.FileAttributesConfig;
import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.FileAttributesGeneralConfiguration;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileAttributeConfig;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.WorkflowStatus;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
public class FileAttributesController implements FileAttributesResource {
private final FileAttributesManagementService fileAttributesManagementService;
private final FileAttributeConfigPersistenceService fileAttributeConfigPersistenceService;
private final AuditPersistenceService auditPersistenceService;
private final FileStatusService fileStatusService;
private final AccessControlService accessControlService;
private final WebsocketService websocketService;
@Override
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES_CONFIG + "')")
public FileAttributesConfig setFileAttributesConfig(String dossierTemplateId, FileAttributesConfig fileAttributesConfig) {
if (StringUtils.isEmpty(fileAttributesConfig.getEncoding()) || !encodingList.contains(fileAttributesConfig.getEncoding().trim())) {
throw new BadRequestException("Invalid encoding setting");
}
fileAttributeConfigPersistenceService.setFileAttributesGeneralConfig(dossierTemplateId,
MagicConverter.convert(fileAttributesConfig, FileAttributesGeneralConfigurationEntity.class));
fileAttributeConfigPersistenceService.setFileAttributesConfig(dossierTemplateId,
MagicConverter.convert(fileAttributesConfig.getFileAttributeConfigs(), FileAttributeConfigEntity.class));
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("Changed file attributes base configuration & attribute configuration ( CSV Import )")
.build());
return FileAttributesConfig.builder()
.filenameMappingColumnHeaderName(fileAttributesConfig.getFilenameMappingColumnHeaderName())
.delimiter(fileAttributesConfig.getDelimiter())
.encoding(fileAttributesConfig.getEncoding())
.fileAttributeConfigs(MagicConverter.convert(fileAttributeConfigPersistenceService.getFileAttributes(dossierTemplateId),
FileAttributeConfig.class,
new FileAttributeConfigMapper()))
.build();
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES_CONFIG + "')")
public FileAttributeConfig addOrUpdateFileAttribute(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @Valid @RequestBody FileAttributeConfig fileAttribute) {
var result = fileAttributeConfigPersistenceService.addOrUpdateFileAttribute(dossierTemplateId, MagicConverter.convert(fileAttribute, FileAttributeConfigEntity.class));
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("File attributes added/updated")
.details(Map.of("FileAttributeName",
fileAttribute.getLabel() != null ? fileAttribute.getLabel() : "",
"dossierTemplateId",
dossierTemplateId))
.build());
return MagicConverter.convert(result, FileAttributeConfig.class, new FileAttributeConfigMapper());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES_CONFIG + "')")
public void deleteFileAttribute(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @PathVariable(FILE_ATTRIBUTE_ID) String fileAttributeId) {
fileAttributeConfigPersistenceService.deleteFileAttribute(fileAttributeId);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("File attributes removed")
.details(Map.of("FileAttributeId", fileAttributeId))
.build());
}
@Override
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES_CONFIG + "')")
public void deleteFileAttributes(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId, @RequestBody List<String> fileAttributeIds) {
fileAttributeConfigPersistenceService.deleteFileAttributes(fileAttributeIds);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(dossierTemplateId)
.category(AuditCategory.DOSSIER_TEMPLATE.name())
.message("File attributes removed")
.details(Map.of("FileAttributeId", fileAttributeIds))
.build());
}
@PreAuthorize("hasAuthority('" + READ_FILE_ATTRIBUTES_CONFIG + "')")
public FileAttributesConfig getFileAttributesConfiguration(@PathVariable(DOSSIER_TEMPLATE_ID) String dossierTemplateId) {
var fileAttributeConfigs = fileAttributeConfigPersistenceService.getFileAttributes(dossierTemplateId);
FileAttributesGeneralConfiguration generalConfig = new FileAttributesGeneralConfiguration();
try {
generalConfig = MagicConverter.convert(fileAttributeConfigPersistenceService.getFileAttributesGeneralConfiguration(dossierTemplateId),
FileAttributesGeneralConfiguration.class);
} catch (Exception e) {
log.debug("No general config defined", e);
}
return FileAttributesConfig.builder()
.filenameMappingColumnHeaderName(generalConfig.getFilenameMappingColumnHeaderName())
.delimiter(generalConfig.getDelimiter())
.encoding(generalConfig.getEncoding())
.fileAttributeConfigs(MagicConverter.convert(fileAttributeConfigs, FileAttributeConfig.class, new FileAttributeConfigMapper()))
.build();
}
@PreAuthorize("hasAuthority('" + WRITE_FILE_ATTRIBUTES + "')")
public void setFileAttributes(@PathVariable(DOSSIER_ID_PARAM) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody FileAttributes fileAttributes) {
accessControlService.checkDossierExistenceAndAccessPermissionsToDossier(dossierId);
var file = fileStatusService.getStatus(fileId);
if (file.getWorkflowStatus().equals(WorkflowStatus.APPROVED)) {
throw new NotAllowedException("File is approved. File attributes are not editable anymore.");
}
if (file.getWorkflowStatus().equals(WorkflowStatus.UNDER_APPROVAL)) {
accessControlService.verifyUserIsApprover(dossierId);
}
accessControlService.verifyUserIsMemberOrApprover(dossierId);
fileAttributesManagementService.setFileAttributes(dossierId, fileId, fileAttributes.getAttributeIdToValue());
websocketService.sendFileEvent(dossierId, fileId, FileEventType.UPDATE);
auditPersistenceService.audit(AuditRequest.builder()
.userId(KeycloakSecurity.getUserId())
.objectId(fileId)
.category(AuditCategory.DOCUMENT.name())
.message("File attributes has been edited for a document.")
.build());
}
}

Some files were not shown because too many files have changed in this diff Show More