Links Service

@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
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
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 = "'"

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>)