Class ModelSharingToken

    • Constructor Detail

      • ModelSharingToken

        public ModelSharingToken()
    • Method Detail

      • getInstanceMaker

        public InstanceMaker getInstanceMaker()
        Returns:
        the pending instance maker
      • setInstanceMaker

        public void setInstanceMaker​(InstanceMaker instanceMaker)
        Parameters:
        instanceMaker - the pending instance maker
      • getSender

        public String getSender()
        Returns:
        the sender name
      • setSender

        public void setSender​(String sender)
        Parameters:
        sender - the sender name
      • getRecipient

        public String getRecipient()
        Returns:
        the email address to send the sharing to
      • setRecipient

        public void setRecipient​(String recipient)
        Parameters:
        recipient - the email address to send the sharing to
      • getRedirectTo

        public String getRedirectTo()
        Description copied from class: Token
        URL to redirect the user to once the token has been consumed.
        Specified by:
        getRedirectTo in class Token
        Returns:
        redirect to URL
      • consume

        public boolean consume​(TokenManager tokenManager)
        Description copied from class: Token
        token effect. As some token may require the requestManager, give it to them.
        Specified by:
        consume in class Token
        Parameters:
        tokenManager - token manager that handles all token-specific logic
        Returns:
        true if the token can be consumed
      • getExpirationPolicy

        public ExpirationPolicy getExpirationPolicy()
        Description copied from class: Token
        Does it have to be destroyed after one consumption, or can it live indefinitely.
        Specified by:
        getExpirationPolicy in class Token
        Returns:
        the expiration policy
      • getEmailBody

        public String getEmailBody​(String link)
        Specified by:
        getEmailBody in interface EmailableToken
        Parameters:
        link - link to embed in the body
        Returns:
        email body html text
      • getProject

        public Project getProject()
        If instance maker is set, return the associated project
        Returns:
        the model project