LinksService

@Service
open class LinksService : LinksBaseService<T>

The LinksHelper class is useful to manage all the RefyLink database operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
@Autowired
constructor(linksRepository: LinksRepository)
Constructor used to ini the service

Properties

Link copied to clipboard
protected open var entityManager: EntityManager
Link copied to clipboard
linksRepository instance for the links repository

Functions

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 createLink(userId: String, linkId: String, title: String, thumbnailPreview: String, description: String, referenceLink: String)
Method to save a new link
Link copied to clipboard
open fun deleteLink(linkId: String)
Method to delete a link
Link copied to clipboard
open fun editLink(userId: String, linkId: String, title: String, thumbnailPreview: String, description: String, referenceLink: String)
Method to edit a new link
Link copied to clipboard
open fun getAllUserLinks(userId: String, page: Int, pageSize: Int, keywords: Set<String>): PaginatedResponse<RefyLink>
Method to get all the user's links, included the links shared in the teams and in the collections shared in the teams
Link copied to clipboard
open fun getItemIfAllowed(userId: String, linkId: String): RefyLink
Method used to get an item if the user is authorized
Link copied to clipboard
open fun getUserLinks(userId: String): HashSet<String>
Method to get the user's owned links identifiers
Link copied to clipboard
open fun getUserOwnedLinks(userId: String, page: Int, pageSize: Int): PaginatedResponse<RefyLink>
Method to get the user's owned links
Link copied to clipboard
open fun shareLinkWithCollections(userId: String, linkId: String, collections: List<String>)
Method share the link with collections
Link copied to clipboard
open fun shareLinkWithTeams(userId: String, linkId: String, teams: List<String>)
Method share the link with teams
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)