Skip to content
Permalink
Browse files
refactor(formatting-logging): reformat scala code and change logging …
…policy (DEV-839) (#2051)

* refactor: reduce logging noise

* refactor(scalafmt): align.preset most instead of some
  • Loading branch information
BalduinLandolt committed Apr 26, 2022
1 parent 0389e52 commit 5e4e91499347f4b118b84fa06cb7b0499e4cfecf
Showing with 16,816 additions and 15,711 deletions.
  1. +1 −1 .scalafmt.conf
  2. +1 −1 build.sbt
  3. +3 −3 dsp-api-main/src/main/scala/dsp/api/main/MainApp.scala
  4. +16 −11 project/plugins.sbt
  5. +0 −1 webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala
  6. +3 −3 webapi/src/main/scala/org/knora/webapi/contributors/GenerateContributorsFile.scala
  7. +1 −1 webapi/src/main/scala/org/knora/webapi/exceptions/Exceptions.scala
  8. +3 −3 webapi/src/main/scala/org/knora/webapi/feature/FeatureFactory.scala
  9. +1 −1 webapi/src/main/scala/org/knora/webapi/http/handler/KnoraExceptionHandler.scala
  10. +20 −20 webapi/src/main/scala/org/knora/webapi/http/status/ApiStatusCodesV1.scala
  11. +2 −2 webapi/src/main/scala/org/knora/webapi/http/version/ServerVersion.scala
  12. +537 −537 webapi/src/main/scala/org/knora/webapi/messages/OntologyConstants.scala
  13. +26 −26 webapi/src/main/scala/org/knora/webapi/messages/StringFormatter.scala
  14. +4 −4 .../main/scala/org/knora/webapi/messages/admin/responder/groupsmessages/GroupsErrorMessagesADM.scala
  15. +1 −1 ...i/src/main/scala/org/knora/webapi/messages/admin/responder/groupsmessages/GroupsMessagesADM.scala
  16. +14 −14 ...rc/main/scala/org/knora/webapi/messages/admin/responder/listsmessages/ListsErrorMessagesADM.scala
  17. +30 −30 webapi/src/main/scala/org/knora/webapi/messages/admin/responder/listsmessages/ListsMessagesADM.scala
  18. +1 −1 .../scala/org/knora/webapi/messages/admin/responder/permissionsmessages/PermissionsMessagesADM.scala
  19. +4 −4 ...la/org/knora/webapi/messages/admin/responder/permissionsmessages/PermissionsMessagesUtilADM.scala
  20. +12 −12 ...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsErrorMessagesADM.scala
  21. +12 −12 ...rc/main/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersErrorMessagesADM.scala
  22. +4 −4 webapi/src/main/scala/org/knora/webapi/messages/store/triplestoremessages/TriplestoreMessages.scala
  23. +2 −2 webapi/src/main/scala/org/knora/webapi/messages/twirl/ResourceHtmlView.scala
  24. +5 −5 webapi/src/main/scala/org/knora/webapi/messages/util/CalendarDateUtilV2.scala
  25. +50 −49 webapi/src/main/scala/org/knora/webapi/messages/util/ConstructResponseUtilV2.scala
  26. +11 −11 webapi/src/main/scala/org/knora/webapi/messages/util/DateUtilV1.scala
  27. +1 −1 webapi/src/main/scala/org/knora/webapi/messages/util/FakeTriplestore.scala
  28. +5 −5 webapi/src/main/scala/org/knora/webapi/messages/util/MessageUtil.scala
  29. +21 −19 webapi/src/main/scala/org/knora/webapi/messages/util/PermissionUtilADM.scala
  30. +5 −5 webapi/src/main/scala/org/knora/webapi/messages/util/UserUtilADM.scala
  31. +44 −44 webapi/src/main/scala/org/knora/webapi/messages/util/ValueUtilV1.scala
  32. +11 −11 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/JsonLDUtil.scala
  33. +6 −6 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/RdfFeatureFactory.scala
  34. +1 −1 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/jenaimpl/JenaFormatUtil.scala
  35. +3 −3 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/jenaimpl/JenaModel.scala
  36. +1 −1 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/rdf4jimpl/RDF4JFormatUtil.scala
  37. +3 −3 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/rdf4jimpl/RDF4JModel.scala
  38. +1 −1 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/rdf4jimpl/RDF4JShaclValidator.scala
  39. +8 −8 webapi/src/main/scala/org/knora/webapi/messages/util/search/gravsearch/GravsearchParser.scala
  40. +13 −13 ...n/scala/org/knora/webapi/messages/util/search/gravsearch/prequery/AbstractPrequeryGenerator.scala
  41. +2 −2 ...rg/knora/webapi/messages/util/search/gravsearch/prequery/GravsearchQueryOptimisationFactory.scala
  42. +1 −1 ...rc/main/scala/org/knora/webapi/messages/util/search/gravsearch/prequery/TopologicalSortUtil.scala
  43. +45 −40 ...knora/webapi/messages/util/search/gravsearch/types/AnnotationReadingGravsearchTypeInspector.scala
  44. +10 −10 ...scala/org/knora/webapi/messages/util/search/gravsearch/types/GravsearchTypeInspectionRunner.scala
  45. +2 −2 ...n/scala/org/knora/webapi/messages/util/search/gravsearch/types/GravsearchTypeInspectionUtil.scala
  46. +1 −1 ...c/main/scala/org/knora/webapi/messages/util/search/gravsearch/types/GravsearchTypeInspector.scala
  47. +73 −63 ...ala/org/knora/webapi/messages/util/search/gravsearch/types/InferringGravsearchTypeInspector.scala
  48. +153 −133 webapi/src/main/scala/org/knora/webapi/messages/util/standoff/StandoffTagUtilV2.scala
  49. +8 −8 webapi/src/main/scala/org/knora/webapi/messages/util/standoff/XMLToStandoffUtil.scala
  50. +1 −1 webapi/src/main/scala/org/knora/webapi/messages/util/standoff/XMLUtil.scala
  51. +3 −3 webapi/src/main/scala/org/knora/webapi/messages/v1/responder/ckanmessages/CkanMessagesV1.scala
  52. +2 −2 webapi/src/main/scala/org/knora/webapi/messages/v1/responder/listmessages/ListMessagesV1.scala
  53. +3 −3 ...i/src/main/scala/org/knora/webapi/messages/v1/responder/ontologymessages/OntologyMessagesV1.scala
  54. +55 −55 ...i/src/main/scala/org/knora/webapi/messages/v1/responder/resourcemessages/ResourceMessagesV1.scala
  55. +12 −12 webapi/src/main/scala/org/knora/webapi/messages/v1/responder/searchmessages/SearchMessagesV1.scala
  56. +10 −10 webapi/src/main/scala/org/knora/webapi/messages/v1/responder/usermessages/UserMessagesV1.scala
  57. +20 −20 webapi/src/main/scala/org/knora/webapi/messages/v1/responder/valuemessages/ValueMessagesV1.scala
  58. +2 −2 webapi/src/main/scala/org/knora/webapi/messages/v2/responder/KnoraResponseV2.scala
  59. +6 −6 webapi/src/main/scala/org/knora/webapi/messages/v2/responder/listsmessages/ListsMessagesV2.scala
  60. +52 −52 ...ra/webapi/messages/v2/responder/ontologymessages/KnoraBaseToApiV2ComplexTransformationRules.scala
  61. +2 −2 ...ora/webapi/messages/v2/responder/ontologymessages/KnoraBaseToApiV2SimpleTransformationRules.scala
  62. +61 −61 ...i/src/main/scala/org/knora/webapi/messages/v2/responder/ontologymessages/OntologyMessagesV2.scala
  63. +117 −110 ...i/src/main/scala/org/knora/webapi/messages/v2/responder/resourcemessages/ResourceMessagesV2.scala
  64. +6 −6 ...in/scala/org/knora/webapi/messages/v2/responder/resourcemessages/resourceAndValueEventsUtil.scala
  65. +10 −10 ...i/src/main/scala/org/knora/webapi/messages/v2/responder/standoffmessages/StandoffMessagesV2.scala
  66. +542 −517 webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala
  67. +26 −26 webapi/src/main/scala/org/knora/webapi/responders/Responder.scala
  68. +372 −339 webapi/src/main/scala/org/knora/webapi/responders/admin/GroupsResponderADM.scala
  69. +879 −821 webapi/src/main/scala/org/knora/webapi/responders/admin/ListsResponderADM.scala
  70. +750 −682 webapi/src/main/scala/org/knora/webapi/responders/admin/PermissionsResponderADM.scala
  71. +380 −369 webapi/src/main/scala/org/knora/webapi/responders/admin/ProjectsResponderADM.scala
  72. +51 −47 webapi/src/main/scala/org/knora/webapi/responders/admin/SipiResponderADM.scala
  73. +9 −9 webapi/src/main/scala/org/knora/webapi/responders/admin/StoresResponderADM.scala
  74. +91 −91 webapi/src/main/scala/org/knora/webapi/responders/v1/CkanResponderV1.scala
  75. +32 −33 webapi/src/main/scala/org/knora/webapi/responders/v1/ListsResponderV1.scala
  76. +260 −212 webapi/src/main/scala/org/knora/webapi/responders/v1/OntologyResponderV1.scala
  77. +127 −125 webapi/src/main/scala/org/knora/webapi/responders/v1/ProjectsResponderV1.scala
  78. +1,374 −1,208 webapi/src/main/scala/org/knora/webapi/responders/v1/ResourcesResponderV1.scala
  79. +315 −313 webapi/src/main/scala/org/knora/webapi/responders/v1/SearchResponderV1.scala
  80. +8 −8 webapi/src/main/scala/org/knora/webapi/responders/v1/StandoffResponderV1.scala
  81. +139 −138 webapi/src/main/scala/org/knora/webapi/responders/v1/UsersResponderV1.scala
  82. +1,334 −1,217 webapi/src/main/scala/org/knora/webapi/responders/v1/ValuesResponderV1.scala
  83. +8 −8 webapi/src/main/scala/org/knora/webapi/responders/v2/ListsResponderV2.scala
  84. +1,324 −1,314 webapi/src/main/scala/org/knora/webapi/responders/v2/OntologyResponderV2.scala
  85. +6 −6 webapi/src/main/scala/org/knora/webapi/responders/v2/ResourceUtilV2.scala
  86. +928 −844 webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala
  87. +8 −8 webapi/src/main/scala/org/knora/webapi/responders/v2/ResponderWithStandoffV2.scala
  88. +322 −291 webapi/src/main/scala/org/knora/webapi/responders/v2/SearchResponderV2.scala
  89. +557 −447 webapi/src/main/scala/org/knora/webapi/responders/v2/StandoffResponderV2.scala
  90. +962 −909 webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
  91. +73 −61 webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/Cache.scala
  92. +165 −165 webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/Cardinalities.scala
  93. +203 −203 webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/OntologyHelpers.scala
  94. +199 −193 webapi/src/main/scala/org/knora/webapi/routing/Authenticator.scala
  95. +34 −22 webapi/src/main/scala/org/knora/webapi/routing/HealthRoute.scala
  96. +13 −12 webapi/src/main/scala/org/knora/webapi/routing/KnoraRoute.scala
  97. +12 −10 webapi/src/main/scala/org/knora/webapi/routing/RouteUtilADM.scala
  98. +40 −37 webapi/src/main/scala/org/knora/webapi/routing/RouteUtilV1.scala
  99. +33 −29 webapi/src/main/scala/org/knora/webapi/routing/RouteUtilV2.scala
  100. +5 −5 webapi/src/main/scala/org/knora/webapi/routing/SwaggerApiDocsRoute.scala
  101. +7 −7 webapi/src/main/scala/org/knora/webapi/routing/VersionRoute.scala
  102. +23 −23 webapi/src/main/scala/org/knora/webapi/routing/admin/GroupsRouteADM.scala
  103. +1 −1 webapi/src/main/scala/org/knora/webapi/routing/admin/ListsRouteADM.scala
  104. +1 −1 webapi/src/main/scala/org/knora/webapi/routing/admin/PermissionsRouteADM.scala
  105. +90 −88 webapi/src/main/scala/org/knora/webapi/routing/admin/ProjectsRouteADM.scala
  106. +9 −9 webapi/src/main/scala/org/knora/webapi/routing/admin/SipiRouteADM.scala
  107. +65 −65 webapi/src/main/scala/org/knora/webapi/routing/admin/UsersRouteADM.scala
  108. +43 −43 webapi/src/main/scala/org/knora/webapi/routing/admin/lists/OldListsRouteADMFeature.scala
  109. +6 −6 webapi/src/main/scala/org/knora/webapi/routing/admin/permissions/CreatePermissionRouteADM.scala
  110. +3 −3 webapi/src/main/scala/org/knora/webapi/routing/admin/permissions/DeletePermissionRouteADM.scala
  111. +12 −12 webapi/src/main/scala/org/knora/webapi/routing/admin/permissions/GetPermissionsRouteADM.scala
  112. +12 −12 webapi/src/main/scala/org/knora/webapi/routing/admin/permissions/UpdatePermissionRouteADM.scala
  113. +1 −1 webapi/src/main/scala/org/knora/webapi/routing/v1/AssetsRouteV1.scala
  114. +6 −6 webapi/src/main/scala/org/knora/webapi/routing/v1/CkanRouteV1.scala
  115. +20 −20 webapi/src/main/scala/org/knora/webapi/routing/v1/ListsRouteV1.scala
  116. +9 −9 webapi/src/main/scala/org/knora/webapi/routing/v1/ProjectsRouteV1.scala
  117. +38 −38 webapi/src/main/scala/org/knora/webapi/routing/v1/ResourceTypesRouteV1.scala
  118. +332 −306 webapi/src/main/scala/org/knora/webapi/routing/v1/ResourcesRouteV1.scala
  119. +6 −6 webapi/src/main/scala/org/knora/webapi/routing/v1/SearchRouteV1.scala
  120. +11 −10 webapi/src/main/scala/org/knora/webapi/routing/v1/StandoffRouteV1.scala
  121. +31 −31 webapi/src/main/scala/org/knora/webapi/routing/v1/UsersRouteV1.scala
  122. +459 −319 webapi/src/main/scala/org/knora/webapi/routing/v1/ValuesRouteV1.scala
  123. +12 −12 webapi/src/main/scala/org/knora/webapi/routing/v2/ListsRouteV2.scala
  124. +191 −190 webapi/src/main/scala/org/knora/webapi/routing/v2/OntologiesRouteV2.scala
  125. +90 −90 webapi/src/main/scala/org/knora/webapi/routing/v2/ResourcesRouteV2.scala
  126. +36 −36 webapi/src/main/scala/org/knora/webapi/routing/v2/SearchRouteV2.scala
  127. +31 −29 webapi/src/main/scala/org/knora/webapi/routing/v2/StandoffRouteV2.scala
  128. +40 −40 webapi/src/main/scala/org/knora/webapi/routing/v2/ValuesRouteV2.scala
  129. +37 −37 webapi/src/main/scala/org/knora/webapi/settings/KnoraSettings.scala
  130. +4 −3 webapi/src/main/scala/org/knora/webapi/store/StoreManager.scala
  131. +8 −8 webapi/src/main/scala/org/knora/webapi/store/cacheservice/impl/CacheServiceInMemImpl.scala
  132. +7 −5 webapi/src/main/scala/org/knora/webapi/store/cacheservice/impl/CacheServiceRedisImpl.scala
  133. +2 −2 webapi/src/main/scala/org/knora/webapi/store/cacheservice/settings/CacheServiceSettings.scala
  134. +8 −8 webapi/src/main/scala/org/knora/webapi/store/iiif/SipiConnector.scala
  135. +48 −47 webapi/src/main/scala/org/knora/webapi/store/triplestore/http/HttpTriplestoreConnector.scala
  136. +16 −16 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/RepositoryUpdater.scala
  137. +3 −3 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1307.scala
  138. +3 −3 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1322.scala
  139. +1 −1 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1367.scala
  140. +2 −2 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1372.scala
  141. +1 −1 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1746.scala
  142. +1 −1 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1921.scala
  143. +2 −2 webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR2018.scala
  144. +1 −1 webapi/src/main/scala/org/knora/webapi/util/ActorUtil.scala
  145. +1 −1 webapi/src/main/scala/org/knora/webapi/util/FileUtil.scala
  146. +3 −3 webapi/src/main/scala/org/knora/webapi/util/cache/CacheUtil.scala
  147. +2 −2 webapi/src/test/scala/org/knora/webapi/AsyncCoreSpec.scala
  148. +3 −3 webapi/src/test/scala/org/knora/webapi/CoreSpec.scala
  149. +4 −4 webapi/src/test/scala/org/knora/webapi/E2ESpec.scala
  150. +5 −5 webapi/src/test/scala/org/knora/webapi/ITKnoraFakeSpec.scala
  151. +4 −4 webapi/src/test/scala/org/knora/webapi/ITKnoraLiveSpec.scala
  152. +6 −6 webapi/src/test/scala/org/knora/webapi/IntegrationSpec.scala
  153. +0 −1 webapi/src/test/scala/org/knora/webapi/ManagersWithMockedSipi.scala
  154. +2 −2 webapi/src/test/scala/org/knora/webapi/R2RSpec.scala
  155. +1 −1 webapi/src/test/scala/org/knora/webapi/TestContainerFuseki.scala
  156. +1 −1 webapi/src/test/scala/org/knora/webapi/TestContainerRedis.scala
  157. +5 −5 webapi/src/test/scala/org/knora/webapi/TestContainersAll.scala
  158. +1 −1 webapi/src/test/scala/org/knora/webapi/e2e/CORSSupportE2ESpec.scala
  159. +7 −7 webapi/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala
  160. +8 −8 webapi/src/test/scala/org/knora/webapi/e2e/InstanceChecker.scala
  161. +4 −4 webapi/src/test/scala/org/knora/webapi/e2e/RejectingRouteE2ESpec.scala
  162. +3 −3 webapi/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala
  163. +14 −14 webapi/src/test/scala/org/knora/webapi/e2e/admin/PermissionsADME2ESpec.scala
  164. +8 −8 webapi/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala
  165. +5 −5 webapi/src/test/scala/org/knora/webapi/e2e/admin/SipiADME2ESpec.scala
  166. +12 −12 webapi/src/test/scala/org/knora/webapi/e2e/admin/UsersADME2ESpec.scala
  167. +5 −5 webapi/src/test/scala/org/knora/webapi/e2e/admin/lists/DeleteListItemsRouteADME2ESpec.scala
  168. +16 −16 webapi/src/test/scala/org/knora/webapi/e2e/admin/lists/OldListsRouteADMFeatureE2ESpec.scala
  169. +12 −12 webapi/src/test/scala/org/knora/webapi/e2e/admin/lists/UpdateListItemsRouteADME2ESpec.scala
  170. +1 −1 webapi/src/test/scala/org/knora/webapi/e2e/http/ServerVersionE2ESpec.scala
  171. +25 −25 webapi/src/test/scala/org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala
  172. +2 −2 webapi/src/test/scala/org/knora/webapi/e2e/v1/ErrorV1E2ESpec.scala
  173. +5 −5 webapi/src/test/scala/org/knora/webapi/e2e/v1/ListsV1E2ESpec.scala
  174. +3 −3 webapi/src/test/scala/org/knora/webapi/e2e/v1/PermissionsHandlingV1E2ESpec.scala
  175. +7 −7 webapi/src/test/scala/org/knora/webapi/e2e/v1/ProjectsV1E2ESpec.scala
  176. +41 −41 webapi/src/test/scala/org/knora/webapi/e2e/v1/ResourcesV1R2RSpec.scala
  177. +2 −2 webapi/src/test/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala
  178. +15 −15 webapi/src/test/scala/org/knora/webapi/e2e/v1/StandoffV1R2RSpec.scala
  179. +5 −5 webapi/src/test/scala/org/knora/webapi/e2e/v1/UsersV1E2ESpec.scala
  180. +15 −15 webapi/src/test/scala/org/knora/webapi/e2e/v1/ValuesV1R2RSpec.scala
  181. +34 −34 webapi/src/test/scala/org/knora/webapi/e2e/v2/AuthenticationV2E2ESpec.scala
  182. +4 −4 webapi/src/test/scala/org/knora/webapi/e2e/v2/MarkupHeader.scala
  183. +33 −33 webapi/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala
  184. +4 −4 webapi/src/test/scala/org/knora/webapi/e2e/v2/ProjectHeader.scala
  185. +125 −125 webapi/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala
  186. +5 −2 webapi/src/test/scala/org/knora/webapi/e2e/v2/ResponseCheckerV2Spec.scala
  187. +4 −4 webapi/src/test/scala/org/knora/webapi/e2e/v2/SchemaHeader.scala
  188. +6 −6 webapi/src/test/scala/org/knora/webapi/e2e/v2/SearchRouteV2R2RSpec.scala
  189. +27 −27 webapi/src/test/scala/org/knora/webapi/e2e/v2/StandoffRouteV2E2ESpec.scala
  190. +356 −352 webapi/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala
  191. +1 −1 webapi/src/test/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala
  192. +7 −8 webapi/src/test/scala/org/knora/webapi/it/VersionRouteITSpec.scala
  193. +4 −4 webapi/src/test/scala/org/knora/webapi/it/v1/DrawingsGodsV1ITSpec.scala
  194. +1 −1 webapi/src/test/scala/org/knora/webapi/it/v1/ErrorV1ITSpec.scala
  195. +60 −60 webapi/src/test/scala/org/knora/webapi/it/v1/KnoraSipiIntegrationV1ITSpec.scala
  196. +59 −59 webapi/src/test/scala/org/knora/webapi/it/v2/KnoraSipiIntegrationV2ITSpec.scala
  197. +19 −19 webapi/src/test/scala/org/knora/webapi/messages/StringFormatterSpec.scala
  198. +18 −18 ...la/org/knora/webapi/messages/admin/responder/permissionsmessages/PermissionsMessagesADMSpec.scala
  199. +16 −16 ...src/test/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADMSpec.scala
  200. +2 −2 ...test/scala/org/knora/webapi/messages/admin/responder/valueObjects/GroupsValueObjectsADMSpec.scala
  201. +3 −3 .../test/scala/org/knora/webapi/messages/admin/responder/valueObjects/ListsValueObjectsADMSpec.scala
  202. +3 −3 ...st/scala/org/knora/webapi/messages/admin/responder/valueObjects/ProjectsValueObjectsADMSpec.scala
  203. +3 −3 .../test/scala/org/knora/webapi/messages/admin/responder/valueObjects/UsersValueObjectsADMSpec.scala
  204. +2 −2 .../src/test/scala/org/knora/webapi/messages/store/triplestoremessages/TriplestoreMessagesSpec.scala
  205. +11 −10 webapi/src/test/scala/org/knora/webapi/messages/util/ConstructResponseUtilV2Spec.scala
  206. +4 −4 webapi/src/test/scala/org/knora/webapi/messages/util/PermissionUtilADMSpec.scala
  207. +31 −28 webapi/src/test/scala/org/knora/webapi/messages/util/rdf/JsonLDUtilSpec.scala
  208. +17 −15 webapi/src/test/scala/org/knora/webapi/messages/util/rdf/KnoraResponseV2Spec.scala
  209. +31 −24 webapi/src/test/scala/org/knora/webapi/messages/util/rdf/RdfFormatUtilSpec.scala
  210. +14 −14 webapi/src/test/scala/org/knora/webapi/messages/util/rdf/RdfModelSpec.scala
  211. +3 −3 webapi/src/test/scala/org/knora/webapi/messages/util/rdf/ShaclValidatorSpec.scala
  212. +27 −27 ...st/scala/org/knora/webapi/messages/util/search/gravsearch/types/GravsearchTypeInspectorSpec.scala
  213. +46 −46 webapi/src/test/scala/org/knora/webapi/messages/util/standoff/StandoffTagUtilV2Spec.scala
  214. +3 −3 webapi/src/test/scala/org/knora/webapi/messages/util/standoff/XMLToStandoffUtilSpec.scala
  215. +1 −1 webapi/src/test/scala/org/knora/webapi/messages/util/standoff/XMLUtilSpec.scala
  216. +9 −9 ...st/scala/org/knora/webapi/messages/v1/responder/permissionmessages/PermissionMessagesV1Spec.scala
  217. +12 −12 webapi/src/test/scala/org/knora/webapi/messages/v1/responder/usermessages/UserMessagesV1Spec.scala
  218. +10 −10 ...g/knora/webapi/messages/v2/responder/ontologymessages/ChangePropertyGuiElementRequestV2Spec.scala
  219. +8 −8 webapi/src/test/scala/org/knora/webapi/models/OntologyModels.scala
  220. +15 −15 webapi/src/test/scala/org/knora/webapi/models/filemodels/FileModelUtil.scala
  221. +4 −4 webapi/src/test/scala/org/knora/webapi/models/filemodels/FileModels.scala
  222. +82 −82 webapi/src/test/scala/org/knora/webapi/models/filemodels/FileModelsSpec.scala
  223. +1 −1 webapi/src/test/scala/org/knora/webapi/models/standoffmodels/StandoffModels.scala
  224. +5 −5 webapi/src/test/scala/org/knora/webapi/models/standoffmodels/StandoffModelsSpec.scala
  225. +5 −5 webapi/src/test/scala/org/knora/webapi/other/v1/DrawingsGodsV1E2ESpec.scala
  226. +10 −10 webapi/src/test/scala/org/knora/webapi/other/v1/DrawingsGodsV1Spec.scala
  227. +1 −1 webapi/src/test/scala/org/knora/webapi/other/v2/LumieresLausanneV2E2ESpec.scala
  228. +5 −5 webapi/src/test/scala/org/knora/webapi/responders/admin/GroupsResponderADMSpec.scala
  229. +37 −37 webapi/src/test/scala/org/knora/webapi/responders/admin/ListsResponderADMSpec.scala
  230. +14 −14 webapi/src/test/scala/org/knora/webapi/responders/admin/PermissionsResponderADMSpec.scala
  231. +9 −9 webapi/src/test/scala/org/knora/webapi/responders/admin/ProjectsResponderADMSpec.scala
  232. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v1/ListsResponderV1Spec.scala
  233. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v1/OntologyResponderV1Spec.scala
  234. +19 −19 webapi/src/test/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala
  235. +5 −5 webapi/src/test/scala/org/knora/webapi/responders/v1/UsersResponderV1Spec.scala
  236. +21 −21 webapi/src/test/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala
  237. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2Spec.scala
  238. +63 −63 webapi/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala
  239. +25 −25 webapi/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala
  240. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponseCheckerV2Spec.scala
  241. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v2/SearchResponderV2Spec.scala
  242. +3 −3 webapi/src/test/scala/org/knora/webapi/responders/v2/SearchResponderV2SpecFullData.scala
  243. +1 −1 webapi/src/test/scala/org/knora/webapi/responders/v2/StandoffResponderV2Spec.scala
  244. +271 −271 webapi/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala
  245. +13 −13 webapi/src/test/scala/org/knora/webapi/responders/v2/ontology/CacheSpec.scala
  246. +5 −5 webapi/src/test/scala/org/knora/webapi/responders/v2/ontology/DeleteCardinalitiesFromClassSpec.scala
  247. +3 −3 webapi/src/test/scala/org/knora/webapi/routing/AuthenticatorSpec.scala
  248. +27 −27 webapi/src/test/scala/org/knora/webapi/sharedtestdata/SharedOntologyTestDataADM.scala
  249. +4 −4 webapi/src/test/scala/org/knora/webapi/sharedtestdata/SharedTestDataADM.scala
  250. +1 −1 webapi/src/test/scala/org/knora/webapi/store/iiif/MockSipiConnector.scala
  251. +3 −3 webapi/src/test/scala/org/knora/webapi/store/triplestore/AllTriplestoreSpec.scala
  252. +16 −16 ...i/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1307Spec.scala
  253. +1 −1 ...i/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR2018Spec.scala
  254. +1 −1 webapi/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginSpec.scala
  255. +7 −7 webapi/src/test/scala/org/knora/webapi/util/ApacheLuceneSupportSpec.scala
  256. +2 −2 webapi/src/test/scala/org/knora/webapi/util/Base64UrlCheckDigitSpec.scala
  257. +1 −1 webapi/src/test/scala/org/knora/webapi/util/MutableTestIri.scala
  258. +1 −1 webapi/src/test/scala/org/knora/webapi/util/StartupUtils.scala
@@ -1,6 +1,6 @@
version = "2.7.5"
maxColumn = 120
align.preset = some
align.preset = most
align.multiline = false
continuationIndent.defnSite = 2
assumeStandardLibraryStripMargin = true
@@ -138,7 +138,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
}, // allows sbt-javaagent to work with sbt-revolver
reStart / javaOptions ++= webapiJavaRunOptions,
javaAgents += Dependencies.aspectjweaver,
fork := true, // run tests in a forked JVM
fork := true, // run tests in a forked JVM
Test / testForkedParallel := false, // run forked tests in parallel
Test / parallelExecution := false, // run non-forked tests in parallel
// Global / concurrentRestrictions += Tags.limit(Tags.Test, 1), // restrict the number of concurrently executing tests in all projects
@@ -8,10 +8,10 @@ object MainApp extends ZIOAppDefault {
val effect: ZIO[Console with SchemaRepo, Nothing, Unit] =
for {
profile <- SchemaRepo.lookup("user1").orDie
_ <- printLine(profile).orDie
_ <- printLine(42).orDie
_ <- printLine(profile).orDie
_ <- printLine(42).orDie
} yield ()

val mainApp: ZIO[Any, Nothing, Unit] = effect.provide(Console.live ++ SchemaRepoLive.layer)
def run: ZIO[Any, Nothing, Unit] = mainApp
def run: ZIO[Any, Nothing, Unit] = mainApp
}
@@ -6,22 +6,27 @@ resolvers ++= Seq(
addDependencyTreePlugin

// Knora
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.1")

// webapi
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

// ad-hoc plugins - uncomment on demenad and keep it commented out in main branch

// https://github.com/rtimush/sbt-updates
// addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.1")

// https://github.com/cb372/sbt-explicit-dependencies
// addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")

// https://scalameta.org/scalafmt/docs/installation.html#sbt
// addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
@@ -7,7 +7,6 @@ import zio.config._
import typesafe._
import magnolia._


final case class AppConfig(cacheService: CacheServiceConfig)

object AppConfig {
@@ -23,13 +23,13 @@ object GenerateContributorsFile extends App {

// Configuration

val contributorsUrl = "https://api.github.com/repos/dasch-swiss/knora-api/contributors"
val contributorsUrl = "https://api.github.com/repos/dasch-swiss/knora-api/contributors"
val defaultOutputFile = "Contributors.md"

// Command-line args

private val conf = new GenerateContributorsFileConf(args.toIndexedSeq)
private val token = conf.token.toOption
private val conf = new GenerateContributorsFileConf(args.toIndexedSeq)
private val token = conf.token.toOption
private val outputFile: Path = Paths.get(conf.output())

// Get the list of contributors.
@@ -355,7 +355,7 @@ object InconsistentRepositoryDataException {
}

case class MissingLastModificationDateOntologyException(message: String, cause: Option[Throwable] = None)
extends InternalServerException(message, cause)
extends InternalServerException(message, cause)

/**
* Indicates that the API server generated invalid JSON in an API response.
@@ -118,13 +118,13 @@ object FeatureToggle {
/**
* The name of the HTTP request header containing feature toggles.
*/
val REQUEST_HEADER: String = "X-Knora-Feature-Toggles"
val REQUEST_HEADER: String = "X-Knora-Feature-Toggles"
val REQUEST_HEADER_LOWERCASE: String = REQUEST_HEADER.toLowerCase

/**
* The name of the HTTP response header that lists configured feature toggles.
*/
val RESPONSE_HEADER: String = REQUEST_HEADER
val RESPONSE_HEADER: String = REQUEST_HEADER
val RESPONSE_HEADER_LOWERCASE: String = REQUEST_HEADER_LOWERCASE

/**
@@ -369,7 +369,7 @@ class RequestContextFeatureFactoryConfig(requestContext: RequestContext, parent:
headerValueItem.split('=').map(_.trim) match {
case Array(featureNameAndVersionStr: String, isEnabledStr: String) =>
val featureNameAndVersion: Array[String] = featureNameAndVersionStr.split(':').map(_.trim)
val featureName: String = featureNameAndVersion.head
val featureName: String = featureNameAndVersion.head

// Accept the boolean values that are accepted in application.conf.
val isEnabled: Boolean = if (TRUE_STRINGS.contains(isEnabledStr.toLowerCase)) {
@@ -110,7 +110,7 @@ object KnoraExceptionHandler extends LazyLogging {

val responseFields: Map[String, JsValue] = Map(
"status" -> JsNumber(apiStatus.id),
"error" -> JsString(makeClientErrorMessage(ex, settings))
"error" -> JsString(makeClientErrorMessage(ex, settings))
) ++ maybeAccess

HttpResponse(
@@ -13,39 +13,39 @@ import org.knora.webapi.exceptions._
* Based on `salsah/api/ApiErrors.php`.
*/
object ApiStatusCodesV1 extends Enumeration {
val OK = Value(0)
val INVALID_REQUEST_METHOD = Value(1)
val CREDENTIALS_NOT_VALID = Value(2)
val OK = Value(0)
val INVALID_REQUEST_METHOD = Value(1)
val CREDENTIALS_NOT_VALID = Value(2)
val NO_RIGHTS_FOR_OPERATION = Value(3)
val INTERNAL_SALSAH_ERROR = Value(4)
val NO_PROPERTIES = Value(5)
val NOT_IN_USERDATA = Value(6)
val RESOURCE_ID_MISSING = Value(7)
val UNKNOWN_VOCABULARY = Value(8)
val INTERNAL_SALSAH_ERROR = Value(4)
val NO_PROPERTIES = Value(5)
val NOT_IN_USERDATA = Value(6)
val RESOURCE_ID_MISSING = Value(7)
val UNKNOWN_VOCABULARY = Value(8)

/**
* The requested item was not found. This was called NO_NODES_FOUND in SALSAH; its meaning has been broadened here.
*/
val NOT_FOUND = Value(9)

val API_ENDPOINT_NOT_FOUND = Value(10)
val INVALID_REQUEST_TYPE = Value(11)
val PROPERTY_ID_MISSING = Value(12)
val NOT_YET_IMPLEMENTED = Value(13)
val COULD_NOT_OPEN_PROGRESS_FILE = Value(14)
val API_ENDPOINT_NOT_FOUND = Value(10)
val INVALID_REQUEST_TYPE = Value(11)
val PROPERTY_ID_MISSING = Value(12)
val NOT_YET_IMPLEMENTED = Value(13)
val COULD_NOT_OPEN_PROGRESS_FILE = Value(14)
val VALUE_ID_OR_RESTYPE_ID_MISSING = Value(15)

val HLIST_ALREADY_EXISTENT = Value(16)
val HLIST_NO_LABELS = Value(17)
val HLIST_NOT_EXISTING = Value(18)
val HLIST_NO_POSITION = Value(19)
val HLIST_NO_LABELS = Value(17)
val HLIST_NOT_EXISTING = Value(18)
val HLIST_NO_POSITION = Value(19)
val HLIST_INVALID_POSITION = Value(20)

val SELECTION_NO_LABELS = Value(21)
val SELECTION_ALREADY_EXISTENT = Value(22)
val SELECTION_NO_LABELS = Value(21)
val SELECTION_ALREADY_EXISTENT = Value(22)
val SELECTION_MISSING_OR_INVALID_POSITION = Value(23)
val SELECTION_DELETE_FAILED = Value(24)
val SELECTION_NODE_ALREADY_EXISTENT = Value(25)
val SELECTION_DELETE_FAILED = Value(24)
val SELECTION_NODE_ALREADY_EXISTENT = Value(25)

val GEONAMES_GEONAME_ID_EXISTING = Value(26)

@@ -15,9 +15,9 @@ import akka.http.scaladsl.server.Route
*/
object ServerVersion {

private val ApiNameAndVersion = s"${BuildInfo.name}/${BuildInfo.version}"
private val ApiNameAndVersion = s"${BuildInfo.name}/${BuildInfo.version}"
private val AkkaNameAndVersion = s"akka-http/${BuildInfo.akkaHttp}"
private val AllProducts = ApiNameAndVersion + " " + AkkaNameAndVersion
private val AllProducts = ApiNameAndVersion + " " + AkkaNameAndVersion

def serverVersionHeader: Server = Server(products = AllProducts)

0 comments on commit 5e4e914

Please sign in to comment.