Class ModelSharingToken
java.lang.Object
ch.colabproject.colab.api.model.token.Token
ch.colabproject.colab.api.model.token.ModelSharingToken
- All Implemented Interfaces:
ColabEntity,EmailableToken,TokenWithURL,WithDeletionStatus,WithPermission,WithTrackingData,ch.colabproject.colab.generator.model.interfaces.WithId,ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator,Serializable
A token to share a model to a user
- Author:
- sandra
- See Also:
-
Field Summary
Fields inherited from class ch.colabproject.colab.api.model.token.Token
SALT, TOKEN_SEQUENCE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconsume(TokenManager tokenManager) token effect.Get the condition required to persist this entitygetEmailBody(String link) Does it have to be destroyed after one consumption, or can it live indefinitely.If instance maker is set, return the associated projectURL to redirect the user to once the token has been consumed.voidsetInstanceMaker(InstanceMaker instanceMaker) voidsetRecipient(String recipient) voidtoString()Methods inherited from class ch.colabproject.colab.api.model.token.Token
checkHash, equals, getDeletionStatus, getExpirationDate, getHashedToken, getHashMethod, getId, getReadCondition, getTrackingData, getUpdateCondition, hashCode, isAuthenticationRequired, isOutdated, mergeToUpdate, setAuthenticationRequired, setDeletionStatus, setExpirationDate, setHashedToken, setHashMethod, setId, setTrackingDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.colabproject.colab.api.model.ColabEntity
mergeToDuplicateMethods inherited from interface ch.colabproject.colab.api.model.token.TokenWithURL
getId, setHashedToken, setHashMethodMethods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminatorMethods inherited from interface ch.colabproject.colab.api.model.WithPermission
getDeleteConditionMethods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
clearErasureTrackingData, setErasureTrackingData, touch
-
Constructor Details
-
ModelSharingToken
public ModelSharingToken()
-
-
Method Details
-
getInstanceMaker
- Returns:
- the pending instance maker
-
setInstanceMaker
- Parameters:
instanceMaker- the pending instance maker
-
getSender
- Returns:
- the sender name
-
setSender
- Parameters:
sender- the sender name
-
getRecipient
- Returns:
- the email address to send the sharing to
-
setRecipient
- Parameters:
recipient- the email address to send the sharing to
-
getRedirectTo
Description copied from class:TokenURL to redirect the user to once the token has been consumed.- Specified by:
getRedirectToin classToken- Returns:
- redirect to URL
-
consume
Description copied from class:Tokentoken effect. As some token may require the requestManager, give it to them. -
getExpirationPolicy
Description copied from class:TokenDoes it have to be destroyed after one consumption, or can it live indefinitely.- Specified by:
getExpirationPolicyin classToken- Returns:
- the expiration policy
-
getSubject
- Specified by:
getSubjectin interfaceEmailableToken- Returns:
- the message subject
-
getEmailBody
- Specified by:
getEmailBodyin interfaceEmailableToken- Parameters:
link- link to embed in the body- Returns:
- email body html text
-
getProject
If instance maker is set, return the associated project- Returns:
- the model project
-
getCreateCondition
Description copied from interface:WithPermissionGet the condition required to persist this entity- Specified by:
getCreateConditionin interfaceWithPermission- Returns:
- the condition
-
toString
-