Links Collections Service

@Service
open class LinksCollectionsService : EquinoxItemsHelper, RefyItemRetriever<T>

The LinksCollectionsHelper class is useful to manage all the LinksCollection database operations

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxItemsHelper

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
private val _IN_CLAUSE_: String = " IN "
Link copied to clipboard
val _VALUES_: String = " VALUES "
Link copied to clipboard
val _WHERE_: String = " WHERE "
Link copied to clipboard
Link copied to clipboard
@Autowired
private open var collectionsRepository: CollectionsRepository
collectionsRepository instance for the collections repository
Link copied to clipboard
val COMMA: String = ","
Link copied to clipboard
val DELETE_FROM_: String = "DELETE FROM "
Link copied to clipboard
protected open var entityManager: EntityManager
Link copied to clipboard
@Autowired
private open var linksRepository: LinksRepository
linksRepository instance for the links repository
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val SINGLE_QUOTE: String = "'"
Link copied to clipboard
@Autowired
private open var teamsRepository: TeamsRepository
teamsRepository instance for the teams repository

Functions

Link copied to clipboard
open fun attachLinksToCollection(collectionId: String, links: List<String>)
Method to attach the links with a collection
Link copied to clipboard
protected open fun batchDelete(table: String, values: Collection<out Any>, columns: Array<@NotNull String>)
Link copied to clipboard
protected open fun <V> batchInsert(    command: EquinoxItemsHelper.InsertCommand,     table: String,     batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Link copied to clipboard
open fun createCollection(userId: String, collectionId: String, color: String, title: String, description: String, links: List<String>)
Method to create a collection
Link copied to clipboard
open fun deleteCollection(collectionId: String)
Method to delete a collection
Link copied to clipboard
open fun editCollection(userId: String, collectionId: String, color: String, title: String, description: String, links: List<String>)
Method to edit a collection
Link copied to clipboard
open fun getAllUserCollections(userId: String, page: Int, pageSize: Int, keywords: Set<String>): PaginatedResponse<LinksCollection>
Method to get all the user's collections, included the collections shared in the teams
Link copied to clipboard
open fun getCollectionLinks(collectionId: String, page: Int, pageSize: Int, keywords: Set<String>): PaginatedResponse<RefyLink>
Method to get the links shared in a collection
Link copied to clipboard
open fun getCollectionTeams(collectionId: String, page: Int, pageSize: Int): PaginatedResponse<Team>
Method to get the teams where the collection is shared
Link copied to clipboard
open fun getItemIfAllowed(userId: String, collectionId: String): LinksCollection
Method used to get an item if the user is authorized
Link copied to clipboard
Method to get the user's owned collections identifiers
Link copied to clipboard
open fun getUserOwnedCollections(userId: String, page: Int, pageSize: Int): PaginatedResponse<LinksCollection>
Method to get the user's owned collections
Link copied to clipboard
open fun removeLinkFromCollection(collectionId: String, linkId: String)
Method to remove a link from a collection
Link copied to clipboard
open fun removeTeamFromCollection(collectionId: String, teamId: String)
Method to remove a team from a collection
Link copied to clipboard
open fun shareCollectionWithTeams(collectionId: String, teams: List<String>)
Method to manage the teams where the collection is shared
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)