Class StickyNoteLink
- java.lang.Object
-
- ch.colabproject.colab.api.model.link.StickyNoteLink
-
- All Implemented Interfaces:
ColabEntity
,WithDeletionStatus
,WithPermission
,WithTrackingData
,WithWebsocketChannels
,WithId
,WithJsonDiscriminator
,Serializable
@Entity public class StickyNoteLink extends Object implements ColabEntity, WithWebsocketChannels
Link to make an information accessible within a card.The source of information can be either
- a card
- a card content
- a resource
- a document
- Author:
- sandra
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StickyNoteLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ChannelsBuilders.ChannelsBuilder
getChannelsBuilder()
Get the channels this entity shall be sent through.DeletionStatus
getDeletionStatus()
Get the deletion status :Card
getDestinationCard()
Long
getDestinationCardId()
get the id of the destination card.TextDataBlock
getExplanation()
Long
getExplanationId()
get the id of the explanation.Long
getId()
Project
getProject()
Get the project it belongs toConditions.Condition
getReadCondition()
Get the condition required to read this entityStickyNoteSourceable
getSrc()
Card
getSrcCard()
CardContent
getSrcCardContent()
Long
getSrcCardContentId()
get the id of the source card content.Long
getSrcCardId()
get the id of the source card.Document
getSrcDocument()
Long
getSrcDocumentId()
get the id of the source document.AbstractResource
getSrcResourceOrRef()
Long
getSrcResourceOrRefId()
get the id of the source resource / resource reference.String
getTeaser()
Tracking
getTrackingData()
Get the tracking dataConditions.Condition
getUpdateCondition()
Get the condition required to update this entityint
hashCode()
boolean
isSrcCard()
boolean
isSrcCardContent()
boolean
isSrcDocument()
boolean
isSrcResourceOrRef()
void
mergeToUpdate(ColabEntity other)
Update this object according to values provided by other.void
setDeletionStatus(DeletionStatus status)
Set the deletion status :void
setDestinationCard(Card destinationCard)
void
setDestinationCardId(Long destinationCardId)
set the id of the destination card.void
setExplanation(TextDataBlock explanation)
void
setExplanationId(Long explanationId)
set the id of the explanation.void
setId(Long id)
void
setSrc(StickyNoteSourceable src)
void
setSrcCard(Card srcCard)
void
setSrcCardContent(CardContent srcCardContent)
void
setSrcCardContentId(Long srcCardContentId)
set the id of the source card content.void
setSrcCardId(Long srcCardId)
set the id of the source card.void
setSrcDocument(Document srcDocument)
void
setSrcDocumentId(Long srcDocumentId)
set the id of the source document.void
setSrcResourceOrRef(AbstractResource srcResourceOrRef)
void
setSrcResourceOrRefId(Long srcResourceOrRefId)
set the id of the source resource / resource reference.void
setTeaser(String teaser)
void
setTrackingData(Tracking trackingData)
Set tracking dataString
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.colabproject.colab.api.model.ColabEntity
mergeToDuplicate
-
Methods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminator
-
Methods inherited from interface ch.colabproject.colab.api.model.WithPermission
getCreateCondition, getDeleteCondition
-
Methods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
initErasureTrackingData, resetErasureTrackingData, touch
-
Methods inherited from interface ch.colabproject.colab.api.model.WithWebsocketChannels
getIndexEntryPayload
-
-
-
-
Method Detail
-
setId
public void setId(Long id)
- Parameters:
id
- the link id
-
getTrackingData
public Tracking getTrackingData()
Get the tracking data- Specified by:
getTrackingData
in interfaceWithTrackingData
- Returns:
- tracking data
-
setTrackingData
public void setTrackingData(Tracking trackingData)
Set tracking data- Specified by:
setTrackingData
in interfaceWithTrackingData
- Parameters:
trackingData
- new tracking data
-
getDeletionStatus
public DeletionStatus getDeletionStatus()
Description copied from interface:WithDeletionStatus
Get the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
getDeletionStatus
in interfaceWithDeletionStatus
- Returns:
- null or a deletion status
-
setDeletionStatus
public void setDeletionStatus(DeletionStatus status)
Description copied from interface:WithDeletionStatus
Set the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
setDeletionStatus
in interfaceWithDeletionStatus
- Parameters:
status
- null or a deletion status
-
getTeaser
public String getTeaser()
- Returns:
- the short description
-
setTeaser
public void setTeaser(String teaser)
- Parameters:
teaser
- the short description
-
getExplanation
public TextDataBlock getExplanation()
- Returns:
- the long description
-
setExplanation
public void setExplanation(TextDataBlock explanation)
- Parameters:
explanation
- the long description
-
getExplanationId
public Long getExplanationId()
get the id of the explanation. To be sent to client.- Returns:
- the id of the explanation
-
setExplanationId
public void setExplanationId(Long explanationId)
set the id of the explanation. For serialization only.- Parameters:
explanationId
- the id of the teaser
-
getSrcCard
public Card getSrcCard()
- Returns:
- the card, source of the sticky note
-
setSrcCard
public void setSrcCard(Card srcCard)
- Parameters:
srcCard
- the card, source of the sticky note
-
getSrcCardId
public Long getSrcCardId()
get the id of the source card. To be sent to client- Returns:
- the id of source card
-
setSrcCardId
public void setSrcCardId(Long srcCardId)
set the id of the source card. For serialization only- Parameters:
srcCardId
- the id of the source card
-
isSrcCard
public boolean isSrcCard()
- Returns:
- True if the source is a card
-
getSrcCardContent
public CardContent getSrcCardContent()
- Returns:
- the card content, source of the sticky note
-
setSrcCardContent
public void setSrcCardContent(CardContent srcCardContent)
- Parameters:
srcCardContent
- the card content, source of the sticky note
-
getSrcCardContentId
public Long getSrcCardContentId()
get the id of the source card content. To be sent to client- Returns:
- the id of source card content
-
setSrcCardContentId
public void setSrcCardContentId(Long srcCardContentId)
set the id of the source card content. For serialization only- Parameters:
srcCardContentId
- the id of the source card content
-
isSrcCardContent
public boolean isSrcCardContent()
- Returns:
- True if the source is a card content
-
getSrcResourceOrRef
public AbstractResource getSrcResourceOrRef()
- Returns:
- the resource / resource reference, source of the sticky note
-
setSrcResourceOrRef
public void setSrcResourceOrRef(AbstractResource srcResourceOrRef)
- Parameters:
srcResourceOrRef
- the resource / resource reference, source of the sticky note
-
getSrcResourceOrRefId
public Long getSrcResourceOrRefId()
get the id of the source resource / resource reference. To be sent to client- Returns:
- the id of source resource / resource reference
-
setSrcResourceOrRefId
public void setSrcResourceOrRefId(Long srcResourceOrRefId)
set the id of the source resource / resource reference. For serialization only- Parameters:
srcResourceOrRefId
- the id of the source resource / resource reference
-
isSrcResourceOrRef
public boolean isSrcResourceOrRef()
- Returns:
- True if the source is a resource / resource reference
-
getSrcDocument
public Document getSrcDocument()
- Returns:
- the document, source of the sticky note
-
setSrcDocument
public void setSrcDocument(Document srcDocument)
- Parameters:
srcDocument
- the Document, source of the sticky note
-
getSrcDocumentId
public Long getSrcDocumentId()
get the id of the source document. To be sent to client- Returns:
- the id of source document
-
setSrcDocumentId
public void setSrcDocumentId(Long srcDocumentId)
set the id of the source document. For serialization only- Parameters:
srcDocumentId
- the id of the source document
-
isSrcDocument
public boolean isSrcDocument()
- Returns:
- True if the source is a document
-
getDestinationCard
public Card getDestinationCard()
- Returns:
- the card where the information is useful
-
setDestinationCard
public void setDestinationCard(Card destinationCard)
- Parameters:
destinationCard
- the card where the information is useful
-
getDestinationCardId
public Long getDestinationCardId()
get the id of the destination card. To be sent to client- Returns:
- the id of destination card
-
setDestinationCardId
public void setDestinationCardId(Long destinationCardId)
set the id of the destination card. For serialization only- Parameters:
destinationCardId
- the id of the destination card
-
getSrc
public StickyNoteSourceable getSrc()
- Returns:
- the source of the link
-
setSrc
public void setSrc(StickyNoteSourceable src)
- Parameters:
src
- the source of the link
-
mergeToUpdate
public void mergeToUpdate(ColabEntity other) throws ColabMergeException
Description copied from interface:ColabEntity
Update this object according to values provided by other.This is used when an object is prepared to be updated in database.
- Specified by:
mergeToUpdate
in interfaceColabEntity
- Parameters:
other
- object to take new values from- Throws:
ColabMergeException
- if merging is not possible
-
getProject
public Project getProject()
Get the project it belongs to- Returns:
- project owner
-
getChannelsBuilder
public ChannelsBuilders.ChannelsBuilder getChannelsBuilder()
Description copied from interface:WithWebsocketChannels
Get the channels this entity shall be sent through.- Specified by:
getChannelsBuilder
in interfaceWithWebsocketChannels
- Returns:
- list of channels
-
getReadCondition
public Conditions.Condition getReadCondition()
Description copied from interface:WithPermission
Get the condition required to read this entity- Specified by:
getReadCondition
in interfaceWithPermission
- Returns:
- the condition
-
getUpdateCondition
public Conditions.Condition getUpdateCondition()
Description copied from interface:WithPermission
Get the condition required to update this entity- Specified by:
getUpdateCondition
in interfaceWithPermission
- Returns:
- the condition
-
-