CustomRefyLink

@Entity
open class CustomRefyLink : RefyLink

The CustomRefyLink class is useful to represent a custom Refy's link, useful to share resources and allowing to protect them with an authentication form with custom fields

Author

N7ghtm4r3 - Tecknobit

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
constructor()
Constructor to init the CustomRefyLink class No-any params required
constructor(id: String, owner: RefyUser, title: String, description: String, referenceLink: String, creationDate: Long, uniqueAccess: Boolean, expiredTime: CustomRefyLink.ExpiredTime, resources: Map<String, String>, fields: Map<String, String>, previewToken: String)
Constructor to init the CustomRefyLink class
constructor(jCustomRefyLink: JSONObject)
Constructor to init the CustomRefyLink class

Types

Link copied to clipboard
ExpiredTime list of available expiration time

Properties

Link copied to clipboard
collections the collections where the link is shared
Link copied to clipboard
val CREATION_DATE_KEY: String = "creation_date"
CREATION_DATE_KEY the key for the "creation_date" field
Link copied to clipboard
private val creationDate: Long
creationDate when the link has been created
Link copied to clipboard
val CUSTOM_LINK_KEY: String = "custom_link"
CUSTOM_LINK_KEY the key for the "custom_link" field
Link copied to clipboard
val CUSTOM_LINKS_PATH: String = "customLinks"
CUSTOM_LINKS_PATH the key for the "customLinks" url path
Link copied to clipboard
protected val description: String
description the description of the item
Link copied to clipboard
val DESCRIPTION_KEY: String = "description"
DESCRIPTION_KEY the key for the "description" field
Link copied to clipboard
Link copied to clipboard
val EXPIRED_TIME_KEY: String = "expired_time"
EXPIRED_TIME_KEY the key for the "expired_time" field
Link copied to clipboard
expiredTime if set, when the link expires and automatically deleted
Link copied to clipboard
val FIELD_KEY: String = "field_key"
FIELD_KEY the key for the "field_key" field
Link copied to clipboard
val FIELD_VALUE_KEY: String = "field_value"
FIELD_VALUE_KEY the key for the "field_value" field
Link copied to clipboard
fields the fields used to protect the resources with a validation form
Link copied to clipboard
val FIELDS_KEY: String = "fields"
FIELDS_KEY the key for the "fields" field
Link copied to clipboard
protected val hItem: JsonHelper
Link copied to clipboard
protected val id: String
Link copied to clipboard
Link copied to clipboard
val LINK_IDENTIFIER_KEY: String = "link_id"
LINK_IDENTIFIER_KEY the key for the "link_id" field
Link copied to clipboard
val LINK_KEY: String = "link"
LINK_KEY the key for the "link" field
Link copied to clipboard
val OWNED_ONLY_KEY: String = "owned_only"
OWNED_ONLY_KEY the key for the "owned_only" field
Link copied to clipboard
protected val owner: RefyUser
owner the owner of the item
Link copied to clipboard
val OWNER_KEY: String = "owner"
OWNER_KEY the key for the "owner" field
Link copied to clipboard
val PREVIEW_TOKEN_KEY: String = "preview_token"
PREVIEW_TOKEN_KEY the key for the "preview_token" field
Link copied to clipboard
previewToken the token used to entry in the preview mode
Link copied to clipboard
val REFERENCE_LINK_KEY: String = "reference_link"
REFERENCE_LINK_KEY the key for the "reference_link" field
Link copied to clipboard
protected val referenceLink: String
referenceLink the link reference value
Link copied to clipboard
val RESOURCE_KEY: String = "resource_key"
RESOURCE_KEY the key for the "resource_key" field
Link copied to clipboard
val RESOURCE_VALUE_KEY: String = "resource_value"
RESOURCE_VALUE_KEY the key for the "resource_value" field
Link copied to clipboard
resources the resources to share with the link
Link copied to clipboard
val RESOURCES_KEY: String = "resources"
RESOURCES_KEY the key for the "resources" field
Link copied to clipboard
protected val teams: List<Team>
teams the teams where the link is shared
Link copied to clipboard
protected val timeFormatter: TimeFormatter
Link copied to clipboard
protected val title: String
title the title of the item
Link copied to clipboard
val TITLE_KEY: String = "title"
TITLE_KEY the key for the "title" field
Link copied to clipboard
val UNIQUE_ACCESS_KEY: String = "unique_access"
UNIQUE_ACCESS_KEY the key for the "unique_access" field
Link copied to clipboard
private val uniqueAccess: Boolean
uniqueAccess whether the link, when requested for the first time, must be deleted and no more accessible

Functions

Link copied to clipboard
open fun canBeUpdatedByUser(loggedUserId: String): Boolean
Method to check if the user can update the current item
Link copied to clipboard
open fun expires(): Boolean
Method to get whether the link expires or not No-any params required
Link copied to clipboard
Method to get collections instance No-any params required
Link copied to clipboard
Method to get the ids of the collections No-any params required
Link copied to clipboard
Method to get creationDate instance No-any params required
Link copied to clipboard
Method to get creationDate instance No-any params required
Link copied to clipboard
Method to get description instance No-any params required
Link copied to clipboard
Method to get the expiration date No-any params required
Link copied to clipboard
Method to get the expiration timestamp value No-any params required
Link copied to clipboard
open fun getId(): String
Link copied to clipboard
open fun getOwner(): RefyUser
Method to get owner instance No-any params required
Link copied to clipboard
open fun getPreviewModeUrl(hostAddress: String): String
Method to get the url to enter the preview mode No-any params required
Link copied to clipboard
Method to get referenceLink instance No-any params required
Link copied to clipboard
open fun getTeamIds(): List<String>
Method to get the ids of the teams No-any params required
Link copied to clipboard
open fun getTeams(): List<Team>
Method to get teams instance No-any params required
Link copied to clipboard
open fun getTitle(): String
Method to get title instance No-any params required
Link copied to clipboard
Method to get uniqueAccess instance No-any params required
Link copied to clipboard
open fun isExpired(): Boolean
Method to get whether the link has been expired No-any params required
Link copied to clipboard
private open fun loadMap(jMap: JSONObject): Map<String, String>
Method to load a map instance
Link copied to clipboard
Method to get whether the resources are protected or not No-any params required
Link copied to clipboard
open fun returnCustomLinks(jLinks: JSONArray): ArrayList<CustomRefyLink>
Method to assemble and return an ArrayList of links
Link copied to clipboard
open fun returnLinks(jLinks: JSONArray): ArrayList<RefyLink>
Method to assemble and return an ArrayList of links
Link copied to clipboard
open fun toString(): String