From 2c9e615ea62f8917fdfa8ad05270e15f9cfcaa8a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 1 Nov 2019 14:04:58 +0600 Subject: [PATCH] add kdoc to SpecialContent and Content --- .../postssystem/core/content/Content.kt | 8 ++++++++ .../postssystem/core/content/SpecialContent.kt | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt index c5f4c4b6..4d722930 100644 --- a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt +++ b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt @@ -2,8 +2,16 @@ package com.insanusmokrassar.postssystem.core.content typealias ContentId = String +/** + * Content which is planned to be registered in database + */ interface Content +/** + * Content which is already registered in database. Using its [id] you can retrieve all known + * [com.insanusmokrassar.postssystem.core.post.RegisteredPost]s by using + * [com.insanusmokrassar.postssystem.core.api.ReadPostsAPI.getPostsByContent] + */ interface RegisteredContent : Content { val id: ContentId } diff --git a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/SpecialContent.kt b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/SpecialContent.kt index 58287a41..f4100390 100644 --- a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/SpecialContent.kt +++ b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/content/SpecialContent.kt @@ -2,10 +2,20 @@ package com.insanusmokrassar.postssystem.core.content import kotlinx.serialization.Serializable +/** + * Special content, which usually better known in some plugin or system, but is not representable in others. For + * example, it could be issue in some git system, which is unknown for all other systems. + * + * @property internalId Represent Id of this content in system which knows exact type and can correctly handle this + * content + */ interface SpecialContent : Content { val internalId: ContentId } +/** + * As [SpecialContent], but already registered in posts system + */ interface SpecialRegisteredContent : RegisteredContent, SpecialContent @Serializable