All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.zakadabar.lib.content.data.NavQuery.kt Maven / Gradle / Ivy

There is a newer version: 2023.4.20
Show newest version
/*
 * Copyright © 2020-2021, Simplexion, Hungary and contributors. Use of this source code is governed by the Apache 2.0 license.
 */
package zakadabar.lib.content.data

import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.ListSerializer
import zakadabar.core.data.BaseBo
import zakadabar.core.data.EntityId
import zakadabar.core.data.QueryBo
import zakadabar.core.data.QueryBoCompanion

/**
 * Query navigation links from a given starting point.
 */
@Serializable
class NavQuery(
    val locale : String,
    val from : EntityId?
): QueryBo> {

    companion object : QueryBoCompanion(ContentBo.boNamespace)

    override suspend fun execute() = comm.query(this, serializer(), ListSerializer(NavEntry.serializer()))

}

/**
 * An entry returned by folder query.
 */
@Serializable
class NavEntry(
    val masterId : EntityId,
    val localizedId : EntityId,
    val title : String,
    val seoPath : String,
    val folder: Boolean,
    var children : List
) : BaseBo




© 2015 - 2025 Weber Informatics LLC | Privacy Policy