CustomLinkWebPageProvider

@Controller
@RequestMapping(value = "BASE_EQUINOX_ENDPOINT + CUSTOM_LINKS_PATH")
open class CustomLinkWebPageProvider

The CustomLinkWebPageProvider class is useful to provide the dedicated web page of a CustomRefyLink and manage the invalid accesses to the link and protect with a validation form the resources shared by that link

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxController

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@Autowired
private open var customLinksHelper: CustomLinksHelper
customLinksHelper helper to manage the CustomRefyLink database operations
Link copied to clipboard
private val INVALID_CUSTOM_LINK_PAGE: String = "invalid_link"
INVALID_CUSTOM_LINK_PAGE the page when the link requested is not valid
Link copied to clipboard
private val IS_IN_PREVIEW_MODE: String = "is_in_preview_mode"
IS_IN_PREVIEW_MODE the Thymeleaf tag whether the page requested is in preview mode
Link copied to clipboard
private val LINK_UNIQUE_ACCESS_WARN_TEXT: String = "link_unique_access_warn"
LINK_UNIQUE_ACCESS_WARN_TEXT the link unique access warn Thymeleaf tag
Link copied to clipboard
private val MAIN_TEXT: String = "main_text"
MAIN_TEXT the main text Thymeleaf tag
Link copied to clipboard
protected val mantis: Mantis
mantis the translations manager
Link copied to clipboard
private val RESOURCES_TITLE_TEXT: String = "resources_title_text"
RESOURCES_TITLE_TEXT the resources title text Thymeleaf tag
Link copied to clipboard
private val SUB_TEXT: String = "sub_text"
SUB_TEXT the sub text Thymeleaf tag
Link copied to clipboard
private val VALIDATE_BUTTON_TEXT: String = "validate_button_text"
VALIDATE_BUTTON_TEXT the validate button text Thymeleaf tag

Functions

Link copied to clipboard
private open fun customLinkPage(customLink: CustomRefyLink, model: Model, isPreviewMode: Boolean): String
Method to format and return the CUSTOM_LINK_KEY related page
Link copied to clipboard
private open fun linkNotExistsOrExpired(customLink: CustomRefyLink, model: Model): String
Method to format and return the INVALID_CUSTOM_LINK_PAGE due the link expiration or the not existing of that link
Link copied to clipboard
@GetMapping(path = "/{" + LINK_IDENTIFIER_KEY + "}")
open fun loadCustomLinkWebPage(model: Model, request: HttpServletRequest, @PathVariable(value = "link_id") linkId: String, @RequestParam(name = "preview_token", required = false) previewToken: String): String
Method to get a list of custom links
Link copied to clipboard
private open fun wrongAttemptToPreviewMode(model: Model): String
Method to format and return the INVALID_CUSTOM_LINK_PAGE due the wrong attempt to access in preview mode to the web page