Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…1976) * refactor(userADM): user create payload * refactor(userADM): add error messages + update value objects * refactor(userADM): move value objects to dedicated file * refactor(userADM): add value objects unit tests + error messages * refactor(userADM): remove old user value objects e2e aka unit tests * refactor(userADM): remove bad method * refactor(userADM): bring back ValueObjectsADMSpec config * refactor(projectADM): rename files * refactor(projectsADM): move ProjectIRI value object + add optional handling * refactor(projectsADM): add error messages * refactor(projectsADM): fix users and projects value objedcts names * refactor(projectsADM): fix payload class name * refactor(projectsADM): update value objects * refactor(projectsADM): add value objects unit tests * refactor(projectsADM): tests cleanup * refactor(projectsADM): to trick sonar complains * cleanup * refactor filenames * add missing types and licence * review changes * refactor(projectsADM): remove redundant validation and tests
- Loading branch information
Showing
31 changed files
with
1,117 additions
and
1,127 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...in/scala/org/knora/webapi/messages/admin/responder/groupsmessages/GroupsPayloadsADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...onder/listsmessages/ListPayloadsADM.scala → ...nder/listsmessages/ListsPayloadsADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
.../org/knora/webapi/messages/admin/responder/projectsmessages/ProjectCreatePayloadADM.scala
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsErrorMessagesADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright © 2021 Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.messages.admin.responder.projectsmessages | ||
|
||
object ProjectsErrorMessagesADM { | ||
val PROJECT_IRI_MISSING_ERROR = "Project IRI cannot be empty." | ||
val PROJECT_IRI_INVALID_ERROR = "Project IRI is invalid." | ||
val SHORTCODE_MISSING_ERROR = "Shortcode cannot be empty." | ||
val SHORTCODE_INVALID_ERROR = "Shortcode is invalid." | ||
val SHORTNAME_MISSING_ERROR = "Shortname cannot be empty." | ||
val SHORTNAME_INVALID_ERROR = "Shortname is invalid." | ||
val LONGNAME_MISSING_ERROR = "Longname cannot be empty." | ||
val LONGNAME_INVALID_ERROR = "Longname is invalid." | ||
val PROJECT_DESCRIPTION_MISSING_ERROR = "Description cannot be empty." | ||
val PROJECT_DESCRIPTION_INVALID_ERROR = "Description is invalid." | ||
val KEYWORDS_MISSING_ERROR = "Keywords cannot be empty." | ||
val KEYWORDS_INVALID_ERROR = "Keywords are invalid." | ||
val LOGO_MISSING_ERROR = "Logo cannot be empty." | ||
val LOGO_INVALID_ERROR = "Logo is invalid." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...cala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsPayloadsADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright © 2021 Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.messages.admin.responder.projectsmessages | ||
|
||
import org.knora.webapi.messages.admin.responder.valueObjects._ | ||
|
||
/** | ||
* Project creation payload | ||
*/ | ||
final case class ProjectCreatePayloadADM( | ||
id: Option[ProjectIRI] = None, | ||
shortname: Shortname, | ||
shortcode: Shortcode, | ||
longname: Option[Longname] = None, | ||
description: ProjectDescription, | ||
keywords: Keywords, | ||
logo: Option[Logo] = None, | ||
status: ProjectStatus, | ||
selfjoin: ProjectSelfJoin | ||
) |
61 changes: 0 additions & 61 deletions
61
.../main/scala/org/knora/webapi/messages/admin/responder/usersmessages/UserPayloadsADM.scala
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersErrorMessagesADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright © 2021 Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.messages.admin.responder.usersmessages | ||
|
||
object UsersErrorMessagesADM { | ||
val USER_IRI_MISSING_ERROR = "User IRI cannot be empty." | ||
val USER_IRI_INVALID_ERROR = "User IRI is invalid." | ||
val USERNAME_MISSING_ERROR = "Username cannot be empty." | ||
val USERNAME_INVALID_ERROR = "Username is invalid." | ||
val EMAIL_MISSING_ERROR = "Email cannot be empty." | ||
val EMAIL_INVALID_ERROR = "Email is invalid." | ||
val PASSWORD_MISSING_ERROR = "Password cannot be empty." | ||
val PASSWORD_INVALID_ERROR = "Password is invalid." | ||
val GIVEN_NAME_MISSING_ERROR = "GivenName cannot be empty." | ||
val GIVEN_NAME_INVALID_ERROR = "GivenName is invalid." | ||
val FAMILY_NAME_MISSING_ERROR = "FamilyName cannot be empty." | ||
val FAMILY_NAME_INVALID_ERROR = "FamilyName is invalid." | ||
val LANGUAGE_CODE_MISSING_ERROR = "LanguageCode cannot be empty." | ||
val LANGUAGE_CODE_INVALID_ERROR = "LanguageCode is invalid." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...main/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersPayloadsADM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright © 2021 Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.messages.admin.responder.usersmessages | ||
|
||
import org.knora.webapi.messages.admin.responder.valueObjects._ | ||
|
||
/** | ||
* User creation payload | ||
*/ | ||
final case class UserCreatePayloadADM( | ||
id: Option[UserIRI] = None, | ||
username: Username, | ||
email: Email, | ||
givenName: GivenName, | ||
familyName: FamilyName, | ||
password: Password, | ||
status: UserStatus, | ||
lang: LanguageCode, | ||
systemAdmin: SystemAdmin | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.