From bde0b31d28d750fc462567aabcbeed95b0255167 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 14 Sep 2024 21:35:18 +0900 Subject: [PATCH 01/11] =?UTF-8?q?refactor:=20Application=20Service?= =?UTF-8?q?=E3=82=92=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actor/GetActorDetailApplicationService.kt | 1 + .../actor/GetUserDetailApplicationService.kt | 1 + .../filter/UserGetFilterApplicationService.kt | 1 + .../UserRegisterFilterApplicationService.kt | 2 +- .../GetLocalInstanceApplicationService.kt | 1 + .../hideout/core/application/media/Media.kt | 50 --------------- .../core/application/media/UploadMedia.kt | 22 ------- .../media/UploadMediaApplicationService.kt | 16 ++++- .../{actor => model}/ActorDetail.kt | 9 +-- .../application/{filter => model}/Filter.kt | 4 +- .../{filter => model}/FilterKeyword.kt | 2 +- .../{instance => model}/Instance.kt | 4 +- .../application/{post => model}/PostDetail.kt | 6 +- .../get => model}/Relationship.kt | 4 +- .../{actor => model}/UserDetail.kt | 4 +- .../core/application/post/ActorDetail.kt | 31 --------- .../core/application/post/DeleteLocalPost.kt | 3 - .../post/DeleteLocalPostApplicationService.kt | 2 + .../hideout/core/application/post/GetPost.kt | 21 ------ .../post/GetPostApplicationService.kt | 48 -------------- .../post/GetPostDetailApplicationService.kt | 1 + .../get/GetRelationshipApplicationService.kt | 1 + .../core/application/timeline/AddPost.kt | 5 -- .../timeline/AddTimelineRelationship.kt | 11 ---- .../core/application/timeline/GetTimelines.kt | 3 - .../application/timeline/GetUserTimeline.kt | 5 -- .../GetUserTimelineApplicationService.kt | 5 +- .../core/application/timeline/ReadTimeline.kt | 11 ---- .../ReadTimelineApplicationService.kt | 11 +++- .../application/timeline/RegisterTimeline.kt | 8 --- .../timeline/RemoveTimelineRelationship.kt | 5 -- ...melineToTimelineStoreApplicationService.kt | 3 + .../application/timeline/SetTimleineStore.kt | 5 -- .../TimelineAddPostApplicationService.kt | 3 + ...dTimelineRelationshipApplicationService.kt | 9 +++ .../UserGetTimelinesApplicationService.kt | 2 + .../UserRegisterTimelineApplicationService.kt | 10 +-- ...eTimelineRelationshipApplicationService.kt | 3 + .../model/support/postdetail/PostDetail.kt | 22 ------- .../ExposedUserTimelineQueryService.kt | 4 +- .../usertimeline/UserTimelineQueryService.kt | 2 +- .../resources/templates/fragments-post.html | 4 +- .../templates/fragments-timeline.html | 2 +- .../post/GetPostApplicationServiceTest.kt | 64 ------------------- .../interfaces/api/SpringFilterApi.kt | 4 +- 45 files changed, 86 insertions(+), 349 deletions(-) delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/Media.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMedia.kt rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{actor => model}/ActorDetail.kt (78%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{filter => model}/Filter.kt (95%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{filter => model}/FilterKeyword.kt (93%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{instance => model}/Instance.kt (85%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{post => model}/PostDetail.kt (91%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{relationship/get => model}/Relationship.kt (93%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{actor => model}/UserDetail.kt (95%) delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/ActorDetail.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPost.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPost.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationService.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddPost.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddTimelineRelationship.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetTimelines.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimeline.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimeline.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RegisterTimeline.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RemoveTimelineRelationship.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimleineStore.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/postdetail/PostDetail.kt delete mode 100644 hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationServiceTest.kt diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt index 722f16fe..c47c467e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt @@ -1,5 +1,6 @@ package dev.usbharu.hideout.core.application.actor +import dev.usbharu.hideout.core.application.model.ActorDetail import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.config.ApplicationConfig diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt index 6d990ee2..c6a3a4b1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt @@ -17,6 +17,7 @@ package dev.usbharu.hideout.core.application.actor import dev.usbharu.hideout.core.application.exception.InternalServerException +import dev.usbharu.hideout.core.application.model.UserDetail import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorRepository diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt index 1038fe2a..afad3897 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt @@ -17,6 +17,7 @@ package dev.usbharu.hideout.core.application.filter import dev.usbharu.hideout.core.application.exception.PermissionDeniedException +import dev.usbharu.hideout.core.application.model.Filter import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.filter.FilterId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt index 4baa0ac3..68b7dc0f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt @@ -16,10 +16,10 @@ package dev.usbharu.hideout.core.application.filter +import dev.usbharu.hideout.core.application.model.Filter import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.filter.* -import dev.usbharu.hideout.core.domain.model.filter.FilterKeyword import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser import dev.usbharu.hideout.core.domain.shared.id.IdGenerateService import org.slf4j.LoggerFactory diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt index cdca8b84..dcd32818 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt @@ -1,6 +1,7 @@ package dev.usbharu.hideout.core.application.instance import dev.usbharu.hideout.core.application.exception.InternalServerException +import dev.usbharu.hideout.core.application.model.Instance import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.config.ApplicationConfig diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/Media.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/Media.kt deleted file mode 100644 index 5ff3e4a8..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/Media.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.media - -import dev.usbharu.hideout.core.domain.model.media.FileType -import dev.usbharu.hideout.core.domain.model.media.Media -import dev.usbharu.hideout.core.domain.model.media.MimeType -import java.net.URI - -data class Media( - val id: Long, - val name: String, - val url: URI, - val thumbprintURI: URI?, - val remoteURL: URI?, - val type: FileType, - val mimeType: MimeType, - val blurHash: String?, - val description: String? -) { - companion object { - fun of(media: Media): dev.usbharu.hideout.core.application.media.Media { - return Media( - id = media.id.id, - name = media.name.name, - url = media.url, - thumbprintURI = media.thumbnailUrl, - remoteURL = media.remoteUrl, - type = media.type, - mimeType = media.mimeType, - blurHash = media.blurHash?.hash, - description = media.description?.description - ) - } - } -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMedia.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMedia.kt deleted file mode 100644 index 4a8af8d3..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMedia.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.media - -import java.net.URI -import java.nio.file.Path - -data class UploadMedia(val path: Path, val name: String, val remoteUri: URI?, val description: String?) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt index 8f796c7f..a68e64d7 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt @@ -16,6 +16,7 @@ package dev.usbharu.hideout.core.application.media +import dev.usbharu.hideout.core.application.post.MediaDetail import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.media.* @@ -26,6 +27,8 @@ import dev.usbharu.hideout.core.external.mediastore.MediaStore import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Qualifier import org.springframework.stereotype.Service +import java.net.URI +import java.nio.file.Path import dev.usbharu.hideout.core.domain.model.media.Media as MediaModel @Service @@ -35,11 +38,11 @@ class UploadMediaApplicationService( private val mediaRepository: MediaRepository, private val idGenerateService: IdGenerateService, transaction: Transaction -) : LocalUserAbstractApplicationService( +) : LocalUserAbstractApplicationService( transaction, logger ) { - override suspend fun internalExecute(command: UploadMedia, principal: LocalUser): Media { + override suspend fun internalExecute(command: UploadMedia, principal: LocalUser): MediaDetail { val process = mediaProcessor.process(command.path, command.name, null) val id = idGenerateService.generateId() val thumbnailUri = if (process.thumbnailPath != null) { @@ -64,10 +67,17 @@ class UploadMediaApplicationService( mediaRepository.save(media) - return Media.of(media) + return MediaDetail.of(media) } companion object { private val logger = LoggerFactory.getLogger(UploadMediaApplicationService::class.java) } } + +data class UploadMedia( + val path: Path, + val name: String, + val remoteUri: URI?, + val description: String? +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/ActorDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt similarity index 78% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/ActorDetail.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt index d0c552c0..851dcd44 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/ActorDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt @@ -1,6 +1,7 @@ -package dev.usbharu.hideout.core.application.actor +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.actor.Actor +import dev.usbharu.hideout.core.domain.model.media.Media import java.net.URI data class ActorDetail( @@ -18,7 +19,7 @@ data class ActorDetail( val followersCount: Int?, ) { companion object { - fun of(actor: Actor, iconUrl: URI?, bannerURL: URI?): ActorDetail { + fun of(actor: Actor, iconMedia: Media?, bannerMedia: Media?): ActorDetail { return ActorDetail( id = actor.id.id, name = actor.name.name, @@ -28,8 +29,8 @@ data class ActorDetail( locked = actor.locked, description = actor.description.description, postsCount = actor.postsCount.postsCount, - iconUrl = iconUrl, - bannerURL = bannerURL, + iconUrl = iconMedia?.url, + bannerURL = bannerMedia?.url, followingCount = actor.followingCount?.relationshipCount, followersCount = actor.followersCount?.relationshipCount, ) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/Filter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Filter.kt similarity index 95% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/Filter.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Filter.kt index e482991a..f2c625aa 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/Filter.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Filter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.filter +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.filter.Filter import dev.usbharu.hideout.core.domain.model.filter.FilterAction @@ -29,7 +29,7 @@ data class Filter( val filterKeywords: Set, ) { companion object { - fun of(filter: Filter): dev.usbharu.hideout.core.application.filter.Filter { + fun of(filter: Filter): dev.usbharu.hideout.core.application.model.Filter { return Filter( filterId = filter.id.id, userDetailId = filter.userDetailId.id, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/FilterKeyword.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/FilterKeyword.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/FilterKeyword.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/FilterKeyword.kt index bb58f6e6..14eeca8b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/FilterKeyword.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/FilterKeyword.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.filter +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.filter.FilterMode diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/Instance.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt similarity index 85% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/Instance.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt index c4853256..1bea3157 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/Instance.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt @@ -1,11 +1,11 @@ -package dev.usbharu.hideout.core.application.instance +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.instance.Instance import java.net.URI data class Instance(val id: Long, val name: String, val url: URI, val description: String) { companion object { - fun of(instance: Instance): dev.usbharu.hideout.core.application.instance.Instance { + fun of(instance: Instance): dev.usbharu.hideout.core.application.model.Instance { return Instance( instance.id.instanceId, instance.name.name, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/PostDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt similarity index 91% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/PostDetail.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt index 67dd9d96..1ccdc1a8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/PostDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt @@ -1,6 +1,6 @@ -package dev.usbharu.hideout.core.application.post +package dev.usbharu.hideout.core.application.model -import dev.usbharu.hideout.core.application.model.Reactions +import dev.usbharu.hideout.core.application.post.MediaDetail import dev.usbharu.hideout.core.domain.model.actor.Actor import dev.usbharu.hideout.core.domain.model.media.Media import dev.usbharu.hideout.core.domain.model.post.Post @@ -43,7 +43,7 @@ data class PostDetail( ): PostDetail { return PostDetail( id = post.id.id, - actor = ActorDetail.of(actor, iconMedia), + actor = ActorDetail.of(actor, iconMedia, null), overview = post.overview?.overview, text = post.text, content = post.content.content, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/Relationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Relationship.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/Relationship.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Relationship.kt index 03237ef4..9bd6e474 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/Relationship.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Relationship.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.get +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.actorinstancerelationship.ActorInstanceRelationship import dev.usbharu.hideout.core.domain.model.relationship.Relationship @@ -38,7 +38,7 @@ data class Relationship( relationship: Relationship, relationship2: Relationship, actorInstanceRelationship: ActorInstanceRelationship, - ): dev.usbharu.hideout.core.application.relationship.get.Relationship { + ): dev.usbharu.hideout.core.application.model.Relationship { return Relationship( actorId = relationship.actorId.id, targetId = relationship.targetActorId.id, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UserDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/UserDetail.kt similarity index 95% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UserDetail.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/UserDetail.kt index 5b363296..bdf49fb6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UserDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/UserDetail.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.actor +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.actor.Actor import dev.usbharu.hideout.core.domain.model.emoji.CustomEmoji @@ -45,7 +45,7 @@ data class UserDetail( actor: Actor, userDetail: UserDetail, customEmojis: List, - ): dev.usbharu.hideout.core.application.actor.UserDetail { + ): dev.usbharu.hideout.core.application.model.UserDetail { return UserDetail( id = actor.id.id, userDetailId = userDetail.id.id, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/ActorDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/ActorDetail.kt deleted file mode 100644 index 7ef57687..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/ActorDetail.kt +++ /dev/null @@ -1,31 +0,0 @@ -package dev.usbharu.hideout.core.application.post - -import dev.usbharu.hideout.core.domain.model.actor.Actor -import dev.usbharu.hideout.core.domain.model.media.Media -import java.net.URI - -data class ActorDetail( - val actorId: Long, - val instanceId: Long, - val name: String, - val domain: String, - val screenName: String, - val url: URI, - val locked: Boolean, - val icon: URI?, -) { - companion object { - fun of(actor: Actor, iconMedia: Media?): ActorDetail { - return ActorDetail( - actorId = actor.id.id, - instanceId = actor.instance.instanceId, - name = actor.name.name, - domain = actor.domain.domain, - screenName = actor.screenName.screenName, - url = actor.url, - locked = actor.locked, - icon = iconMedia?.url - ) - } - } -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPost.kt deleted file mode 100644 index 83da8dd1..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPost.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.post - -data class DeleteLocalPost(val postId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt index 48441863..4531ba50 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt @@ -50,3 +50,5 @@ class DeleteLocalPostApplicationService( private val logger = LoggerFactory.getLogger(DeleteLocalPostApplicationService::class.java) } } + +data class DeleteLocalPost(val postId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPost.kt deleted file mode 100644 index 90ef8560..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPost.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.post - -data class GetPost( - val postId: Long, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationService.kt deleted file mode 100644 index 6e1f0006..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationService.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.post - -import dev.usbharu.hideout.core.application.exception.PermissionDeniedException -import dev.usbharu.hideout.core.application.shared.AbstractApplicationService -import dev.usbharu.hideout.core.application.shared.Transaction -import dev.usbharu.hideout.core.domain.model.post.PostId -import dev.usbharu.hideout.core.domain.model.post.PostRepository -import dev.usbharu.hideout.core.domain.model.support.principal.Principal -import dev.usbharu.hideout.core.domain.service.post.IPostReadAccessControl -import org.slf4j.LoggerFactory -import org.springframework.stereotype.Service - -@Service -class GetPostApplicationService( - private val postRepository: PostRepository, - private val iPostReadAccessControl: IPostReadAccessControl, - transaction: Transaction -) : - AbstractApplicationService(transaction, logger) { - - override suspend fun internalExecute(command: GetPost, principal: Principal): Post { - val post = postRepository.findById(PostId(command.postId)) ?: throw IllegalArgumentException("Post not found") - if (iPostReadAccessControl.isAllow(post, principal).not()) { - throw PermissionDeniedException() - } - return Post.of(post) - } - - companion object { - private val logger = LoggerFactory.getLogger(GetPostApplicationService::class.java) - } -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt index 89dd080e..5ad4a75f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt @@ -1,6 +1,7 @@ package dev.usbharu.hideout.core.application.post import dev.usbharu.hideout.core.application.exception.InternalServerException +import dev.usbharu.hideout.core.application.model.PostDetail import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.Actor diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt index bbecd56d..3ce773c5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt @@ -17,6 +17,7 @@ package dev.usbharu.hideout.core.application.relationship.get import dev.usbharu.hideout.core.application.exception.InternalServerException +import dev.usbharu.hideout.core.application.model.Relationship import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddPost.kt deleted file mode 100644 index bae9fc85..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddPost.kt +++ /dev/null @@ -1,5 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.post.PostId - -data class AddPost(val postId: PostId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddTimelineRelationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddTimelineRelationship.kt deleted file mode 100644 index 21684dda..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/AddTimelineRelationship.kt +++ /dev/null @@ -1,11 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.actor.ActorId -import dev.usbharu.hideout.core.domain.model.timeline.TimelineId -import dev.usbharu.hideout.core.domain.model.timelinerelationship.Visible - -data class AddTimelineRelationship( - val timelineId: TimelineId, - val actorId: ActorId, - val visible: Visible -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetTimelines.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetTimelines.kt deleted file mode 100644 index a4233829..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetTimelines.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -data class GetTimelines(val userDetailId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimeline.kt deleted file mode 100644 index 8ebc7d15..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimeline.kt +++ /dev/null @@ -1,5 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.support.page.Page - -data class GetUserTimeline(val id: Long, val page: Page) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt index 0d85511c..68684900 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt @@ -1,12 +1,13 @@ package dev.usbharu.hideout.core.application.timeline -import dev.usbharu.hideout.core.application.post.PostDetail +import dev.usbharu.hideout.core.application.model.PostDetail import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.post.PostRepository import dev.usbharu.hideout.core.domain.model.post.Visibility +import dev.usbharu.hideout.core.domain.model.support.page.Page import dev.usbharu.hideout.core.domain.model.support.page.PaginationList import dev.usbharu.hideout.core.domain.model.support.principal.Principal import dev.usbharu.hideout.core.query.usertimeline.UserTimelineQueryService @@ -51,3 +52,5 @@ class GetUserTimelineApplicationService( private val logger = LoggerFactory.getLogger(GetUserTimelineApplicationService::class.java) } } + +data class GetUserTimeline(val id: Long, val page: Page) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimeline.kt deleted file mode 100644 index 40e11367..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimeline.kt +++ /dev/null @@ -1,11 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.support.page.Page - -data class ReadTimeline( - val timelineId: Long, - val mediaOnly: Boolean, - val localOnly: Boolean, - val remoteOnly: Boolean, - val page: Page -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt index 53c18e48..4c30354a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt @@ -1,9 +1,10 @@ package dev.usbharu.hideout.core.application.timeline -import dev.usbharu.hideout.core.application.post.PostDetail +import dev.usbharu.hideout.core.application.model.PostDetail import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.post.PostId +import dev.usbharu.hideout.core.domain.model.support.page.Page import dev.usbharu.hideout.core.domain.model.support.page.PaginationList import dev.usbharu.hideout.core.domain.model.support.principal.Principal import dev.usbharu.hideout.core.domain.model.timeline.TimelineId @@ -88,3 +89,11 @@ class ReadTimelineApplicationService( private val logger = LoggerFactory.getLogger(ReadTimelineApplicationService::class.java) } } + +data class ReadTimeline( + val timelineId: Long, + val mediaOnly: Boolean, + val localOnly: Boolean, + val remoteOnly: Boolean, + val page: Page +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RegisterTimeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RegisterTimeline.kt deleted file mode 100644 index 4283e651..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RegisterTimeline.kt +++ /dev/null @@ -1,8 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.timeline.TimelineVisibility - -data class RegisterTimeline( - val timelineName: String, - val visibility: TimelineVisibility -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RemoveTimelineRelationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RemoveTimelineRelationship.kt deleted file mode 100644 index 5565ca22..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/RemoveTimelineRelationship.kt +++ /dev/null @@ -1,5 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationshipId - -data class RemoveTimelineRelationship(val timelineRelationshipId: TimelineRelationshipId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt index 139b6b55..a0a9e79b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt @@ -3,6 +3,7 @@ package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.support.principal.Principal +import dev.usbharu.hideout.core.domain.model.timeline.TimelineId import dev.usbharu.hideout.core.domain.model.timeline.TimelineRepository import dev.usbharu.hideout.core.external.timeline.TimelineStore import org.slf4j.LoggerFactory @@ -28,3 +29,5 @@ class SetTimelineToTimelineStoreApplicationService( private val logger = LoggerFactory.getLogger(SetTimelineToTimelineStoreApplicationService::class.java) } } + +data class SetTimleineStore(val timelineId: TimelineId) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimleineStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimleineStore.kt deleted file mode 100644 index a2257489..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimleineStore.kt +++ /dev/null @@ -1,5 +0,0 @@ -package dev.usbharu.hideout.core.application.timeline - -import dev.usbharu.hideout.core.domain.model.timeline.TimelineId - -data class SetTimleineStore(val timelineId: TimelineId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt index c00b54ef..022133eb 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt @@ -2,6 +2,7 @@ package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction +import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.post.PostRepository import dev.usbharu.hideout.core.domain.model.support.principal.Principal import dev.usbharu.hideout.core.external.timeline.TimelineStore @@ -27,3 +28,5 @@ class TimelineAddPostApplicationService( private val logger = LoggerFactory.getLogger(TimelineAddPostApplicationService::class.java) } } + +data class AddPost(val postId: PostId) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt index d78f03b2..4525511c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt @@ -3,11 +3,14 @@ package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.exception.PermissionDeniedException import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction +import dev.usbharu.hideout.core.domain.model.actor.ActorId import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser +import dev.usbharu.hideout.core.domain.model.timeline.TimelineId import dev.usbharu.hideout.core.domain.model.timeline.TimelineRepository import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationship import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationshipId import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationshipRepository +import dev.usbharu.hideout.core.domain.model.timelinerelationship.Visible import dev.usbharu.hideout.core.domain.shared.id.IdGenerateService import org.slf4j.LoggerFactory import org.springframework.stereotype.Service @@ -45,3 +48,9 @@ class UserAddTimelineRelationshipApplicationService( private val logger = LoggerFactory.getLogger(UserAddTimelineRelationshipApplicationService::class.java) } } + +data class AddTimelineRelationship( + val timelineId: TimelineId, + val actorId: ActorId, + val visible: Visible +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt index 2ebced42..b780e7e3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt @@ -35,3 +35,5 @@ class UserGetTimelinesApplicationService(transaction: Transaction, private val t private val logger = LoggerFactory.getLogger(UserGetTimelinesApplicationService::class.java) } } + +data class GetTimelines(val userDetailId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt index 5b0af07c..d35ea2a6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt @@ -3,10 +3,7 @@ package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser -import dev.usbharu.hideout.core.domain.model.timeline.Timeline -import dev.usbharu.hideout.core.domain.model.timeline.TimelineId -import dev.usbharu.hideout.core.domain.model.timeline.TimelineName -import dev.usbharu.hideout.core.domain.model.timeline.TimelineRepository +import dev.usbharu.hideout.core.domain.model.timeline.* import dev.usbharu.hideout.core.domain.shared.id.IdGenerateService import org.slf4j.LoggerFactory import org.springframework.stereotype.Component @@ -35,3 +32,8 @@ class UserRegisterTimelineApplicationService( private val logger = LoggerFactory.getLogger(UserRegisterTimelineApplicationService::class.java) } } + +data class RegisterTimeline( + val timelineName: String, + val visibility: TimelineVisibility +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt index ee2819bd..d3ef0d54 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt @@ -5,6 +5,7 @@ import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationS import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser import dev.usbharu.hideout.core.domain.model.timeline.TimelineRepository +import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationshipId import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelationshipRepository import org.slf4j.LoggerFactory import org.springframework.stereotype.Service @@ -42,3 +43,5 @@ class UserRemoveTimelineRelationshipApplicationService( private val logger = LoggerFactory.getLogger(UserRemoveTimelineRelationshipApplicationService::class.java) } } + +data class RemoveTimelineRelationship(val timelineRelationshipId: TimelineRelationshipId) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/postdetail/PostDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/postdetail/PostDetail.kt deleted file mode 100644 index 5126aa35..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/postdetail/PostDetail.kt +++ /dev/null @@ -1,22 +0,0 @@ -package dev.usbharu.hideout.core.domain.model.support.postdetail - -import dev.usbharu.hideout.core.domain.model.actor.Actor -import dev.usbharu.hideout.core.domain.model.post.Post - -data class PostDetail( - val post: Post, - val reply: Post? = null, - val repost: Post? = null, - val postActor: Actor, - val replyActor: Actor? = null, - val repostActor: Actor? = null -) { - init { - require(post.replyId == reply?.id) - require(post.repostId == repost?.id) - - require(post.actorId == postActor.id) - require(reply?.actorId == replyActor?.id) - require(repost?.actorId == repostActor?.id) - } -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index f63a2e53..f04cf6be 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -1,8 +1,8 @@ package dev.usbharu.hideout.core.infrastructure.exposedquery -import dev.usbharu.hideout.core.application.post.ActorDetail +import dev.usbharu.hideout.core.application.model.ActorDetail +import dev.usbharu.hideout.core.application.model.PostDetail import dev.usbharu.hideout.core.application.post.MediaDetail -import dev.usbharu.hideout.core.application.post.PostDetail import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.post.Visibility import dev.usbharu.hideout.core.domain.model.support.principal.Principal diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt index 2981cfa7..ca5eb505 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt @@ -1,6 +1,6 @@ package dev.usbharu.hideout.core.query.usertimeline -import dev.usbharu.hideout.core.application.post.PostDetail +import dev.usbharu.hideout.core.application.model.PostDetail import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.support.principal.Principal diff --git a/hideout-core/src/main/resources/templates/fragments-post.html b/hideout-core/src/main/resources/templates/fragments-post.html index d16f4861..a58fb594 100644 --- a/hideout-core/src/main/resources/templates/fragments-post.html +++ b/hideout-core/src/main/resources/templates/fragments-post.html @@ -8,7 +8,7 @@
- +
- +
Reply diff --git a/hideout-core/src/main/resources/templates/fragments-timeline.html b/hideout-core/src/main/resources/templates/fragments-timeline.html index ef29250c..9d89d30b 100644 --- a/hideout-core/src/main/resources/templates/fragments-timeline.html +++ b/hideout-core/src/main/resources/templates/fragments-timeline.html @@ -6,7 +6,7 @@ - + diff --git a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationServiceTest.kt b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationServiceTest.kt deleted file mode 100644 index c8cf9561..00000000 --- a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/post/GetPostApplicationServiceTest.kt +++ /dev/null @@ -1,64 +0,0 @@ -package dev.usbharu.hideout.core.application.post - -import dev.usbharu.hideout.core.application.exception.PermissionDeniedException -import dev.usbharu.hideout.core.domain.model.post.PostId -import dev.usbharu.hideout.core.domain.model.post.PostRepository -import dev.usbharu.hideout.core.domain.model.post.TestPostFactory -import dev.usbharu.hideout.core.domain.model.support.principal.Anonymous -import dev.usbharu.hideout.core.domain.service.post.IPostReadAccessControl -import kotlinx.coroutines.test.runTest -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import org.junit.jupiter.api.extension.ExtendWith -import org.mockito.InjectMocks -import org.mockito.Mock -import org.mockito.Spy -import org.mockito.junit.jupiter.MockitoExtension -import org.mockito.kotlin.any -import org.mockito.kotlin.doReturn -import org.mockito.kotlin.whenever -import utils.TestTransaction - -@ExtendWith(MockitoExtension::class) -class GetPostApplicationServiceTest { - @InjectMocks - lateinit var service: GetPostApplicationService - - @Mock - lateinit var postRepository: PostRepository - - @Mock - lateinit var iPostReadAccessControl: IPostReadAccessControl - - @Spy - val transaction = TestTransaction - - @Test - fun postReadAccessControlがtrueを返したらPostが返ってくる() = runTest { - val post = TestPostFactory.create(id = 1) - whenever(postRepository.findById(PostId(1))).doReturn(post) - whenever(iPostReadAccessControl.isAllow(any(), any())).doReturn(true) - - val actual = service.execute(GetPost(1), Anonymous) - assertEquals(Post.of(post), actual) - } - - @Test - fun postが見つからない場合失敗() = runTest { - assertThrows { - service.execute(GetPost(2), Anonymous) - } - } - - @Test - fun postReadAccessControlがfalseを返したら失敗() = runTest { - val post = TestPostFactory.create(id = 1) - whenever(postRepository.findById(PostId(1))).doReturn(post) - whenever(iPostReadAccessControl.isAllow(any(), any())).doReturn(false) - assertThrows { - service.execute(GetPost(1), Anonymous) - } - - } -} \ No newline at end of file diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringFilterApi.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringFilterApi.kt index 788a4c29..1734be87 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringFilterApi.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringFilterApi.kt @@ -27,8 +27,6 @@ import dev.usbharu.hideout.mastodon.application.filter.GetFilterV1 import dev.usbharu.hideout.mastodon.application.filter.GetFilterV1ApplicationService import dev.usbharu.hideout.mastodon.interfaces.api.generated.FilterApi import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.* -import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.Filter -import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.FilterKeyword import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.FilterPostRequest.Context import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.V1FilterPostRequest.Context.* import org.springframework.http.ResponseEntity @@ -131,7 +129,7 @@ class SpringFilterApi( ) } - private fun filter(filter: dev.usbharu.hideout.core.application.filter.Filter) = Filter( + private fun filter(filter: dev.usbharu.hideout.core.application.model.Filter) = Filter( id = filter.filterId.toString(), title = filter.name, context = filter.filterContext.map { From 3a923c7c574158ab7910694e8198111b9550e4e5 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 14 Sep 2024 21:43:56 +0900 Subject: [PATCH 02/11] =?UTF-8?q?refactor:=20Application=20Service?= =?UTF-8?q?=E3=82=92=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/actor/DeleteLocalActor.kt | 5 ---- .../core/application/actor/GetActorDetail.kt | 8 ------ .../actor/GetActorDetailApplicationService.kt | 6 +++++ .../core/application/actor/GetUserDetail.kt | 19 ------------- .../actor/GetUserDetailApplicationService.kt | 2 ++ .../application/actor/MigrationLocalActor.kt | 3 --- .../MigrationLocalActorApplicationService.kt | 2 ++ .../application/actor/RegisterLocalActor.kt | 22 --------------- .../RegisterLocalActorApplicationService.kt | 5 ++++ ...AlsoKnownAsLocalActorApplicationService.kt | 8 ------ ...StartDeleteLocalActorApplicationService.kt | 3 +++ .../application/actor/SuspendLocalActor.kt | 3 --- .../SuspendLocalActorApplicationService.kt | 2 ++ .../application/actor/UnsuspendLocalActor.kt | 3 --- .../UnsuspendLocalActorApplicationService.kt | 2 ++ .../application/RegisterApplication.kt | 26 ------------------ .../RegisterApplicationApplicationService.kt | 21 ++++++++++++--- .../core/application/filter/DeleteFilter.kt | 19 ------------- .../core/application/filter/GetFilter.kt | 19 ------------- .../core/application/filter/RegisterFilter.kt | 27 ------------------- .../filter/RegisterFilterKeyword.kt | 24 ----------------- .../UserDeleteFilterApplicationService.kt | 2 ++ .../filter/UserGetFilterApplicationService.kt | 2 ++ .../UserRegisterFilterApplicationService.kt | 12 +++++++++ .../Application.kt} | 4 +-- 25 files changed, 58 insertions(+), 191 deletions(-) delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/DeleteLocalActor.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetail.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetail.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActor.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActor.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SetAlsoKnownAsLocalActorApplicationService.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActor.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActor.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplication.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/DeleteFilter.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/GetFilter.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilter.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilterKeyword.kt rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{application/RegisteredApplication.kt => model/Application.kt} (89%) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/DeleteLocalActor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/DeleteLocalActor.kt deleted file mode 100644 index a00a4556..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/DeleteLocalActor.kt +++ /dev/null @@ -1,5 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -import dev.usbharu.hideout.core.domain.model.actor.ActorId - -data class DeleteLocalActor(val actorId: ActorId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetail.kt deleted file mode 100644 index 8089a404..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetail.kt +++ /dev/null @@ -1,8 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -import dev.usbharu.hideout.core.domain.model.support.acct.Acct - -data class GetActorDetail( - val actorName: Acct? = null, - val id: Long? = null -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt index c47c467e..ec8b44a2 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt @@ -7,6 +7,7 @@ import dev.usbharu.hideout.core.config.ApplicationConfig import dev.usbharu.hideout.core.domain.model.actor.ActorId import dev.usbharu.hideout.core.domain.model.actor.ActorRepository import dev.usbharu.hideout.core.domain.model.media.MediaRepository +import dev.usbharu.hideout.core.domain.model.support.acct.Acct import dev.usbharu.hideout.core.domain.model.support.principal.Principal import org.slf4j.LoggerFactory import org.springframework.stereotype.Component @@ -48,3 +49,8 @@ class GetActorDetailApplicationService( private val logger = LoggerFactory.getLogger(GetActorDetailApplicationService::class.java) } } + +data class GetActorDetail( + val actorName: Acct? = null, + val id: Long? = null +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetail.kt deleted file mode 100644 index 16ece3c9..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetail.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.actor - -data class GetUserDetail(val id: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt index c6a3a4b1..29b7f20c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt @@ -51,3 +51,5 @@ class GetUserDetailApplicationService( val logger = LoggerFactory.getLogger(GetUserDetailApplicationService::class.java) } } + +data class GetUserDetail(val id: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActor.kt deleted file mode 100644 index 71f7fe96..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActor.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -data class MigrationLocalActor(val from: Long, val to: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt index 24a36249..fb28172d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt @@ -74,3 +74,5 @@ class MigrationLocalActorApplicationService( private val logger = LoggerFactory.getLogger(MigrationLocalActorApplicationService::class.java) } } + +data class MigrationLocalActor(val from: Long, val to: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActor.kt deleted file mode 100644 index b54f2504..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActor.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.actor - -data class RegisterLocalActor( - val name: String, - val password: String, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt index 27adac58..27a7e23c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt @@ -76,3 +76,8 @@ class RegisterLocalActorApplicationService( private val logger = LoggerFactory.getLogger(RegisterLocalActorApplicationService::class.java) } } + +data class RegisterLocalActor( + val name: String, + val password: String, +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SetAlsoKnownAsLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SetAlsoKnownAsLocalActorApplicationService.kt deleted file mode 100644 index 3f676614..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SetAlsoKnownAsLocalActorApplicationService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -import org.springframework.stereotype.Service - -@Service -interface SetAlsoKnownAsLocalActorApplicationService { - suspend fun setAlsoKnownAs(actorId: Long, alsoKnownAs: List) -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt index 288fdf22..3d6b5761 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt @@ -20,6 +20,7 @@ import dev.usbharu.hideout.core.application.exception.InternalServerException import dev.usbharu.hideout.core.application.exception.PermissionDeniedException import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction +import dev.usbharu.hideout.core.domain.model.actor.ActorId import dev.usbharu.hideout.core.domain.model.actor.ActorRepository import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser import org.slf4j.LoggerFactory @@ -44,3 +45,5 @@ class StartDeleteLocalActorApplicationService( private val logger = LoggerFactory.getLogger(StartDeleteLocalActorApplicationService::class.java) } } + +data class DeleteLocalActor(val actorId: ActorId) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActor.kt deleted file mode 100644 index a566ce97..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActor.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -data class SuspendLocalActor(val actorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt index eaeba5e7..ad678767 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt @@ -42,3 +42,5 @@ class SuspendLocalActorApplicationService( private val logger = LoggerFactory.getLogger(SuspendLocalActorApplicationService::class.java) } } + +data class SuspendLocalActor(val actorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActor.kt deleted file mode 100644 index a8107458..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActor.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.actor - -data class UnsuspendLocalActor(val actorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt index 019753e8..e0024181 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt @@ -42,3 +42,5 @@ class UnsuspendLocalActorApplicationService( private val logger = LoggerFactory.getLogger(UnsuspendLocalActorApplicationService::class.java) } } + +data class UnsuspendLocalActor(val actorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplication.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplication.kt deleted file mode 100644 index f39b957f..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplication.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.application - -import java.net.URI - -data class RegisterApplication( - val name: String, - val redirectUris: Set, - val useRefreshToken: Boolean, - val scopes: Set, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt index 752b4a78..3b057729 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt @@ -16,6 +16,7 @@ package dev.usbharu.hideout.core.application.application +import dev.usbharu.hideout.core.application.model.Application import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.application.Application @@ -34,6 +35,7 @@ import org.springframework.security.oauth2.server.authorization.client.Registere import org.springframework.security.oauth2.server.authorization.settings.ClientSettings import org.springframework.security.oauth2.server.authorization.settings.TokenSettings import org.springframework.stereotype.Service +import java.net.URI import java.time.Duration @Service @@ -44,9 +46,15 @@ class RegisterApplicationApplicationService( private val registeredClientRepository: RegisteredClientRepository, transaction: Transaction, private val applicationRepository: ApplicationRepository, -) : AbstractApplicationService(transaction, logger) { +) : AbstractApplicationService( + transaction, + logger +) { - override suspend fun internalExecute(command: RegisterApplication, principal: Principal): RegisteredApplication { + override suspend fun internalExecute( + command: RegisterApplication, + principal: Principal + ): dev.usbharu.hideout.core.application.model.Application { val id = idGenerateService.generateId() val clientSecret = secureTokenGenerator.generate() val registeredClient = RegisteredClient @@ -82,7 +90,7 @@ class RegisterApplicationApplicationService( val application = Application(ApplicationId(id), ApplicationName(command.name)) applicationRepository.save(application) - return RegisteredApplication( + return dev.usbharu.hideout.core.application.model.Application( id = id, name = command.name, clientSecret = clientSecret, @@ -95,3 +103,10 @@ class RegisterApplicationApplicationService( private val logger = LoggerFactory.getLogger(RegisterApplicationApplicationService::class.java) } } + +data class RegisterApplication( + val name: String, + val redirectUris: Set, + val useRefreshToken: Boolean, + val scopes: Set, +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/DeleteFilter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/DeleteFilter.kt deleted file mode 100644 index 52a2bf0a..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/DeleteFilter.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.filter - -data class DeleteFilter(val filterId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/GetFilter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/GetFilter.kt deleted file mode 100644 index b9089ab0..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/GetFilter.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.filter - -data class GetFilter(val filterId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilter.kt deleted file mode 100644 index 3fd9a35f..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilter.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.filter - -import dev.usbharu.hideout.core.domain.model.filter.FilterAction -import dev.usbharu.hideout.core.domain.model.filter.FilterContext - -data class RegisterFilter( - val filterName: String, - val filterContext: Set, - val filterAction: FilterAction, - val filterKeywords: Set, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilterKeyword.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilterKeyword.kt deleted file mode 100644 index b6e3ed31..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/RegisterFilterKeyword.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.filter - -import dev.usbharu.hideout.core.domain.model.filter.FilterMode - -data class RegisterFilterKeyword( - val keyword: String, - val filterMode: FilterMode, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt index 19b07618..ab63ba14 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt @@ -44,3 +44,5 @@ class UserDeleteFilterApplicationService(private val filterRepository: FilterRep private val logger = LoggerFactory.getLogger(UserDeleteFilterApplicationService::class.java) } } + +data class DeleteFilter(val filterId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt index afad3897..1bb16d64 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt @@ -45,3 +45,5 @@ class UserGetFilterApplicationService(private val filterRepository: FilterReposi private val logger = LoggerFactory.getLogger(UserGetFilterApplicationService::class.java) } } + +data class GetFilter(val filterId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt index 68b7dc0f..4ff24099 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt @@ -61,3 +61,15 @@ class UserRegisterFilterApplicationService( private val logger = LoggerFactory.getLogger(UserRegisterFilterApplicationService::class.java) } } + +data class RegisterFilter( + val filterName: String, + val filterContext: Set, + val filterAction: FilterAction, + val filterKeywords: Set, +) + +data class RegisterFilterKeyword( + val keyword: String, + val filterMode: FilterMode, +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisteredApplication.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Application.kt similarity index 89% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisteredApplication.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Application.kt index a5a18032..38e93779 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisteredApplication.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Application.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.application +package dev.usbharu.hideout.core.application.model import java.net.URI -data class RegisteredApplication( +data class Application( val id: Long, val name: String, val redirectUris: Set, From 6904bc0692a1f383bbbab90a9fa3a485c17a64be Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 14 Sep 2024 21:52:27 +0900 Subject: [PATCH 03/11] =?UTF-8?q?refactor:=20Application=20Service?= =?UTF-8?q?=E3=82=92=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../media/UploadMediaApplicationService.kt | 2 +- .../{post => model}/MediaDetail.kt | 2 +- .../core/application/model/PostDetail.kt | 1 - .../core/application/post/GetPostDetail.kt | 3 - .../post/GetPostDetailApplicationService.kt | 2 + .../hideout/core/application/post/Post.kt | 58 ------------------- .../application/post/RegisterLocalPost.kt | 29 ---------- .../RegisterLocalPostApplicationService.kt | 11 ++++ .../core/application/post/UpdateLocalNote.kt | 25 -------- .../post/UpdateLocalNoteApplicationService.kt | 8 +++ .../application/reaction/CreateReaction.kt | 3 - .../application/reaction/RemoveReaction.kt | 7 --- .../UserCreateReactionApplicationService.kt | 2 + .../UserRemoveReactionApplicationService.kt | 6 ++ .../GetRelationshipApplicationService.kt | 4 +- ...erAcceptFollowRequestApplicationService.kt | 5 +- .../UserBlockApplicationService.kt | 4 +- .../UserFollowRequestApplicationService.kt | 4 +- .../{mute => }/UserMuteApplicationService.kt | 5 +- ...erRejectFollowRequestApplicationService.kt | 5 +- ...erRemoveFromFollowersApplicationService.kt | 5 +- .../UserUnblockApplicationService.kt | 5 +- .../UserUnfollowApplicationService.kt | 5 +- .../UserUnmuteApplicationService.kt | 5 +- .../AcceptFollowRequest.kt | 19 ------ .../application/relationship/block/Block.kt | 19 ------ .../followrequest/FollowRequest.kt | 19 ------ .../relationship/get/GetRelationship.kt | 19 ------ .../application/relationship/mute/Mute.kt | 19 ------ .../RejectFollowRequest.kt | 19 ------ .../RemoveFromFollowers.kt | 19 ------ .../relationship/unblock/Unblock.kt | 19 ------ .../relationship/unfollow/Unfollow.kt | 19 ------ .../application/relationship/unmute/Unmute.kt | 19 ------ .../ExposedUserTimelineQueryService.kt | 2 +- .../interfaces/web/user/UserController.kt | 7 +-- ...ceptFollowRequestApplicationServiceTest.kt | 2 + .../interfaces/api/SpringAccountApi.kt | 21 +------ 38 files changed, 66 insertions(+), 362 deletions(-) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{post => model}/MediaDetail.kt (94%) delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetail.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/Post.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPost.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNote.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/CreateReaction.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/RemoveReaction.kt rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{get => }/GetRelationshipApplicationService.kt (96%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{acceptfollowrequest => }/UserAcceptFollowRequestApplicationService.kt (92%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{block => }/UserBlockApplicationService.kt (96%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{followrequest => }/UserFollowRequestApplicationService.kt (95%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{mute => }/UserMuteApplicationService.kt (93%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{rejectfollowrequest => }/UserRejectFollowRequestApplicationService.kt (92%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{removefromfollowers => }/UserRemoveFromFollowersApplicationService.kt (92%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{unblock => }/UserUnblockApplicationService.kt (93%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{unfollow => }/UserUnfollowApplicationService.kt (93%) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/{unmute => }/UserUnmuteApplicationService.kt (93%) delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/AcceptFollowRequest.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/Block.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/FollowRequest.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationship.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/Mute.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/RejectFollowRequest.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/RemoveFromFollowers.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/Unblock.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/Unfollow.kt delete mode 100644 hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/Unmute.kt diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt index a68e64d7..adad1fb5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt @@ -16,7 +16,7 @@ package dev.usbharu.hideout.core.application.media -import dev.usbharu.hideout.core.application.post.MediaDetail +import dev.usbharu.hideout.core.application.model.MediaDetail import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.media.* diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/MediaDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt similarity index 94% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/MediaDetail.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt index e29dac77..323b6b26 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/MediaDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt @@ -1,4 +1,4 @@ -package dev.usbharu.hideout.core.application.post +package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.media.Media import java.net.URI diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt index 1ccdc1a8..5d6995f1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt @@ -1,6 +1,5 @@ package dev.usbharu.hideout.core.application.model -import dev.usbharu.hideout.core.application.post.MediaDetail import dev.usbharu.hideout.core.domain.model.actor.Actor import dev.usbharu.hideout.core.domain.model.media.Media import dev.usbharu.hideout.core.domain.model.post.Post diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetail.kt deleted file mode 100644 index 796e167b..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetail.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.post - -data class GetPostDetail(val postId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt index 5ad4a75f..c6b29134 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt @@ -98,3 +98,5 @@ class GetPostDetailApplicationService( private val logger = LoggerFactory.getLogger(GetPostDetailApplicationService::class.java) } } + +data class GetPostDetail(val postId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/Post.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/Post.kt deleted file mode 100644 index 2ed11666..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/Post.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.post - -import dev.usbharu.hideout.core.domain.model.post.Post -import dev.usbharu.hideout.core.domain.model.post.Visibility -import java.net.URI -import java.time.Instant - -data class Post( - val id: Long, - val actorId: Long, - val overview: String?, - val text: String, - val content: String, - val createdAt: Instant, - val visibility: Visibility, - val url: URI, - val repostId: Long?, - val replyId: Long?, - val sensitive: Boolean, - val mediaIds: List, - val moveTo: Long?, -) { - companion object { - fun of(post: Post): dev.usbharu.hideout.core.application.post.Post { - return Post( - id = post.id.id, - actorId = post.actorId.id, - overview = post.overview?.overview, - text = post.text, - content = post.content.content, - createdAt = post.createdAt, - visibility = post.visibility, - url = post.url, - repostId = post.repostId?.id, - replyId = post.replyId?.id, - sensitive = post.sensitive, - mediaIds = post.mediaIds.map { it.id }, - moveTo = post.moveTo?.id - ) - } - } -} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPost.kt deleted file mode 100644 index b5fd2f71..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPost.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.post - -import dev.usbharu.hideout.core.domain.model.post.Visibility - -data class RegisterLocalPost( - val content: String, - val overview: String?, - val visibility: Visibility, - val repostId: Long?, - val replyId: Long?, - val sensitive: Boolean, - val mediaIds: List, -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt index ad950c66..35468ab0 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt @@ -24,6 +24,7 @@ import dev.usbharu.hideout.core.domain.model.media.MediaId import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.post.PostOverview import dev.usbharu.hideout.core.domain.model.post.PostRepository +import dev.usbharu.hideout.core.domain.model.post.Visibility import dev.usbharu.hideout.core.domain.model.support.principal.LocalUser import dev.usbharu.hideout.core.infrastructure.factory.PostFactoryImpl import org.slf4j.Logger @@ -64,3 +65,13 @@ class RegisterLocalPostApplicationService( val logger: Logger = LoggerFactory.getLogger(RegisterLocalPostApplicationService::class.java) } } + +data class RegisterLocalPost( + val content: String, + val overview: String?, + val visibility: Visibility, + val repostId: Long?, + val replyId: Long?, + val sensitive: Boolean, + val mediaIds: List, +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNote.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNote.kt deleted file mode 100644 index 64ce9831..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNote.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.post - -data class UpdateLocalNote( - val postId: Long, - val overview: String?, - val content: String, - val sensitive: Boolean, - val mediaIds: List -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt index 9c9b4003..480d71c5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt @@ -64,3 +64,11 @@ class UpdateLocalNoteApplicationService( private val logger = LoggerFactory.getLogger(UpdateLocalNoteApplicationService::class.java) } } + +data class UpdateLocalNote( + val postId: Long, + val overview: String?, + val content: String, + val sensitive: Boolean, + val mediaIds: List +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/CreateReaction.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/CreateReaction.kt deleted file mode 100644 index 7d6f171b..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/CreateReaction.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.usbharu.hideout.core.application.reaction - -data class CreateReaction(val postId: Long, val customEmojiId: Long?, val unicodeEmoji: String) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/RemoveReaction.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/RemoveReaction.kt deleted file mode 100644 index 6a7dd7ff..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/RemoveReaction.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.usbharu.hideout.core.application.reaction - -data class RemoveReaction( - val postId: Long, - val customEmojiId: Long?, - val unicodeEmoji: String -) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt index f0a7f2dd..a9affaad 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt @@ -63,3 +63,5 @@ class UserCreateReactionApplicationService( private val logger = LoggerFactory.getLogger(UserCreateReactionApplicationService::class.java) } } + +data class CreateReaction(val postId: Long, val customEmojiId: Long?, val unicodeEmoji: String) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt index 4335ee63..8f2281a8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt @@ -49,3 +49,9 @@ class UserRemoveReactionApplicationService( private val logger = LoggerFactory.getLogger(UserRemoveReactionApplicationService::class.java) } } + +data class RemoveReaction( + val postId: Long, + val customEmojiId: Long?, + val unicodeEmoji: String +) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt similarity index 96% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt index 3ce773c5..995a1562 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.get +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException import dev.usbharu.hideout.core.application.model.Relationship @@ -70,3 +70,5 @@ class GetRelationshipApplicationService( private val logger = LoggerFactory.getLogger(GetRelationshipApplicationService::class.java) } } + +data class GetRelationship(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt similarity index 92% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt index 2ec51b4b..6e4eac2b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.acceptfollowrequest +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -52,3 +51,5 @@ class UserAcceptFollowRequestApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class AcceptFollowRequest(val sourceActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/UserBlockApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt similarity index 96% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/UserBlockApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt index 0dd1e686..2d65a838 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/UserBlockApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.block +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction @@ -61,3 +61,5 @@ class UserBlockApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class Block(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/UserFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt similarity index 95% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/UserFollowRequestApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt index e277f786..ca0a4bf3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/UserFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.followrequest +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService @@ -56,3 +56,5 @@ class UserFollowRequestApplicationService( private val logger = LoggerFactory.getLogger(UserFollowRequestApplicationService::class.java) } } + +data class FollowRequest(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/UserMuteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/UserMuteApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt index 537e4f1d..2d23259e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/UserMuteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.mute +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -54,3 +53,5 @@ class UserMuteApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class Mute(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/UserRejectFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt similarity index 92% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/UserRejectFollowRequestApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt index acc01ebe..0046466e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/UserRejectFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.rejectfollowrequest +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -52,3 +51,5 @@ class UserRejectFollowRequestApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class RejectFollowRequest(val sourceActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/UserRemoveFromFollowersApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt similarity index 92% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/UserRemoveFromFollowersApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt index adce9c61..55461180 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/UserRemoveFromFollowersApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.removefromfollowers +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -54,3 +53,5 @@ class UserRemoveFromFollowersApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class RemoveFromFollowers(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/UserUnblockApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/UserUnblockApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt index 1e0e8d38..ba1366f9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/UserUnblockApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.unblock +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -54,3 +53,5 @@ class UserUnblockApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class Unblock(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/UserUnfollowApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/UserUnfollowApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt index e747fda8..842dbefc 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/UserUnfollowApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.unfollow +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -54,3 +53,5 @@ class UserUnfollowApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class Unfollow(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/UserUnmuteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt similarity index 93% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/UserUnmuteApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt index 39b20e19..9507dad6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/UserUnmuteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt @@ -14,10 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.relationship.unmute +package dev.usbharu.hideout.core.application.relationship import dev.usbharu.hideout.core.application.exception.InternalServerException -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.actor.ActorId @@ -54,3 +53,5 @@ class UserUnmuteApplicationService( private val logger = LoggerFactory.getLogger(UserBlockApplicationService::class.java) } } + +data class Unmute(val targetActorId: Long) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/AcceptFollowRequest.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/AcceptFollowRequest.kt deleted file mode 100644 index 6c0d9f20..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/AcceptFollowRequest.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.acceptfollowrequest - -data class AcceptFollowRequest(val sourceActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/Block.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/Block.kt deleted file mode 100644 index 7a095b92..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/block/Block.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.block - -data class Block(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/FollowRequest.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/FollowRequest.kt deleted file mode 100644 index 3f8de0a7..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/followrequest/FollowRequest.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.followrequest - -data class FollowRequest(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationship.kt deleted file mode 100644 index 90df1b82..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/get/GetRelationship.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.get - -data class GetRelationship(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/Mute.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/Mute.kt deleted file mode 100644 index 79a56830..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/mute/Mute.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.mute - -data class Mute(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/RejectFollowRequest.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/RejectFollowRequest.kt deleted file mode 100644 index 4662eff1..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/rejectfollowrequest/RejectFollowRequest.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.rejectfollowrequest - -data class RejectFollowRequest(val sourceActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/RemoveFromFollowers.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/RemoveFromFollowers.kt deleted file mode 100644 index f9642099..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/removefromfollowers/RemoveFromFollowers.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.removefromfollowers - -data class RemoveFromFollowers(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/Unblock.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/Unblock.kt deleted file mode 100644 index 7b85c603..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unblock/Unblock.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.unblock - -data class Unblock(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/Unfollow.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/Unfollow.kt deleted file mode 100644 index 60190dab..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unfollow/Unfollow.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.unfollow - -data class Unfollow(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/Unmute.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/Unmute.kt deleted file mode 100644 index 1939ee25..00000000 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/unmute/Unmute.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 usbharu - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.usbharu.hideout.core.application.relationship.unmute - -data class Unmute(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index f04cf6be..4e36dfb8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -1,8 +1,8 @@ package dev.usbharu.hideout.core.infrastructure.exposedquery import dev.usbharu.hideout.core.application.model.ActorDetail +import dev.usbharu.hideout.core.application.model.MediaDetail import dev.usbharu.hideout.core.application.model.PostDetail -import dev.usbharu.hideout.core.application.post.MediaDetail import dev.usbharu.hideout.core.domain.model.post.PostId import dev.usbharu.hideout.core.domain.model.post.Visibility import dev.usbharu.hideout.core.domain.model.support.principal.Principal diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt index a7d8a900..81072023 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt @@ -3,12 +3,7 @@ package dev.usbharu.hideout.core.interfaces.web.user import dev.usbharu.hideout.core.application.actor.GetActorDetail import dev.usbharu.hideout.core.application.actor.GetActorDetailApplicationService import dev.usbharu.hideout.core.application.instance.GetLocalInstanceApplicationService -import dev.usbharu.hideout.core.application.relationship.followrequest.FollowRequest -import dev.usbharu.hideout.core.application.relationship.followrequest.UserFollowRequestApplicationService -import dev.usbharu.hideout.core.application.relationship.get.GetRelationship -import dev.usbharu.hideout.core.application.relationship.get.GetRelationshipApplicationService -import dev.usbharu.hideout.core.application.relationship.unfollow.Unfollow -import dev.usbharu.hideout.core.application.relationship.unfollow.UserUnfollowApplicationService +import dev.usbharu.hideout.core.application.relationship.* import dev.usbharu.hideout.core.application.timeline.GetUserTimeline import dev.usbharu.hideout.core.application.timeline.GetUserTimelineApplicationService import dev.usbharu.hideout.core.domain.model.support.acct.Acct diff --git a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationServiceTest.kt b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationServiceTest.kt index 353a9769..e8af07c6 100644 --- a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationServiceTest.kt +++ b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/application/relationship/acceptfollowrequest/UserAcceptFollowRequestApplicationServiceTest.kt @@ -1,6 +1,8 @@ package dev.usbharu.hideout.core.application.relationship.acceptfollowrequest import dev.usbharu.hideout.core.application.exception.InternalServerException +import dev.usbharu.hideout.core.application.relationship.AcceptFollowRequest +import dev.usbharu.hideout.core.application.relationship.UserAcceptFollowRequestApplicationService import dev.usbharu.hideout.core.domain.model.actor.ActorId import dev.usbharu.hideout.core.domain.model.actor.ActorRepository import dev.usbharu.hideout.core.domain.model.actor.TestActorFactory diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringAccountApi.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringAccountApi.kt index a9471098..7f984a77 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringAccountApi.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringAccountApi.kt @@ -19,26 +19,7 @@ package dev.usbharu.hideout.mastodon.interfaces.api import dev.usbharu.hideout.core.application.actor.GetUserDetail import dev.usbharu.hideout.core.application.actor.GetUserDetailApplicationService import dev.usbharu.hideout.core.application.exception.PermissionDeniedException -import dev.usbharu.hideout.core.application.relationship.acceptfollowrequest.AcceptFollowRequest -import dev.usbharu.hideout.core.application.relationship.acceptfollowrequest.UserAcceptFollowRequestApplicationService -import dev.usbharu.hideout.core.application.relationship.block.Block -import dev.usbharu.hideout.core.application.relationship.block.UserBlockApplicationService -import dev.usbharu.hideout.core.application.relationship.followrequest.FollowRequest -import dev.usbharu.hideout.core.application.relationship.followrequest.UserFollowRequestApplicationService -import dev.usbharu.hideout.core.application.relationship.get.GetRelationship -import dev.usbharu.hideout.core.application.relationship.get.GetRelationshipApplicationService -import dev.usbharu.hideout.core.application.relationship.mute.Mute -import dev.usbharu.hideout.core.application.relationship.mute.UserMuteApplicationService -import dev.usbharu.hideout.core.application.relationship.rejectfollowrequest.RejectFollowRequest -import dev.usbharu.hideout.core.application.relationship.rejectfollowrequest.UserRejectFollowRequestApplicationService -import dev.usbharu.hideout.core.application.relationship.removefromfollowers.RemoveFromFollowers -import dev.usbharu.hideout.core.application.relationship.removefromfollowers.UserRemoveFromFollowersApplicationService -import dev.usbharu.hideout.core.application.relationship.unblock.Unblock -import dev.usbharu.hideout.core.application.relationship.unblock.UserUnblockApplicationService -import dev.usbharu.hideout.core.application.relationship.unfollow.Unfollow -import dev.usbharu.hideout.core.application.relationship.unfollow.UserUnfollowApplicationService -import dev.usbharu.hideout.core.application.relationship.unmute.Unmute -import dev.usbharu.hideout.core.application.relationship.unmute.UserUnmuteApplicationService +import dev.usbharu.hideout.core.application.relationship.* import dev.usbharu.hideout.core.domain.model.support.principal.Principal import dev.usbharu.hideout.core.infrastructure.springframework.oauth2.SpringSecurityOauth2PrincipalContextHolder import dev.usbharu.hideout.mastodon.application.accounts.GetAccount From c52d1576969cbcf619ab834e03a400795d8abc31 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:09:39 +0900 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20=E3=83=AA=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=AF=E3=82=BF=E3=83=AA=E3=83=B3=E3=82=B0=E3=81=A7=E5=A3=8A?= =?UTF-8?q?=E3=82=8C=E3=81=9F=E9=83=A8=E5=88=86=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actor/GetActorDetailApplicationService.kt | 4 +-- .../RegisterApplicationApplicationService.kt | 1 - .../core/application/model/ActorDetail.kt | 6 ++-- .../ExposedUserTimelineQueryService.kt | 31 +++++++++++-------- .../resources/templates/fragments-post.html | 6 ++-- .../mastodon/interfaces/api/SpringMediaApi.kt | 17 +++++----- 6 files changed, 35 insertions(+), 30 deletions(-) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt index ec8b44a2..29ffdc33 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt @@ -39,8 +39,8 @@ class GetActorDetailApplicationService( throw IllegalArgumentException("id and actorName are null.") } - val iconUrl = actor.icon?.let { mediaRepository.findById(it)?.url } - val bannerUrl = actor.banner?.let { mediaRepository.findById(it)?.url } + val iconUrl = actor.icon?.let { mediaRepository.findById(it) } + val bannerUrl = actor.banner?.let { mediaRepository.findById(it) } return ActorDetail.of(actor, iconUrl, bannerUrl) } diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt index 3b057729..47a2de93 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt @@ -16,7 +16,6 @@ package dev.usbharu.hideout.core.application.application -import dev.usbharu.hideout.core.application.model.Application import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.application.Application diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt index 851dcd44..fd3694b8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt @@ -9,7 +9,8 @@ data class ActorDetail( val name: String, val screenName: String, val host: String, - val remoteUrl: String?, + val instanceId: Long, + val remoteUrl: URI?, val locked: Boolean, val description: String, val postsCount: Int, @@ -25,7 +26,8 @@ data class ActorDetail( name = actor.name.name, screenName = actor.screenName.screenName, host = actor.url.host, - remoteUrl = actor.url.toString(), + instanceId = actor.instance.instanceId, + remoteUrl = actor.url, locked = actor.locked, description = actor.description.description, postsCount = actor.postsCount.postsCount, diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index 4e36dfb8..1864586b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -42,10 +42,10 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi .select(Posts.columns) .where { Posts.visibility eq Visibility.PUBLIC.name or - (Posts.visibility eq Visibility.UNLISTED.name) or - (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or - (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or - (Posts.actorId eq principal.actorId.id) + (Posts.visibility eq Visibility.UNLISTED.name) or + (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or + (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or + (Posts.actorId eq principal.actorId.id) } .alias("authorized_table") } @@ -56,15 +56,15 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi val iconMedia = Media.alias("ICON_MEDIA") return authorizedQuery - .leftJoin(PostsVisibleActors, { authorizedQuery[Posts.id] }, { PostsVisibleActors.postId }) - .leftJoin(Actors, { authorizedQuery[Posts.actorId] }, { Actors.id }) + .leftJoin(PostsVisibleActors, { authorizedQuery[Posts.id] }, { postId }) + .leftJoin(Actors, { authorizedQuery[Posts.actorId] }, { id }) .leftJoin(iconMedia, { Actors.icon }, { iconMedia[Media.id] }) - .leftJoin(PostsMedia, { authorizedQuery[Posts.id] }, { PostsMedia.postId }) - .leftJoin(Media, { PostsMedia.mediaId }, { Media.id }) + .leftJoin(PostsMedia, { authorizedQuery[Posts.id] }, { postId }) + .leftJoin(Media, { PostsMedia.mediaId }, { id }) .leftJoin( Reactions, { authorizedQuery[Posts.id] }, - { Reactions.postId }, + { postId }, { Reactions.id isDistinctFrom principal.actorId.id } ) .selectAll() @@ -85,14 +85,19 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi return PostDetail( id = it[authorizedQuery[Posts.id]], actor = ActorDetail( - actorId = it[authorizedQuery[Posts.actorId]], + id = it[authorizedQuery[Posts.actorId]], instanceId = it[Actors.instance], name = it[Actors.name], - domain = it[Actors.domain], + host = it[Actors.domain], screenName = it[Actors.screenName], - url = it[Actors.url], + remoteUrl = it[Actors.url], locked = it[Actors.locked], - icon = it.getOrNull(iconMedia[Media.url]) + iconUrl = it.getOrNull(iconMedia[Media.url]), + description = it[Actors.description], + postsCount = it[Actors.postsCount], + bannerURL = null, + followingCount = it[Actors.followingCount], + followersCount = it[Actors.followersCount], ), overview = it[authorizedQuery[Posts.overview]], text = it[authorizedQuery[Posts.text]], diff --git a/hideout-core/src/main/resources/templates/fragments-post.html b/hideout-core/src/main/resources/templates/fragments-post.html index a58fb594..e094c18a 100644 --- a/hideout-core/src/main/resources/templates/fragments-post.html +++ b/hideout-core/src/main/resources/templates/fragments-post.html @@ -9,10 +9,10 @@
- +
- +
diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringMediaApi.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringMediaApi.kt index 16fbe9cb..d5bed541 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringMediaApi.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringMediaApi.kt @@ -18,7 +18,6 @@ package dev.usbharu.hideout.mastodon.interfaces.api import dev.usbharu.hideout.core.application.media.UploadMedia import dev.usbharu.hideout.core.application.media.UploadMediaApplicationService -import dev.usbharu.hideout.core.domain.model.media.FileType.* import dev.usbharu.hideout.core.infrastructure.springframework.oauth2.SpringSecurityOauth2PrincipalContextHolder import dev.usbharu.hideout.mastodon.interfaces.api.generated.MediaApi import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.MediaAttachment @@ -58,18 +57,18 @@ class SpringMediaApi( return ResponseEntity.ok( MediaAttachment( - id = media.id.toString(), + id = media.mediaId.toString(), type = when (media.type) { - Image -> MediaAttachment.Type.image - Video -> MediaAttachment.Type.video - Audio -> MediaAttachment.Type.audio - Unknown -> MediaAttachment.Type.unknown + "Image" -> MediaAttachment.Type.image + "Video" -> MediaAttachment.Type.video + "Audio" -> MediaAttachment.Type.audio + else -> MediaAttachment.Type.unknown }, url = media.url.toString(), - previewUrl = media.thumbprintURI?.toString(), - remoteUrl = media.remoteURL?.toString(), + previewUrl = media.thumbnailUrl?.toString(), + remoteUrl = null, description = media.description, - blurhash = media.blurHash, + blurhash = media.blurhash, textUrl = media.url.toASCIIString() ) ) From d9b51d44e1ab1d21ace00d08aa01d27e546344b3 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:20:23 +0900 Subject: [PATCH 05/11] =?UTF-8?q?chore:=20=E3=82=B3=E3=83=94=E3=83=BC?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=88=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hideout-core/build.gradle.kts | 16 ++ .../gradle/wrapper/gradle-wrapper.properties | 16 ++ hideout-core/gradlew | 6 +- hideout-core/gradlew.bat | 204 ++++++++++-------- hideout-core/settings.gradle.kts | 16 ++ .../actor/GetActorDetailApplicationService.kt | 16 ++ .../subscribers/DomainEventSubscriber.kt | 16 ++ .../subscribers/RegisterHomeTimeline.kt | 16 ++ ...isterLocalUserSetHomeTimelineSubscriber.kt | 16 ++ ...isterTimelineSetTimelineStoreSubscriber.kt | 16 ++ .../domainevent/subscribers/Subscriber.kt | 16 ++ .../subscribers/SubscriberRunner.kt | 16 ++ .../TimelinePostCreateSubscriber.kt | 16 ++ .../TimelineRelationshipFollowSubscriber.kt | 16 ++ .../TimelineRelationshipUnfollowSubscriber.kt | 16 ++ ...rRegisterHomeTimelineApplicationService.kt | 16 ++ .../exception/InternalServerException.kt | 16 ++ .../exception/PermissionDeniedException.kt | 16 ++ .../GetLocalInstanceApplicationService.kt | 16 ++ .../core/application/model/ActorDetail.kt | 16 ++ .../core/application/model/Instance.kt | 16 ++ .../core/application/model/MediaDetail.kt | 16 ++ .../core/application/model/PostDetail.kt | 16 ++ .../core/application/model/Reactions.kt | 16 ++ .../core/application/model/Timeline.kt | 16 ++ .../post/GetPostDetailApplicationService.kt | 16 ++ .../UserCreateReactionApplicationService.kt | 16 ++ .../UserRemoveReactionApplicationService.kt | 16 ++ .../LocalUserAbstractApplicationService.kt | 16 ++ .../GetUserTimelineApplicationService.kt | 16 ++ .../ReadTimelineApplicationService.kt | 16 ++ ...melineToTimelineStoreApplicationService.kt | 16 ++ .../TimelineAddPostApplicationService.kt | 16 ++ ...dTimelineRelationshipApplicationService.kt | 16 ++ .../UserGetTimelinesApplicationService.kt | 16 ++ .../UserRegisterTimelineApplicationService.kt | 16 ++ ...eTimelineRelationshipApplicationService.kt | 16 ++ .../core/config/DefaultTimelineStoreConfig.kt | 16 ++ .../hideout/core/config/FFmpegVideoConfig.kt | 16 ++ .../hideout/core/config/FlywayConfig.kt | 16 ++ .../hideout/core/config/ImageIOImageConfig.kt | 16 ++ .../hideout/core/config/LocalStorageConfig.kt | 16 ++ .../core/config/MessageSourceConfig.kt | 16 ++ .../hideout/core/config/S3StorageConfig.kt | 16 ++ .../domain/event/reaction/ReactionEvent.kt | 16 ++ .../domain/event/timeline/TimelineEvent.kt | 16 ++ .../event/userdetail/UserDetailEvent.kt | 16 ++ .../core/domain/model/filter/Filter.kt | 16 ++ .../core/domain/model/filter/FilterAction.kt | 16 ++ .../core/domain/model/filter/FilterContext.kt | 16 ++ .../core/domain/model/filter/FilterId.kt | 16 ++ .../core/domain/model/filter/FilterKeyword.kt | 16 ++ .../domain/model/filter/FilterKeywordId.kt | 16 ++ .../model/filter/FilterKeywordKeyword.kt | 16 ++ .../core/domain/model/filter/FilterMode.kt | 16 ++ .../core/domain/model/filter/FilterName.kt | 16 ++ .../domain/model/filter/FilterRepository.kt | 16 ++ .../core/domain/model/filter/FilterResult.kt | 16 ++ .../core/domain/model/filter/FilteredPost.kt | 16 ++ .../model/followtimeline/FollowTimeline.kt | 16 ++ .../FollowTimelineRepository.kt | 16 ++ .../core/domain/model/reaction/Reaction.kt | 16 ++ .../core/domain/model/reaction/ReactionId.kt | 16 ++ .../model/reaction/ReactionRepository.kt | 16 ++ .../core/domain/model/support/acct/Acct.kt | 16 ++ .../core/domain/model/support/page/Page.kt | 16 ++ .../model/support/page/PaginationList.kt | 16 ++ .../model/support/principal/Anonymous.kt | 16 ++ .../model/support/principal/LocalUser.kt | 16 ++ .../model/support/principal/Principal.kt | 16 ++ .../principal/PrincipalContextHolder.kt | 16 ++ .../TimelineObjectDetail.kt | 16 ++ .../core/domain/model/timeline/Timeline.kt | 16 ++ .../core/domain/model/timeline/TimelineId.kt | 16 ++ .../domain/model/timeline/TimelineName.kt | 16 ++ .../model/timeline/TimelineRepository.kt | 16 ++ .../model/timeline/TimelineVisibility.kt | 16 ++ .../model/timelineobject/TimelineObject.kt | 16 ++ .../model/timelineobject/TimelineObjectId.kt | 16 ++ .../TimelineObjectWarnFilter.kt | 16 ++ .../TimelineRelationship.kt | 16 ++ .../TimelineRelationshipId.kt | 16 ++ .../TimelineRelationshipRepository.kt | 16 ++ .../service/emoji/UnicodeEmojiService.kt | 16 ++ .../service/filter/FilterDomainService.kt | 16 ++ .../post/DefaultPostReadAccessControl.kt | 16 ++ .../domainevent/DomainEventPublisher.kt | 16 ++ .../DomainEventPublishableRepository.kt | 16 ++ .../external/media/DelegateMediaProcessor.kt | 16 ++ .../core/external/media/FileTypeDeterminer.kt | 16 ++ .../external/media/TikaFileTypeDeterminer.kt | 16 ++ .../core/external/mediastore/MediaStore.kt | 16 ++ .../external/timeline/ReadTimelineOption.kt | 16 ++ .../core/external/timeline/TimelineStore.kt | 16 ++ .../infrastructure/awss3/AWSS3MediaStore.kt | 16 ++ .../emojikt/EmojiKtUnicodeEmojiService.kt | 16 ++ .../infrastructure/exposed/UriColumnType.kt | 16 ++ .../ExposedPrincipalQueryService.kt | 16 ++ .../ExposedReactionsQueryService.kt | 16 ++ .../ExposedUserTimelineQueryService.kt | 16 ++ .../ExposedActorRepository.kt | 16 ++ .../ExposedReactionRepository.kt | 16 ++ .../ExposedTimelineRelationshipRepository.kt | 16 ++ .../ExposedTimelineRepository.kt | 16 ++ .../LocalFileSystemMediaStore.kt | 16 ++ .../media/common/GenerateBlurhash.kt | 16 ++ .../media/common/GenerateBlurhashImpl.kt | 16 ++ .../media/image/ImageIOImageProcessor.kt | 16 ++ .../media/video/FFmpegVideoProcessor.kt | 16 ++ .../MongoInternalTimelineObjectRepository.kt | 16 ++ .../ApplicationRequestLogInterceptor.kt | 16 ++ .../springframework/SPAInterceptor.kt | 16 ++ ...SecurityFormLoginPrincipalContextHolder.kt | 16 ++ .../SpringFrameworkDomainEventSubscriber.kt | 16 ++ ...ingSecurityOauth2PrincipalContextHolder.kt | 16 ++ .../timeline/AbstractTimelineStore.kt | 16 ++ .../timeline/DefaultTimelineStore.kt | 16 ++ .../InternalTimelineObjectRepository.kt | 16 ++ .../core/interfaces/web/IndexController.kt | 16 ++ .../core/interfaces/web/auth/SignUpForm.kt | 16 ++ .../hideout/core/interfaces/web/common/OGP.kt | 16 ++ .../interfaces/web/posts/PostsController.kt | 16 ++ .../interfaces/web/posts/PublishController.kt | 16 ++ .../core/interfaces/web/posts/PublishPost.kt | 16 ++ .../web/timeline/TimelineController.kt | 16 ++ .../interfaces/web/user/UserController.kt | 16 ++ .../core/query/principal/PrincipalDTO.kt | 16 ++ .../query/principal/PrincipalQueryService.kt | 16 ++ .../query/reactions/ReactionsQueryService.kt | 16 ++ .../usertimeline/UserTimelineQueryService.kt | 16 ++ .../src/main/resources/application.yml | 2 +- .../resources/db/migration/V1__Init_DB.sql | 32 +++ .../src/main/resources/logback-spring.xml | 16 ++ .../messages/hideout-web-messages.properties | 16 ++ .../hideout-web-messages_en_US.properties | 16 ++ .../hideout-web-messages_ja_JP.properties | 16 ++ .../resources/templates/fragments-actor.html | 16 ++ .../resources/templates/fragments-post.html | 16 ++ .../templates/fragments-timeline.html | 16 ++ .../resources/templates/homeTimeline.html | 16 ++ .../src/main/resources/templates/index.html | 16 ++ .../src/main/resources/templates/layout.html | 16 ++ .../resources/templates/post-postForm.html | 16 ++ .../main/resources/templates/postById.html | 16 ++ .../src/main/resources/templates/sign_in.html | 16 ++ .../main/resources/templates/sign_out.html | 16 ++ .../src/main/resources/templates/sign_up.html | 16 ++ .../src/main/resources/templates/top.html | 16 ++ .../main/resources/templates/userById.html | 16 ++ 149 files changed, 2465 insertions(+), 99 deletions(-) diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index d184d19c..466f2a61 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import com.github.jk1.license.filter.DependencyFilter import com.github.jk1.license.filter.LicenseBundleNormalizer import com.github.jk1.license.importer.DependencyDataImporter diff --git a/hideout-core/gradle/wrapper/gradle-wrapper.properties b/hideout-core/gradle/wrapper/gradle-wrapper.properties index 9355b415..71b2c5e9 100644 --- a/hideout-core/gradle/wrapper/gradle-wrapper.properties +++ b/hideout-core/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) 2024 usbharu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip diff --git a/hideout-core/gradlew b/hideout-core/gradlew index f5feea6d..7f0e3f40 100755 --- a/hideout-core/gradlew +++ b/hideout-core/gradlew @@ -1,13 +1,13 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright (C) 2024 usbharu # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,8 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# SPDX-License-Identifier: Apache-2.0 -# ############################################################################## # diff --git a/hideout-core/gradlew.bat b/hideout-core/gradlew.bat index 9b42019c..9f05b040 100644 --- a/hideout-core/gradlew.bat +++ b/hideout-core/gradlew.bat @@ -1,94 +1,110 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +# +# Copyright (C) 2024 usbharu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/hideout-core/settings.gradle.kts b/hideout-core/settings.gradle.kts index bb105a10..07645f2b 100644 --- a/hideout-core/settings.gradle.kts +++ b/hideout-core/settings.gradle.kts @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt index 29ffdc33..5fe212a8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.actor import dev.usbharu.hideout.core.application.model.ActorDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/DomainEventSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/DomainEventSubscriber.kt index af70e1ef..59229def 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/DomainEventSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/DomainEventSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEvent diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterHomeTimeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterHomeTimeline.kt index 9f2ce4b0..c3eddf7b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterHomeTimeline.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterHomeTimeline.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers data class RegisterHomeTimeline( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt index 776c040c..465ab6b4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.domain.event.userdetail.UserDetailEvent diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterTimelineSetTimelineStoreSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterTimelineSetTimelineStoreSubscriber.kt index 05c92128..efe28d17 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterTimelineSetTimelineStoreSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterTimelineSetTimelineStoreSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.application.timeline.SetTimelineToTimelineStoreApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/Subscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/Subscriber.kt index 5c42bbe8..3a83c763 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/Subscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/Subscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers interface Subscriber { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/SubscriberRunner.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/SubscriberRunner.kt index 7a7caedf..a4f11f62 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/SubscriberRunner.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/SubscriberRunner.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import org.slf4j.LoggerFactory diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelinePostCreateSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelinePostCreateSubscriber.kt index 3252e2bc..c9e8155f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelinePostCreateSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelinePostCreateSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.application.timeline.AddPost diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipFollowSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipFollowSubscriber.kt index c58b1b0f..1f67dbc4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipFollowSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipFollowSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.application.exception.InternalServerException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt index 0fc5b665..31b73d71 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.application.timeline.RemoveTimelineRelationship diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt index 3caa2ec0..4afd6675 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.domainevent.subscribers import dev.usbharu.hideout.core.application.shared.AbstractApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/InternalServerException.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/InternalServerException.kt index 20db0f04..a4fab57e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/InternalServerException.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/InternalServerException.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.exception class InternalServerException : RuntimeException { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/PermissionDeniedException.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/PermissionDeniedException.kt index 613609ed..e59663be 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/PermissionDeniedException.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/exception/PermissionDeniedException.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.exception class PermissionDeniedException : RuntimeException { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt index dcd32818..dfaf121e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/instance/GetLocalInstanceApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.instance import dev.usbharu.hideout.core.application.exception.InternalServerException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt index fd3694b8..7cbdd246 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/ActorDetail.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.actor.Actor diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt index 1bea3157..f57470a9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Instance.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.instance.Instance diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt index 323b6b26..a6f6eaa7 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/MediaDetail.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.media.Media diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt index 5d6995f1..eb7bc3dc 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/PostDetail.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.actor.Actor diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Reactions.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Reactions.kt index 808f763a..91dfffc6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Reactions.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Reactions.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.emoji.CustomEmoji diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Timeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Timeline.kt index 8abc559a..66d5837f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Timeline.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/model/Timeline.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.model import dev.usbharu.hideout.core.domain.model.timeline.TimelineVisibility diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt index c6b29134..e8fbd317 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.post import dev.usbharu.hideout.core.application.exception.InternalServerException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt index a9affaad..5ced2c74 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.reaction import dev.usbharu.hideout.core.application.exception.PermissionDeniedException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt index 8f2281a8..fac8a8bc 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.reaction import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/LocalUserAbstractApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/LocalUserAbstractApplicationService.kt index bd8d26a3..1a91ebe1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/LocalUserAbstractApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/LocalUserAbstractApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.shared import dev.usbharu.hideout.core.application.exception.PermissionDeniedException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt index 68684900..7870fa46 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.model.PostDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt index 4c30354a..cd7676fc 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.model.PostDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt index a0a9e79b..7a783d1a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.AbstractApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt index 022133eb..beea89c6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.AbstractApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt index 4525511c..6fdac74c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.exception.PermissionDeniedException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt index b780e7e3..2451f26b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.model.Timeline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt index d35ea2a6..126255c4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.shared.LocalUserAbstractApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt index d3ef0d54..e229eb40 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.application.timeline import dev.usbharu.hideout.core.application.exception.PermissionDeniedException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/DefaultTimelineStoreConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/DefaultTimelineStoreConfig.kt index a6db6b29..bac2288a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/DefaultTimelineStoreConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/DefaultTimelineStoreConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.context.properties.ConfigurationProperties diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FFmpegVideoConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FFmpegVideoConfig.kt index 65e5f9be..80e2dacd 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FFmpegVideoConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FFmpegVideoConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.bytedeco.ffmpeg.global.avcodec diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FlywayConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FlywayConfig.kt index 15133cdb..5d5fd052 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FlywayConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/FlywayConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/ImageIOImageConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/ImageIOImageConfig.kt index 03e8bfcc..c3a3baf5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/ImageIOImageConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/ImageIOImageConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.context.properties.ConfigurationProperties diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/LocalStorageConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/LocalStorageConfig.kt index 48962c11..b38a0158 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/LocalStorageConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/LocalStorageConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/MessageSourceConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/MessageSourceConfig.kt index dcfecd4b..73e2311c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/MessageSourceConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/MessageSourceConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.autoconfigure.context.MessageSourceProperties diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/S3StorageConfig.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/S3StorageConfig.kt index 1a8b5677..8572e22d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/S3StorageConfig.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/config/S3StorageConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.config import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/reaction/ReactionEvent.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/reaction/ReactionEvent.kt index 6da7a58c..651b8497 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/reaction/ReactionEvent.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/reaction/ReactionEvent.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.event.reaction import dev.usbharu.hideout.core.domain.model.reaction.Reaction diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/timeline/TimelineEvent.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/timeline/TimelineEvent.kt index 76cc4554..b4f56789 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/timeline/TimelineEvent.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/timeline/TimelineEvent.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.event.timeline import dev.usbharu.hideout.core.domain.model.timeline.Timeline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/userdetail/UserDetailEvent.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/userdetail/UserDetailEvent.kt index dc9f4481..f6aefa4b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/userdetail/UserDetailEvent.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/event/userdetail/UserDetailEvent.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.event.userdetail import dev.usbharu.hideout.core.domain.model.userdetails.UserDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/Filter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/Filter.kt index 4267ddbe..43d18485 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/Filter.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/Filter.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter import dev.usbharu.hideout.core.domain.model.filter.Filter.Companion.Action.SET_KEYWORDS diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterAction.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterAction.kt index d19c8db8..d7df9789 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterAction.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterAction.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter enum class FilterAction { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterContext.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterContext.kt index df987e3d..d9541d46 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterContext.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterContext.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter enum class FilterContext { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterId.kt index a9ee5ce4..2174f62d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeyword.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeyword.kt index 6e5822fd..fb404f20 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeyword.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeyword.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter class FilterKeyword( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordId.kt index 4f1b2df5..4db4d581 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordKeyword.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordKeyword.kt index 89e959b3..032d8a4c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordKeyword.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterKeywordKeyword.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterMode.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterMode.kt index 57e38fb7..10a20ec5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterMode.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterMode.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter enum class FilterMode { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterName.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterName.kt index 2e517ceb..b88dbf71 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterName.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterName.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter class FilterName(name: String) { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterRepository.kt index 5c4d11ee..31b1cc40 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt index 478f05e5..7bd074c6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter class FilterResult(val filter: Filter, val matchedKeyword: String) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilteredPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilteredPost.kt index 80226401..5d75f380 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilteredPost.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilteredPost.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.filter import dev.usbharu.hideout.core.domain.model.post.Post diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimeline.kt index c5340618..463e4c32 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimeline.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimeline.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.followtimeline import dev.usbharu.hideout.core.domain.model.timeline.TimelineId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimelineRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimelineRepository.kt index 9c7bc104..92273f70 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimelineRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/followtimeline/FollowTimelineRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.followtimeline interface FollowTimelineRepository { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/Reaction.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/Reaction.kt index fc40bc05..75883567 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/Reaction.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/Reaction.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.reaction import dev.usbharu.hideout.core.domain.event.reaction.ReactionEvent diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionId.kt index 948fb1ea..d7730bff 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.reaction @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionRepository.kt index 508e2708..16dd2e8d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/reaction/ReactionRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.reaction import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/acct/Acct.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/acct/Acct.kt index 148e01ca..1926531a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/acct/Acct.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/acct/Acct.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.acct data class Acct( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/Page.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/Page.kt index 88ef63a5..a779b4ee 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/Page.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/Page.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.page sealed class Page { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/PaginationList.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/PaginationList.kt index 617ceecb..f7ff4560 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/PaginationList.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/page/PaginationList.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.page class PaginationList(list: List, val next: ID?, val prev: ID?) : List by list diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Anonymous.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Anonymous.kt index 56fbe4c5..015db749 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Anonymous.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Anonymous.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.principal import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/LocalUser.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/LocalUser.kt index a29abe6f..439dc4be 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/LocalUser.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/LocalUser.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.principal import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Principal.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Principal.kt index 1a0cf076..b1442350 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Principal.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/Principal.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.principal import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/PrincipalContextHolder.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/PrincipalContextHolder.kt index 1bf8f653..59b59b7a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/PrincipalContextHolder.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/principal/PrincipalContextHolder.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.principal interface PrincipalContextHolder { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/timelineobjectdetail/TimelineObjectDetail.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/timelineobjectdetail/TimelineObjectDetail.kt index 43b0fa9f..3c70eeaf 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/timelineobjectdetail/TimelineObjectDetail.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/support/timelineobjectdetail/TimelineObjectDetail.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.support.timelineobjectdetail import dev.usbharu.hideout.core.application.model.Reactions diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/Timeline.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/Timeline.kt index ca513707..7cdc5831 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/Timeline.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/Timeline.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timeline import dev.usbharu.hideout.core.domain.event.timeline.TimelineEvent diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineId.kt index c93738d8..0622a99c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timeline @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineName.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineName.kt index a8dd2f87..b953f661 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineName.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineName.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timeline @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineRepository.kt index 93770f32..69834305 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timeline import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineVisibility.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineVisibility.kt index 506dd3af..dc6f7ccb 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineVisibility.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timeline/TimelineVisibility.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timeline enum class TimelineVisibility { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt index f7f57f22..4d9737e2 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelineobject import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectId.kt index 95e24c40..9d77f4f3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelineobject @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectWarnFilter.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectWarnFilter.kt index bdd0764d..4441cc1b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectWarnFilter.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObjectWarnFilter.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelineobject import dev.usbharu.hideout.core.domain.model.filter.FilterId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationship.kt index 04bb6d25..125a7b40 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationship.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationship.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelinerelationship import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipId.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipId.kt index 5de526a7..ba995260 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipId.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipId.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelinerelationship @JvmInline diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipRepository.kt index 5fd8f176..acc8ac05 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelinerelationship/TimelineRelationshipRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.model.timelinerelationship import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/emoji/UnicodeEmojiService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/emoji/UnicodeEmojiService.kt index 35a44ca5..34a43117 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/emoji/UnicodeEmojiService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/emoji/UnicodeEmojiService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.service.emoji interface UnicodeEmojiService { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/filter/FilterDomainService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/filter/FilterDomainService.kt index 97ec2cfb..3e99e75c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/filter/FilterDomainService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/filter/FilterDomainService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.service.filter import dev.usbharu.hideout.core.domain.model.filter.Filter diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/post/DefaultPostReadAccessControl.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/post/DefaultPostReadAccessControl.kt index 0b82ee76..280bc9bb 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/post/DefaultPostReadAccessControl.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/service/post/DefaultPostReadAccessControl.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.service.post import dev.usbharu.hideout.core.domain.model.post.Post diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/domainevent/DomainEventPublisher.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/domainevent/DomainEventPublisher.kt index cf784458..1f0f21a1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/domainevent/DomainEventPublisher.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/domainevent/DomainEventPublisher.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.shared.domainevent interface DomainEventPublisher { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/repository/DomainEventPublishableRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/repository/DomainEventPublishableRepository.kt index 3b385984..42c7c228 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/repository/DomainEventPublishableRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/shared/repository/DomainEventPublishableRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.domain.shared.repository import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEventPublisher diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/DelegateMediaProcessor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/DelegateMediaProcessor.kt index 65cbc14d..fb1650b1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/DelegateMediaProcessor.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/DelegateMediaProcessor.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.media import dev.usbharu.hideout.core.domain.model.media.MimeType diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/FileTypeDeterminer.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/FileTypeDeterminer.kt index 83270bb6..d7edad0a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/FileTypeDeterminer.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/FileTypeDeterminer.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.media import dev.usbharu.hideout.core.domain.model.media.MimeType diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/TikaFileTypeDeterminer.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/TikaFileTypeDeterminer.kt index 393798b7..8fcb4f07 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/TikaFileTypeDeterminer.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/media/TikaFileTypeDeterminer.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.media import dev.usbharu.hideout.core.domain.model.media.FileType diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/mediastore/MediaStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/mediastore/MediaStore.kt index d2ee30d1..1390ce79 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/mediastore/MediaStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/mediastore/MediaStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.mediastore import java.net.URI diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/ReadTimelineOption.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/ReadTimelineOption.kt index 5cee660f..c0318fc4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/ReadTimelineOption.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/ReadTimelineOption.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.timeline data class ReadTimelineOption( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/TimelineStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/TimelineStore.kt index 23db5074..f5cfe519 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/TimelineStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/external/timeline/TimelineStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.external.timeline import dev.usbharu.hideout.core.domain.model.post.Post diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/awss3/AWSS3MediaStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/awss3/AWSS3MediaStore.kt index 47e30858..042a6a59 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/awss3/AWSS3MediaStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/awss3/AWSS3MediaStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.awss3 import dev.usbharu.hideout.core.config.S3StorageConfig diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/emojikt/EmojiKtUnicodeEmojiService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/emojikt/EmojiKtUnicodeEmojiService.kt index afa9c6b9..9e233739 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/emojikt/EmojiKtUnicodeEmojiService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/emojikt/EmojiKtUnicodeEmojiService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.emojikt import Emojis diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposed/UriColumnType.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposed/UriColumnType.kt index 06f2388b..f1c973e4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposed/UriColumnType.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposed/UriColumnType.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposed import org.jetbrains.exposed.sql.Column diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt index 2c48e636..4cec3b94 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedquery import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt index 4fa8cfed..fefac39b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedquery import dev.usbharu.hideout.core.application.model.Reactions diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index 1864586b..328a0480 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedquery import dev.usbharu.hideout.core.application.model.ActorDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt index 821d4f73..051c90cd 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedrepository import dev.usbharu.hideout.core.domain.model.actor.* diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt index 4f0fc2f7..0a1b6dd5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedrepository import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt index 1ab6986a..1cb55260 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedrepository import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt index 8f5f8c65..6b2d7446 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.exposedrepository import dev.usbharu.hideout.core.domain.model.timeline.* diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/localfilesystem/LocalFileSystemMediaStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/localfilesystem/LocalFileSystemMediaStore.kt index da95574a..5a47a520 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/localfilesystem/LocalFileSystemMediaStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/localfilesystem/LocalFileSystemMediaStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.localfilesystem import dev.usbharu.hideout.core.config.ApplicationConfig diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhash.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhash.kt index 6ee2893d..f75a10ec 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhash.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhash.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.media.common import java.awt.image.BufferedImage diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhashImpl.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhashImpl.kt index cb269364..fd43d87f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhashImpl.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/common/GenerateBlurhashImpl.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.media.common import io.trbl.blurhash.BlurHash diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/image/ImageIOImageProcessor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/image/ImageIOImageProcessor.kt index 89b0ae1e..98adaa05 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/image/ImageIOImageProcessor.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/image/ImageIOImageProcessor.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.media.image import dev.usbharu.hideout.core.application.exception.InternalServerException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/video/FFmpegVideoProcessor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/video/FFmpegVideoProcessor.kt index 9625c2c1..9cb58ec6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/video/FFmpegVideoProcessor.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/media/video/FFmpegVideoProcessor.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.media.video import dev.usbharu.hideout.core.config.FFmpegVideoConfig diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/mongorepository/MongoInternalTimelineObjectRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/mongorepository/MongoInternalTimelineObjectRepository.kt index c6dec873..41196755 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/mongorepository/MongoInternalTimelineObjectRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/mongorepository/MongoInternalTimelineObjectRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.mongorepository import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/ApplicationRequestLogInterceptor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/ApplicationRequestLogInterceptor.kt index 9f42749b..6af2139f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/ApplicationRequestLogInterceptor.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/ApplicationRequestLogInterceptor.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.springframework import dev.usbharu.hideout.core.infrastructure.springframework.oauth2.HideoutUserDetails diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SPAInterceptor.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SPAInterceptor.kt index b3d9a394..1928b4e9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SPAInterceptor.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SPAInterceptor.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.springframework import dev.usbharu.hideout.core.interfaces.web.common.OGP diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SpringSecurityFormLoginPrincipalContextHolder.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SpringSecurityFormLoginPrincipalContextHolder.kt index a2b466c1..a2beef2b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SpringSecurityFormLoginPrincipalContextHolder.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/SpringSecurityFormLoginPrincipalContextHolder.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.springframework import dev.usbharu.hideout.core.application.shared.Transaction diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/domainevent/SpringFrameworkDomainEventSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/domainevent/SpringFrameworkDomainEventSubscriber.kt index 4230303a..04471796 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/domainevent/SpringFrameworkDomainEventSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/domainevent/SpringFrameworkDomainEventSubscriber.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.springframework.domainevent import dev.usbharu.hideout.core.application.domainevent.subscribers.DomainEventConsumer diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/oauth2/SpringSecurityOauth2PrincipalContextHolder.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/oauth2/SpringSecurityOauth2PrincipalContextHolder.kt index eefb47b1..f3f0e049 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/oauth2/SpringSecurityOauth2PrincipalContextHolder.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/springframework/oauth2/SpringSecurityOauth2PrincipalContextHolder.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.springframework.oauth2 import dev.usbharu.hideout.core.application.shared.Transaction diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt index b22d0121..7cf5b91e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.timeline import dev.usbharu.hideout.core.application.model.Reactions diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/DefaultTimelineStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/DefaultTimelineStore.kt index e25751cd..b9e646f6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/DefaultTimelineStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/DefaultTimelineStore.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.timeline import dev.usbharu.hideout.core.application.model.Reactions diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/InternalTimelineObjectRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/InternalTimelineObjectRepository.kt index c0cf4ac6..cc191748 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/InternalTimelineObjectRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/InternalTimelineObjectRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.infrastructure.timeline import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/IndexController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/IndexController.kt index 6f181ce4..62c86043 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/IndexController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/IndexController.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web import dev.usbharu.hideout.core.application.instance.GetLocalInstanceApplicationService diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/auth/SignUpForm.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/auth/SignUpForm.kt index 320187d8..0deccbd6 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/auth/SignUpForm.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/auth/SignUpForm.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.auth data class SignUpForm( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/common/OGP.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/common/OGP.kt index e3206294..83539f45 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/common/OGP.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/common/OGP.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.common data class OGP( diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PostsController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PostsController.kt index f1005327..09245b2f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PostsController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PostsController.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.posts import dev.usbharu.hideout.core.application.exception.PermissionDeniedException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishController.kt index a3313ba2..a41798e4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishController.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.posts import dev.usbharu.hideout.core.application.actor.GetUserDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishPost.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishPost.kt index 5da5aa30..061fa1e1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishPost.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/posts/PublishPost.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.posts @Suppress("ConstructorParameterNaming") diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/timeline/TimelineController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/timeline/TimelineController.kt index c80b999b..776fe2df 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/timeline/TimelineController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/timeline/TimelineController.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.timeline import dev.usbharu.hideout.core.application.exception.InternalServerException diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt index 81072023..bdcba22f 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.interfaces.web.user import dev.usbharu.hideout.core.application.actor.GetActorDetail diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalDTO.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalDTO.kt index 4861b80a..97feae23 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalDTO.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalDTO.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.query.principal import dev.usbharu.hideout.core.domain.model.actor.ActorId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalQueryService.kt index 49a0fc1d..a31fa41c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/principal/PrincipalQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.query.principal import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/reactions/ReactionsQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/reactions/ReactionsQueryService.kt index e410c4ae..25decd7b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/reactions/ReactionsQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/reactions/ReactionsQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.query.reactions import dev.usbharu.hideout.core.application.model.Reactions diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt index ca5eb505..e4b35461 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/query/usertimeline/UserTimelineQueryService.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dev.usbharu.hideout.core.query.usertimeline import dev.usbharu.hideout.core.application.model.PostDetail diff --git a/hideout-core/src/main/resources/application.yml b/hideout-core/src/main/resources/application.yml index 3c3df36d..18ef2dd8 100644 --- a/hideout-core/src/main/resources/application.yml +++ b/hideout-core/src/main/resources/application.yml @@ -1,4 +1,4 @@ -#file: noinspection SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection +#file: noinspection SpellCheckingInspection hideout: url: "https://test-hideout-dev.usbharu.dev" private: true diff --git a/hideout-core/src/main/resources/db/migration/V1__Init_DB.sql b/hideout-core/src/main/resources/db/migration/V1__Init_DB.sql index f4c62702..3c6cce85 100644 --- a/hideout-core/src/main/resources/db/migration/V1__Init_DB.sql +++ b/hideout-core/src/main/resources/db/migration/V1__Init_DB.sql @@ -1,3 +1,35 @@ +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Copyright (C) 2024 usbharu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + create table if not exists emojis ( id bigint primary key, diff --git a/hideout-core/src/main/resources/logback-spring.xml b/hideout-core/src/main/resources/logback-spring.xml index dfb52736..c935da07 100644 --- a/hideout-core/src/main/resources/logback-spring.xml +++ b/hideout-core/src/main/resources/logback-spring.xml @@ -1,4 +1,20 @@ + + diff --git a/hideout-core/src/main/resources/messages/hideout-web-messages.properties b/hideout-core/src/main/resources/messages/hideout-web-messages.properties index d2c0de78..a7c2d794 100644 --- a/hideout-core/src/main/resources/messages/hideout-web-messages.properties +++ b/hideout-core/src/main/resources/messages/hideout-web-messages.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) 2024 usbharu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + auth-signIn.title=\u30ED\u30B0\u30A4\u30F3 - {0} auth-signUp.password=\u30D1\u30B9\u30EF\u30FC\u30C9 auth-signUp.register=\u767B\u9332\u3059\u308B diff --git a/hideout-core/src/main/resources/messages/hideout-web-messages_en_US.properties b/hideout-core/src/main/resources/messages/hideout-web-messages_en_US.properties index e19ac2b5..fe124f2f 100644 --- a/hideout-core/src/main/resources/messages/hideout-web-messages_en_US.properties +++ b/hideout-core/src/main/resources/messages/hideout-web-messages_en_US.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) 2024 usbharu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + auth-signIn.title=Sign in - {0} auth-signUp.password=Password auth-signUp.register=Register Account diff --git a/hideout-core/src/main/resources/messages/hideout-web-messages_ja_JP.properties b/hideout-core/src/main/resources/messages/hideout-web-messages_ja_JP.properties index d2c0de78..a7c2d794 100644 --- a/hideout-core/src/main/resources/messages/hideout-web-messages_ja_JP.properties +++ b/hideout-core/src/main/resources/messages/hideout-web-messages_ja_JP.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) 2024 usbharu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + auth-signIn.title=\u30ED\u30B0\u30A4\u30F3 - {0} auth-signUp.password=\u30D1\u30B9\u30EF\u30FC\u30C9 auth-signUp.register=\u767B\u9332\u3059\u308B diff --git a/hideout-core/src/main/resources/templates/fragments-actor.html b/hideout-core/src/main/resources/templates/fragments-actor.html index 566549bd..c6492d55 100644 --- a/hideout-core/src/main/resources/templates/fragments-actor.html +++ b/hideout-core/src/main/resources/templates/fragments-actor.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/fragments-post.html b/hideout-core/src/main/resources/templates/fragments-post.html index e094c18a..177051b0 100644 --- a/hideout-core/src/main/resources/templates/fragments-post.html +++ b/hideout-core/src/main/resources/templates/fragments-post.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/fragments-timeline.html b/hideout-core/src/main/resources/templates/fragments-timeline.html index 9d89d30b..3e3496c9 100644 --- a/hideout-core/src/main/resources/templates/fragments-timeline.html +++ b/hideout-core/src/main/resources/templates/fragments-timeline.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/homeTimeline.html b/hideout-core/src/main/resources/templates/homeTimeline.html index c1f982ac..f03cd62c 100644 --- a/hideout-core/src/main/resources/templates/homeTimeline.html +++ b/hideout-core/src/main/resources/templates/homeTimeline.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/index.html b/hideout-core/src/main/resources/templates/index.html index f739ba1a..c7dc5545 100644 --- a/hideout-core/src/main/resources/templates/index.html +++ b/hideout-core/src/main/resources/templates/index.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/layout.html b/hideout-core/src/main/resources/templates/layout.html index c0f4c0b4..dd6052b0 100644 --- a/hideout-core/src/main/resources/templates/layout.html +++ b/hideout-core/src/main/resources/templates/layout.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/post-postForm.html b/hideout-core/src/main/resources/templates/post-postForm.html index 1142d823..656179ee 100644 --- a/hideout-core/src/main/resources/templates/post-postForm.html +++ b/hideout-core/src/main/resources/templates/post-postForm.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/postById.html b/hideout-core/src/main/resources/templates/postById.html index 7f1a3c3d..2c41b69e 100644 --- a/hideout-core/src/main/resources/templates/postById.html +++ b/hideout-core/src/main/resources/templates/postById.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/sign_in.html b/hideout-core/src/main/resources/templates/sign_in.html index bf8d29c4..18381cd2 100644 --- a/hideout-core/src/main/resources/templates/sign_in.html +++ b/hideout-core/src/main/resources/templates/sign_in.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/sign_out.html b/hideout-core/src/main/resources/templates/sign_out.html index 9daf6994..3c643a0b 100644 --- a/hideout-core/src/main/resources/templates/sign_out.html +++ b/hideout-core/src/main/resources/templates/sign_out.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/sign_up.html b/hideout-core/src/main/resources/templates/sign_up.html index 52d7abdd..479e6ad6 100644 --- a/hideout-core/src/main/resources/templates/sign_up.html +++ b/hideout-core/src/main/resources/templates/sign_up.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/top.html b/hideout-core/src/main/resources/templates/top.html index 94dd75fc..8cf18497 100644 --- a/hideout-core/src/main/resources/templates/top.html +++ b/hideout-core/src/main/resources/templates/top.html @@ -1,3 +1,19 @@ + + diff --git a/hideout-core/src/main/resources/templates/userById.html b/hideout-core/src/main/resources/templates/userById.html index cf45d55f..7efd6866 100644 --- a/hideout-core/src/main/resources/templates/userById.html +++ b/hideout-core/src/main/resources/templates/userById.html @@ -1,3 +1,19 @@ + + From a1cef4657e325ced5059d862aad444109fc1ddf6 Mon Sep 17 00:00:00 2001 From: usbharu Date: Sat, 14 Sep 2024 13:26:21 +0000 Subject: [PATCH 06/11] style: fix lint (CI) --- .../application/actor/GetActorDetailApplicationService.kt | 2 +- .../application/actor/GetUserDetailApplicationService.kt | 2 +- .../actor/MigrationLocalActorApplicationService.kt | 2 +- .../actor/RegisterLocalActorApplicationService.kt | 2 +- .../actor/StartDeleteLocalActorApplicationService.kt | 2 +- .../actor/SuspendLocalActorApplicationService.kt | 2 +- .../actor/UnsuspendLocalActorApplicationService.kt | 2 +- .../application/RegisterApplicationApplicationService.kt | 2 +- .../filter/UserDeleteFilterApplicationService.kt | 2 +- .../application/filter/UserGetFilterApplicationService.kt | 2 +- .../filter/UserRegisterFilterApplicationService.kt | 2 +- .../application/media/UploadMediaApplicationService.kt | 2 +- .../application/post/DeleteLocalPostApplicationService.kt | 2 +- .../application/post/GetPostDetailApplicationService.kt | 2 +- .../post/RegisterLocalPostApplicationService.kt | 2 +- .../application/post/UpdateLocalNoteApplicationService.kt | 2 +- .../reaction/UserCreateReactionApplicationService.kt | 2 +- .../reaction/UserRemoveReactionApplicationService.kt | 2 +- .../relationship/GetRelationshipApplicationService.kt | 2 +- .../UserAcceptFollowRequestApplicationService.kt | 2 +- .../relationship/UserBlockApplicationService.kt | 2 +- .../relationship/UserFollowRequestApplicationService.kt | 2 +- .../relationship/UserMuteApplicationService.kt | 2 +- .../UserRejectFollowRequestApplicationService.kt | 2 +- .../UserRemoveFromFollowersApplicationService.kt | 2 +- .../relationship/UserUnblockApplicationService.kt | 2 +- .../relationship/UserUnfollowApplicationService.kt | 2 +- .../relationship/UserUnmuteApplicationService.kt | 2 +- .../timeline/GetUserTimelineApplicationService.kt | 2 +- .../timeline/ReadTimelineApplicationService.kt | 2 +- .../SetTimelineToTimelineStoreApplicationService.kt | 2 +- .../timeline/TimelineAddPostApplicationService.kt | 2 +- .../UserAddTimelineRelationshipApplicationService.kt | 2 +- .../timeline/UserGetTimelinesApplicationService.kt | 2 +- .../timeline/UserRegisterTimelineApplicationService.kt | 2 +- .../UserRemoveTimelineRelationshipApplicationService.kt | 2 +- .../exposedquery/ExposedUserTimelineQueryService.kt | 8 ++++---- 37 files changed, 40 insertions(+), 40 deletions(-) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt index 5fe212a8..5bcf059b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetActorDetailApplicationService.kt @@ -69,4 +69,4 @@ class GetActorDetailApplicationService( data class GetActorDetail( val actorName: Acct? = null, val id: Long? = null -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt index 29b7f20c..23da420c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/GetUserDetailApplicationService.kt @@ -52,4 +52,4 @@ class GetUserDetailApplicationService( } } -data class GetUserDetail(val id: Long) \ No newline at end of file +data class GetUserDetail(val id: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt index fb28172d..18ffeb73 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/MigrationLocalActorApplicationService.kt @@ -75,4 +75,4 @@ class MigrationLocalActorApplicationService( } } -data class MigrationLocalActor(val from: Long, val to: Long) \ No newline at end of file +data class MigrationLocalActor(val from: Long, val to: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt index 27a7e23c..27f2eae0 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/RegisterLocalActorApplicationService.kt @@ -80,4 +80,4 @@ class RegisterLocalActorApplicationService( data class RegisterLocalActor( val name: String, val password: String, -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt index 3d6b5761..1ab250c3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/StartDeleteLocalActorApplicationService.kt @@ -46,4 +46,4 @@ class StartDeleteLocalActorApplicationService( } } -data class DeleteLocalActor(val actorId: ActorId) \ No newline at end of file +data class DeleteLocalActor(val actorId: ActorId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt index ad678767..0a8b7ab8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/SuspendLocalActorApplicationService.kt @@ -43,4 +43,4 @@ class SuspendLocalActorApplicationService( } } -data class SuspendLocalActor(val actorId: Long) \ No newline at end of file +data class SuspendLocalActor(val actorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt index e0024181..b27cd3eb 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/actor/UnsuspendLocalActorApplicationService.kt @@ -43,4 +43,4 @@ class UnsuspendLocalActorApplicationService( } } -data class UnsuspendLocalActor(val actorId: Long) \ No newline at end of file +data class UnsuspendLocalActor(val actorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt index 47a2de93..10a50ca1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/application/RegisterApplicationApplicationService.kt @@ -108,4 +108,4 @@ data class RegisterApplication( val redirectUris: Set, val useRefreshToken: Boolean, val scopes: Set, -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt index ab63ba14..f500528b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserDeleteFilterApplicationService.kt @@ -45,4 +45,4 @@ class UserDeleteFilterApplicationService(private val filterRepository: FilterRep } } -data class DeleteFilter(val filterId: Long) \ No newline at end of file +data class DeleteFilter(val filterId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt index 1bb16d64..e97209fc 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserGetFilterApplicationService.kt @@ -46,4 +46,4 @@ class UserGetFilterApplicationService(private val filterRepository: FilterReposi } } -data class GetFilter(val filterId: Long) \ No newline at end of file +data class GetFilter(val filterId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt index 4ff24099..4427e484 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/filter/UserRegisterFilterApplicationService.kt @@ -72,4 +72,4 @@ data class RegisterFilter( data class RegisterFilterKeyword( val keyword: String, val filterMode: FilterMode, -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt index adad1fb5..257a12fd 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/media/UploadMediaApplicationService.kt @@ -80,4 +80,4 @@ data class UploadMedia( val name: String, val remoteUri: URI?, val description: String? -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt index 4531ba50..140fa38c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/DeleteLocalPostApplicationService.kt @@ -51,4 +51,4 @@ class DeleteLocalPostApplicationService( } } -data class DeleteLocalPost(val postId: Long) \ No newline at end of file +data class DeleteLocalPost(val postId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt index e8fbd317..9fa9ff75 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/GetPostDetailApplicationService.kt @@ -115,4 +115,4 @@ class GetPostDetailApplicationService( } } -data class GetPostDetail(val postId: Long) \ No newline at end of file +data class GetPostDetail(val postId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt index 35468ab0..bf1f1af9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/RegisterLocalPostApplicationService.kt @@ -74,4 +74,4 @@ data class RegisterLocalPost( val replyId: Long?, val sensitive: Boolean, val mediaIds: List, -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt index 480d71c5..2c320563 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/post/UpdateLocalNoteApplicationService.kt @@ -71,4 +71,4 @@ data class UpdateLocalNote( val content: String, val sensitive: Boolean, val mediaIds: List -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt index 5ced2c74..d5e450a3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserCreateReactionApplicationService.kt @@ -80,4 +80,4 @@ class UserCreateReactionApplicationService( } } -data class CreateReaction(val postId: Long, val customEmojiId: Long?, val unicodeEmoji: String) \ No newline at end of file +data class CreateReaction(val postId: Long, val customEmojiId: Long?, val unicodeEmoji: String) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt index fac8a8bc..8337eb47 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/reaction/UserRemoveReactionApplicationService.kt @@ -70,4 +70,4 @@ data class RemoveReaction( val postId: Long, val customEmojiId: Long?, val unicodeEmoji: String -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt index 995a1562..95531df1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/GetRelationshipApplicationService.kt @@ -71,4 +71,4 @@ class GetRelationshipApplicationService( } } -data class GetRelationship(val targetActorId: Long) \ No newline at end of file +data class GetRelationship(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt index 6e4eac2b..771e4722 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserAcceptFollowRequestApplicationService.kt @@ -52,4 +52,4 @@ class UserAcceptFollowRequestApplicationService( } } -data class AcceptFollowRequest(val sourceActorId: Long) \ No newline at end of file +data class AcceptFollowRequest(val sourceActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt index 2d65a838..219dafab 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserBlockApplicationService.kt @@ -62,4 +62,4 @@ class UserBlockApplicationService( } } -data class Block(val targetActorId: Long) \ No newline at end of file +data class Block(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt index ca0a4bf3..0e31b34b 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserFollowRequestApplicationService.kt @@ -57,4 +57,4 @@ class UserFollowRequestApplicationService( } } -data class FollowRequest(val targetActorId: Long) \ No newline at end of file +data class FollowRequest(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt index 2d23259e..b3420662 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserMuteApplicationService.kt @@ -54,4 +54,4 @@ class UserMuteApplicationService( } } -data class Mute(val targetActorId: Long) \ No newline at end of file +data class Mute(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt index 0046466e..4f385de4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRejectFollowRequestApplicationService.kt @@ -52,4 +52,4 @@ class UserRejectFollowRequestApplicationService( } } -data class RejectFollowRequest(val sourceActorId: Long) \ No newline at end of file +data class RejectFollowRequest(val sourceActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt index 55461180..ea8dd677 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserRemoveFromFollowersApplicationService.kt @@ -54,4 +54,4 @@ class UserRemoveFromFollowersApplicationService( } } -data class RemoveFromFollowers(val targetActorId: Long) \ No newline at end of file +data class RemoveFromFollowers(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt index ba1366f9..60ac97c9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnblockApplicationService.kt @@ -54,4 +54,4 @@ class UserUnblockApplicationService( } } -data class Unblock(val targetActorId: Long) \ No newline at end of file +data class Unblock(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt index 842dbefc..51fd1085 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnfollowApplicationService.kt @@ -54,4 +54,4 @@ class UserUnfollowApplicationService( } } -data class Unfollow(val targetActorId: Long) \ No newline at end of file +data class Unfollow(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt index 9507dad6..41438c86 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/relationship/UserUnmuteApplicationService.kt @@ -54,4 +54,4 @@ class UserUnmuteApplicationService( } } -data class Unmute(val targetActorId: Long) \ No newline at end of file +data class Unmute(val targetActorId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt index 7870fa46..6e94b7e1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/GetUserTimelineApplicationService.kt @@ -69,4 +69,4 @@ class GetUserTimelineApplicationService( } } -data class GetUserTimeline(val id: Long, val page: Page) \ No newline at end of file +data class GetUserTimeline(val id: Long, val page: Page) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt index cd7676fc..4ba3e2a1 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/ReadTimelineApplicationService.kt @@ -112,4 +112,4 @@ data class ReadTimeline( val localOnly: Boolean, val remoteOnly: Boolean, val page: Page -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt index 7a783d1a..3d05fe7e 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/SetTimelineToTimelineStoreApplicationService.kt @@ -46,4 +46,4 @@ class SetTimelineToTimelineStoreApplicationService( } } -data class SetTimleineStore(val timelineId: TimelineId) \ No newline at end of file +data class SetTimleineStore(val timelineId: TimelineId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt index beea89c6..f1f1c33c 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/TimelineAddPostApplicationService.kt @@ -45,4 +45,4 @@ class TimelineAddPostApplicationService( } } -data class AddPost(val postId: PostId) \ No newline at end of file +data class AddPost(val postId: PostId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt index 6fdac74c..fe6260cb 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserAddTimelineRelationshipApplicationService.kt @@ -69,4 +69,4 @@ data class AddTimelineRelationship( val timelineId: TimelineId, val actorId: ActorId, val visible: Visible -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt index 2451f26b..edb519d0 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt @@ -52,4 +52,4 @@ class UserGetTimelinesApplicationService(transaction: Transaction, private val t } } -data class GetTimelines(val userDetailId: Long) \ No newline at end of file +data class GetTimelines(val userDetailId: Long) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt index 126255c4..eb7c5e83 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterTimelineApplicationService.kt @@ -52,4 +52,4 @@ class UserRegisterTimelineApplicationService( data class RegisterTimeline( val timelineName: String, val visibility: TimelineVisibility -) \ No newline at end of file +) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt index e229eb40..d7c22d65 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt @@ -60,4 +60,4 @@ class UserRemoveTimelineRelationshipApplicationService( } } -data class RemoveTimelineRelationship(val timelineRelationshipId: TimelineRelationshipId) \ No newline at end of file +data class RemoveTimelineRelationship(val timelineRelationshipId: TimelineRelationshipId) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index 328a0480..aa161bf4 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -58,10 +58,10 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi .select(Posts.columns) .where { Posts.visibility eq Visibility.PUBLIC.name or - (Posts.visibility eq Visibility.UNLISTED.name) or - (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or - (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or - (Posts.actorId eq principal.actorId.id) + (Posts.visibility eq Visibility.UNLISTED.name) or + (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or + (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or + (Posts.actorId eq principal.actorId.id) } .alias("authorized_table") } From bc02913e55431fed613a2ccb06c1cce8b3becdb8 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 15 Sep 2024 11:17:48 +0900 Subject: [PATCH 07/11] =?UTF-8?q?refactor:=20=E3=82=AF=E3=83=A9=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=8C?= =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt | 1 + .../UserRegisterHomeTimelineApplicationService.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) rename hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/{domainevent/subscribers => timeline}/UserRegisterHomeTimelineApplicationService.kt (95%) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt index 465ab6b4..4c9ff93a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/RegisterLocalUserSetHomeTimelineSubscriber.kt @@ -16,6 +16,7 @@ package dev.usbharu.hideout.core.application.domainevent.subscribers +import dev.usbharu.hideout.core.application.timeline.UserRegisterHomeTimelineApplicationService import dev.usbharu.hideout.core.domain.event.userdetail.UserDetailEvent import dev.usbharu.hideout.core.domain.event.userdetail.UserDetailEventBody import dev.usbharu.hideout.core.domain.model.support.principal.Anonymous diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterHomeTimelineApplicationService.kt similarity index 95% rename from hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt rename to hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterHomeTimelineApplicationService.kt index 4afd6675..3c1c47d5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/UserRegisterHomeTimelineApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRegisterHomeTimelineApplicationService.kt @@ -14,8 +14,9 @@ * limitations under the License. */ -package dev.usbharu.hideout.core.application.domainevent.subscribers +package dev.usbharu.hideout.core.application.timeline +import dev.usbharu.hideout.core.application.domainevent.subscribers.RegisterHomeTimeline import dev.usbharu.hideout.core.application.shared.AbstractApplicationService import dev.usbharu.hideout.core.application.shared.Transaction import dev.usbharu.hideout.core.domain.model.support.principal.Principal From 56a4e94e417afa2a3af945e8bbd866cea5bb5d64 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 15 Sep 2024 11:29:14 +0900 Subject: [PATCH 08/11] =?UTF-8?q?refactor:=20AbstractRepository=E3=82=92?= =?UTF-8?q?=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exposedquery/ExposedPrincipalQueryService.kt | 4 +--- .../exposedquery/ExposedReactionsQueryService.kt | 5 +---- .../ExposedUserTimelineQueryService.kt | 15 +++++---------- .../exposedrepository/AbstractRepository.kt | 3 +-- .../ExposedActorInstanceRelationshipRepository.kt | 5 +---- .../exposedrepository/ExposedActorRepository.kt | 5 +---- .../ExposedApplicationRepository.kt | 5 +---- .../ExposedCustomEmojiRepository.kt | 5 +---- .../exposedrepository/ExposedFilterRepository.kt | 5 +---- .../ExposedInstanceRepository.kt | 5 +---- .../exposedrepository/ExposedMediaRepository.kt | 5 +---- .../exposedrepository/ExposedPostRepository.kt | 4 +--- .../ExposedReactionRepository.kt | 6 +----- .../ExposedRelationshipRepository.kt | 5 +---- .../ExposedTimelineRelationshipRepository.kt | 5 +---- .../ExposedTimelineRepository.kt | 5 +---- .../ExposedUserDetailRepository.kt | 5 +---- 17 files changed, 21 insertions(+), 71 deletions(-) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt index 4cec3b94..d02ce503 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedPrincipalQueryService.kt @@ -29,9 +29,7 @@ import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository -class ExposedPrincipalQueryService : PrincipalQueryService, AbstractRepository() { - override val logger: Logger - get() = Companion.logger +class ExposedPrincipalQueryService : PrincipalQueryService, AbstractRepository(logger) { override suspend fun findByUserDetailId(userDetailId: UserDetailId): PrincipalDTO { return query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt index fefac39b..a03d1df9 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedReactionsQueryService.kt @@ -25,16 +25,13 @@ import dev.usbharu.hideout.core.infrastructure.exposedrepository.toCustomEmojiOr import dev.usbharu.hideout.core.infrastructure.exposedrepository.toReaction import dev.usbharu.hideout.core.query.reactions.ReactionsQueryService import org.jetbrains.exposed.sql.* -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository import java.net.URI import dev.usbharu.hideout.core.infrastructure.exposedrepository.Reactions as ExposedrepositoryReactions @Repository -class ExposedReactionsQueryService : ReactionsQueryService, AbstractRepository() { - override val logger: Logger - get() = Companion.logger +class ExposedReactionsQueryService : ReactionsQueryService, AbstractRepository(logger) { override suspend fun findAllByPostId(postId: PostId): List { return query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index aa161bf4..fc2410e3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -25,17 +25,12 @@ import dev.usbharu.hideout.core.domain.model.support.principal.Principal import dev.usbharu.hideout.core.infrastructure.exposedrepository.* import dev.usbharu.hideout.core.query.usertimeline.UserTimelineQueryService import org.jetbrains.exposed.sql.* -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository import java.net.URI @Repository -class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractRepository() { - - override val logger: Logger - get() = Companion.logger - +class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractRepository(logger) { protected fun authorizedQuery(principal: Principal? = null): QueryAlias { if (principal == null) { return Posts @@ -58,10 +53,10 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi .select(Posts.columns) .where { Posts.visibility eq Visibility.PUBLIC.name or - (Posts.visibility eq Visibility.UNLISTED.name) or - (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or - (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or - (Posts.actorId eq principal.actorId.id) + (Posts.visibility eq Visibility.UNLISTED.name) or + (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or + (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or + (Posts.actorId eq principal.actorId.id) } .alias("authorized_table") } diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/AbstractRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/AbstractRepository.kt index 6a746eea..9b04ca18 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/AbstractRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/AbstractRepository.kt @@ -28,8 +28,7 @@ import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator import java.sql.SQLException @Suppress("VarCouldBeVal") -abstract class AbstractRepository { - protected abstract val logger: Logger +abstract class AbstractRepository(protected val logger: Logger) { private val sqlErrorCodeSQLExceptionTranslator = SQLErrorCodeSQLExceptionTranslator() private val springDataAccessExceptionSQLExceptionTranslator = SpringDataAccessExceptionSQLExceptionTranslator() diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorInstanceRelationshipRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorInstanceRelationshipRepository.kt index 74c71f07..967fcc02 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorInstanceRelationshipRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorInstanceRelationshipRepository.kt @@ -24,17 +24,14 @@ import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEventPublisher import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableRepository import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedActorInstanceRelationshipRepository(override val domainEventPublisher: DomainEventPublisher) : ActorInstanceRelationshipRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger - get() = Companion.logger override suspend fun save(actorInstanceRelationship: ActorInstanceRelationship): ActorInstanceRelationship { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt index 051c90cd..e2bfe315 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt @@ -25,7 +25,6 @@ import dev.usbharu.hideout.core.infrastructure.exposed.uri import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @@ -33,11 +32,9 @@ import org.springframework.stereotype.Repository class ExposedActorRepository( private val actorQueryMapper: QueryMapper, override val domainEventPublisher: DomainEventPublisher, -) : AbstractRepository(), +) : AbstractRepository(logger), DomainEventPublishableRepository, ActorRepository { - override val logger: Logger - get() = Companion.logger override suspend fun save(actor: Actor): Actor { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedApplicationRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedApplicationRepository.kt index 42d5c460..7cc57f20 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedApplicationRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedApplicationRepository.kt @@ -22,14 +22,11 @@ import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.deleteWhere import org.jetbrains.exposed.sql.upsert -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository -class ExposedApplicationRepository : ApplicationRepository, AbstractRepository() { - override val logger: Logger - get() = Companion.logger +class ExposedApplicationRepository : ApplicationRepository, AbstractRepository(logger) { override suspend fun save(application: Application) = query { Applications.upsert { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedCustomEmojiRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedCustomEmojiRepository.kt index 7f1a0b50..63e5312a 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedCustomEmojiRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedCustomEmojiRepository.kt @@ -25,15 +25,12 @@ import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.CurrentTimestamp import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository import java.net.URI @Repository -class ExposedCustomEmojiRepository : CustomEmojiRepository, AbstractRepository() { - override val logger: Logger - get() = Companion.logger +class ExposedCustomEmojiRepository : CustomEmojiRepository, AbstractRepository(logger) { override suspend fun save(customEmoji: CustomEmoji): CustomEmoji = query { CustomEmojis.upsert { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedFilterRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedFilterRepository.kt index 837ccee9..208ef9d3 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedFilterRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedFilterRepository.kt @@ -24,15 +24,12 @@ import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId import dev.usbharu.hideout.core.infrastructure.exposed.QueryMapper import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedFilterRepository(private val filterQueryMapper: QueryMapper) : FilterRepository, - AbstractRepository() { - override val logger: Logger - get() = Companion.logger + AbstractRepository(logger) { override suspend fun save(filter: Filter): Filter = query { Filters.upsert { upsertStatement -> diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedInstanceRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedInstanceRepository.kt index 1f4e35f4..9c085c42 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedInstanceRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedInstanceRepository.kt @@ -21,7 +21,6 @@ import dev.usbharu.hideout.core.infrastructure.exposed.uri import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository import java.net.URI @@ -29,9 +28,7 @@ import dev.usbharu.hideout.core.domain.model.instance.Instance as InstanceEntity @Repository class ExposedInstanceRepository : InstanceRepository, - AbstractRepository() { - override val logger: Logger - get() = Companion.logger + AbstractRepository(logger) { override suspend fun save(instance: InstanceEntity): InstanceEntity = query { Instance.upsert { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedMediaRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedMediaRepository.kt index 03502b72..b16005f5 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedMediaRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedMediaRepository.kt @@ -21,15 +21,12 @@ import dev.usbharu.hideout.core.domain.model.media.* import dev.usbharu.hideout.core.infrastructure.exposed.uri import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository import dev.usbharu.hideout.core.domain.model.media.Media as EntityMedia @Repository -class ExposedMediaRepository : MediaRepository, AbstractRepository() { - override val logger: Logger - get() = Companion.logger +class ExposedMediaRepository : MediaRepository, AbstractRepository(logger) { override suspend fun save(media: EntityMedia): EntityMedia = query { Media.upsert { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt index 7bbe3782..a65b6155 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt @@ -43,7 +43,6 @@ import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.inList import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @@ -53,9 +52,8 @@ class ExposedPostRepository( override val domainEventPublisher: DomainEventPublisher, ) : PostRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger = Companion.logger override suspend fun save(post: Post): Post { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt index 0a1b6dd5..9bbe45f2 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedReactionRepository.kt @@ -28,19 +28,15 @@ import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableR import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedReactionRepository(override val domainEventPublisher: DomainEventPublisher) : ReactionRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger - get() = Companion.logger - override suspend fun save(reaction: Reaction): Reaction { return query { Reactions.upsert { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedRelationshipRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedRelationshipRepository.kt index b4827a4f..7c91af8d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedRelationshipRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedRelationshipRepository.kt @@ -23,17 +23,14 @@ import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEventPublisher import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableRepository import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedRelationshipRepository(override val domainEventPublisher: DomainEventPublisher) : RelationshipRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger - get() = Companion.logger override suspend fun save(relationship: Relationship): Relationship { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt index 1cb55260..745a5405 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRelationshipRepository.kt @@ -24,14 +24,11 @@ import dev.usbharu.hideout.core.domain.model.timelinerelationship.TimelineRelati import dev.usbharu.hideout.core.domain.model.timelinerelationship.Visible import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository -class ExposedTimelineRelationshipRepository : AbstractRepository(), TimelineRelationshipRepository { - override val logger: Logger - get() = Companion.logger +class ExposedTimelineRelationshipRepository : AbstractRepository(logger), TimelineRelationshipRepository { override suspend fun save(timelineRelationship: TimelineRelationship): TimelineRelationship { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt index 6b2d7446..e6f447fe 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt @@ -22,17 +22,14 @@ import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEventPublisher import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableRepository import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedTimelineRepository(override val domainEventPublisher: DomainEventPublisher) : TimelineRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger - get() = Companion.logger override suspend fun save(timeline: Timeline): Timeline { query { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedUserDetailRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedUserDetailRepository.kt index cacaa922..e1fbff07 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedUserDetailRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedUserDetailRepository.kt @@ -27,17 +27,14 @@ import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableR import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.timestamp -import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.stereotype.Repository @Repository class ExposedUserDetailRepository(override val domainEventPublisher: DomainEventPublisher) : UserDetailRepository, - AbstractRepository(), + AbstractRepository(logger), DomainEventPublishableRepository { - override val logger: Logger - get() = Companion.logger override suspend fun save(userDetail: UserDetail): UserDetail = query { UserDetails.upsert { From 75a59d739301643c769587a1dff902296cf91131 Mon Sep 17 00:00:00 2001 From: usbharu Date: Sun, 15 Sep 2024 02:32:35 +0000 Subject: [PATCH 09/11] style: fix lint (CI) --- .../exposedquery/ExposedUserTimelineQueryService.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt index fc2410e3..bc4c291d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedquery/ExposedUserTimelineQueryService.kt @@ -53,10 +53,10 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi .select(Posts.columns) .where { Posts.visibility eq Visibility.PUBLIC.name or - (Posts.visibility eq Visibility.UNLISTED.name) or - (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or - (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or - (Posts.actorId eq principal.actorId.id) + (Posts.visibility eq Visibility.UNLISTED.name) or + (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or + (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or + (Posts.actorId eq principal.actorId.id) } .alias("authorized_table") } From 0801216a0d147d5f0f7fdf7a4743797bf256ed0d Mon Sep 17 00:00:00 2001 From: usbharu Date: Sun, 15 Sep 2024 23:01:42 +0900 Subject: [PATCH 10/11] =?UTF-8?q?chore:=20=E3=82=AB=E3=83=90=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=82=B8=E7=8E=87=E3=81=AE=E6=A4=9C=E8=A8=BC=E3=82=92?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull-request-merge-check.yml | 6 ++++-- hideout-core/build.gradle.kts | 16 ++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pull-request-merge-check.yml b/.github/workflows/pull-request-merge-check.yml index 06d208aa..c100e253 100644 --- a/.github/workflows/pull-request-merge-check.yml +++ b/.github/workflows/pull-request-merge-check.yml @@ -85,15 +85,17 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} title: Code Coverage update-comment: true - min-coverage-overall: 80 + min-coverage-overall: 50 min-coverage-changed-files: 80 - coverage-counter-type: LINE - name: JUnit Test Report uses: mikepenz/action-junit-report@v4 with: report_paths: '**/TEST-*.xml' + - name: Verify Coverage + run: ./hideout-core/gradlew :hideout-core:koverVerify + lint: name: Lint needs: [ setup ] diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index 466f2a61..0c09fdee 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -211,23 +211,19 @@ project.gradle.taskGraph.whenReady { kover { currentProject { sources { - excludedSourceSets.addAll( - "aot", "e2eTest", "intTest" - ) + } } reports { + verify{ + rule{ + minBound(50) + } + } filters { excludes { - packages( - "dev.usbharu.hideout.activitypub.domain.exception", - "dev.usbharu.hideout.core.domain.exception", - "dev.usbharu.hideout.core.domain.exception.media", - "dev.usbharu.hideout.core.domain.exception.resource", - "dev.usbharu.hideout.core.domain.exception.resource.local" - ) annotatedBy("org.springframework.context.annotation.Configuration") annotatedBy("org.springframework.boot.context.properties.ConfigurationProperties") packages( From 884d17cf471e609eaf1e3967e954727e8c0c73d3 Mon Sep 17 00:00:00 2001 From: usbharu Date: Sun, 15 Sep 2024 23:11:29 +0900 Subject: [PATCH 11/11] =?UTF-8?q?chore:=20=E3=82=AB=E3=83=90=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=82=B8=E3=81=AE=E8=A8=88=E6=B8=AC=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E3=82=92=E5=91=BD=E4=BB=A4=E7=B6=B2=E7=BE=85=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hideout-core/build.gradle.kts | 82 ++++++++++++++++------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index 0c09fdee..a9247b41 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -19,6 +19,7 @@ import com.github.jk1.license.filter.LicenseBundleNormalizer import com.github.jk1.license.importer.DependencyDataImporter import com.github.jk1.license.importer.XmlReportImporter import com.github.jk1.license.render.* +import kotlinx.kover.gradle.plugin.dsl.CoverageUnit import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { @@ -37,19 +38,6 @@ apply { group = "dev.usbharu" version = "0.0.1" - -tasks.withType { - useJUnitPlatform() - doFirst { - jvmArgs = arrayOf( - "--add-opens", "java.base/java.lang=ALL-UNNAMED", - "--add-opens", "java.base/java.util=ALL-UNNAMED", - "--add-opens", "java.naming/javax.naming=ALL-UNNAMED", - "--add-opens", "java.base/java.util.concurrent.locks=ALL-UNNAMED" - ).toMutableList() - } -} - kotlin { jvmToolchain(21) compilerOptions { @@ -85,8 +73,7 @@ repositories { } -val os = org.gradle.nativeplatform.platform.internal - .DefaultNativePlatform.getCurrentOperatingSystem() +val os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem() dependencies { developmentOnly(libs.h2db) @@ -173,35 +160,40 @@ configurations { } } - -//tasks{ -// bootRun { -// sourceResources(sourceSets.main.get()) -// } -//} - -tasks.withType { - exclude("**/generated/**") - doFirst { - +tasks { + withType { + exclude("**/generated/**") + setSource("src/main/kotlin") + exclude("build/") + configureEach { + exclude("**/org/koin/ksp/generated/**", "**/generated/**") + } + } + withType() { + configureEach { + exclude("**/org/koin/ksp/generated/**", "**/generated/**") + } + } + withType { + useJUnitPlatform() + doFirst { + jvmArgs = arrayOf( + "--add-opens", + "java.base/java.lang=ALL-UNNAMED", + "--add-opens", + "java.base/java.util=ALL-UNNAMED", + "--add-opens", + "java.naming/javax.naming=ALL-UNNAMED", + "--add-opens", + "java.base/java.util.concurrent.locks=ALL-UNNAMED" + ).toMutableList() + } } - setSource("src/main/kotlin") - exclude("build/") } -tasks.withType().configureEach { - exclude("**/org/koin/ksp/generated/**", "**/generated/**") -} - -tasks.withType().configureEach { - exclude("**/org/koin/ksp/generated/**", "**/generated/**") -} project.gradle.taskGraph.whenReady { - println(this.allTasks) - this.allTasks.map { println(it.name) } if (this.hasTask(":koverGenerateArtifact")) { - println("has task") val task = this.allTasks.find { it.name == "test" } val verificationTask = task as VerificationTask verificationTask.ignoreFailures = true @@ -217,9 +209,12 @@ kover { } reports { - verify{ - rule{ - minBound(50) + verify { + rule { + bound{ + minValue = 50 + coverageUnits = CoverageUnit.INSTRUCTION + } } } filters { @@ -248,10 +243,7 @@ licenseReport { importers = arrayOf(XmlReportImporter("hideout", File("$projectDir/license-list.xml"))) renderers = arrayOf( - InventoryHtmlReportRenderer(), - CsvReportRenderer(), - JsonReportRenderer(), - XmlReportRenderer() + InventoryHtmlReportRenderer(), CsvReportRenderer(), JsonReportRenderer(), XmlReportRenderer() ) filters = arrayOf(LicenseBundleNormalizer("$projectDir/license-normalizer-bundle.json", true)) allowedLicensesFile = File("$projectDir/allowed-licenses.json")