Tue, 03 Aug 2021 12:22:10 +0200
fixes response locale not set for new sessions
mike@159 | 1 | /* |
universe@180 | 2 | * Copyright 2021 Mike Becker. All rights reserved. |
mike@159 | 3 | * |
mike@159 | 4 | * Redistribution and use in source and binary forms, with or without |
mike@159 | 5 | * modification, are permitted provided that the following conditions are met: |
mike@159 | 6 | * |
mike@159 | 7 | * 1. Redistributions of source code must retain the above copyright |
mike@159 | 8 | * notice, this list of conditions and the following disclaimer. |
mike@159 | 9 | * |
mike@159 | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
mike@159 | 11 | * notice, this list of conditions and the following disclaimer in the |
mike@159 | 12 | * documentation and/or other materials provided with the distribution. |
mike@159 | 13 | * |
mike@159 | 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mike@159 | 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mike@159 | 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mike@159 | 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mike@159 | 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mike@159 | 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mike@159 | 20 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mike@159 | 21 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mike@159 | 22 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mike@159 | 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mike@159 | 24 | */ |
mike@159 | 25 | |
mike@159 | 26 | package de.uapcore.lightpit.dao |
mike@159 | 27 | |
universe@167 | 28 | import de.uapcore.lightpit.entities.* |
universe@184 | 29 | import de.uapcore.lightpit.util.IssueFilter |
universe@184 | 30 | import de.uapcore.lightpit.viewmodel.ComponentSummary |
universe@184 | 31 | import de.uapcore.lightpit.viewmodel.IssueSummary |
universe@184 | 32 | import de.uapcore.lightpit.viewmodel.VersionSummary |
universe@167 | 33 | |
universe@167 | 34 | interface DataAccessObject { |
universe@167 | 35 | fun listUsers(): List<User> |
universe@167 | 36 | fun findUser(id: Int): User? |
universe@167 | 37 | fun findUserByName(username: String): User? |
universe@167 | 38 | fun insertUser(user: User) |
universe@167 | 39 | fun updateUser(user: User) |
universe@167 | 40 | |
universe@184 | 41 | /** |
universe@184 | 42 | * Lists all versions of the specified [project]. |
universe@184 | 43 | * |
universe@184 | 44 | * The list is first ordered by the ordinal of the version and |
universe@184 | 45 | * then by name, both descending. |
universe@184 | 46 | */ |
universe@167 | 47 | fun listVersions(project: Project): List<Version> |
universe@184 | 48 | fun listVersionSummaries(project: Project): List<VersionSummary> |
universe@167 | 49 | fun findVersion(id: Int): Version? |
universe@167 | 50 | fun findVersionByNode(project: Project, node: String): Version? |
universe@167 | 51 | fun insertVersion(version: Version) |
universe@167 | 52 | fun updateVersion(version: Version) |
universe@167 | 53 | |
universe@167 | 54 | fun listComponents(project: Project): List<Component> |
universe@184 | 55 | fun listComponentSummaries(project: Project): List<ComponentSummary> |
universe@167 | 56 | fun findComponent(id: Int): Component? |
universe@167 | 57 | fun findComponentByNode(project: Project, node: String): Component? |
universe@167 | 58 | fun insertComponent(component: Component) |
universe@167 | 59 | fun updateComponent(component: Component) |
universe@167 | 60 | |
universe@184 | 61 | /** |
universe@184 | 62 | * Lists all projects ordered by name. |
universe@184 | 63 | */ |
universe@167 | 64 | fun listProjects(): List<Project> |
universe@167 | 65 | fun findProject(id: Int): Project? |
universe@167 | 66 | fun findProjectByNode(node: String): Project? |
universe@167 | 67 | fun insertProject(project: Project) |
universe@167 | 68 | fun updateProject(project: Project) |
universe@167 | 69 | |
universe@167 | 70 | fun collectIssueSummary(project: Project): IssueSummary |
universe@167 | 71 | |
universe@167 | 72 | fun listIssues(filter: IssueFilter): List<Issue> |
universe@167 | 73 | fun findIssue(id: Int): Issue? |
universe@184 | 74 | fun insertIssue(issue: Issue): Int |
universe@167 | 75 | fun updateIssue(issue: Issue) |
universe@167 | 76 | |
universe@167 | 77 | fun listComments(issue: Issue): List<IssueComment> |
universe@207 | 78 | fun findComment(id: Int): IssueComment? |
universe@167 | 79 | fun insertComment(issueComment: IssueComment) |
universe@207 | 80 | fun updateComment(issueComment: IssueComment) |
mike@159 | 81 | } |