renames of markup creator
This commit is contained in:
parent
5dd6a1f3f5
commit
47805b9e91
@ -6,12 +6,12 @@ import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
import com.insanusmokrassar.postssystem.core.post.RegisteredPost
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
|
||||
abstract class AbstractMarkupCreator<MarkupTarget>(
|
||||
abstract class AbstractMarkupBuilderFactory<MarkupTarget>(
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
protected val postsRepo: ReadPostsRepo,
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
protected val postsContentRepo: ReadContentRepo
|
||||
) : MarkupCreator<MarkupTarget> {
|
||||
) : MarkupBuilderFactory<MarkupTarget> {
|
||||
override suspend fun drawOn(target: MarkupTarget, forPost: PostId) {
|
||||
val post = postsRepo.getPostById(forPost) ?: return
|
||||
val contents = post.content.mapNotNull {
|
@ -12,10 +12,10 @@ import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
* * Web
|
||||
* * etc.
|
||||
*
|
||||
* [MarkupTarget] here is just a platform, which can be used by [MarkupCreator] to create markup inside.
|
||||
* [MarkupTarget] here is just a platform, which can be used by [MarkupBuilderFactory] to create markup inside.
|
||||
*
|
||||
* For example, it could be some creator like "TelegramForHTMLMarkupBuilder"
|
||||
*/
|
||||
interface MarkupCreator<MarkupTarget> {
|
||||
interface MarkupBuilderFactory<MarkupTarget> {
|
||||
suspend fun drawOn(target: MarkupTarget, forPost: PostId)
|
||||
}
|
@ -2,10 +2,10 @@ package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupCreator
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupBuilderFactory
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
abstract class HtmlMarkupCreator(
|
||||
abstract class HtmlMarkupBuilderFactory(
|
||||
postsRepo: ReadPostsRepo,
|
||||
postsContentRepo: ReadContentRepo
|
||||
) : AbstractMarkupCreator<FlowContent>(postsRepo, postsContentRepo)
|
||||
) : AbstractMarkupBuilderFactory<FlowContent>(postsRepo, postsContentRepo)
|
@ -2,10 +2,10 @@ package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupCreator
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupBuilderFactory
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
abstract class HtmlMarkupCreator(
|
||||
abstract class HtmlMarkupBuilderFactory(
|
||||
postsRepo: ReadPostsRepo,
|
||||
postsContentRepo: ReadContentRepo
|
||||
) : AbstractMarkupCreator<FlowContent>(postsRepo, postsContentRepo)
|
||||
) : AbstractMarkupBuilderFactory<FlowContent>(postsRepo, postsContentRepo)
|
Loading…
Reference in New Issue
Block a user