Class Document

    • Field Detail

      • DOCUMENT_SEQUENCE_NAME

        public static final String DOCUMENT_SEQUENCE_NAME
        Name of the document/resource sequence
        See Also:
        Constant Field Values
      • id

        protected Long id
        Document ID
      • owningCardContent

        protected CardContent owningCardContent
        The card content for which this document is a deliverable
      • owningResource

        protected Resource owningResource
        The resource this document is part of
    • Constructor Detail

      • Document

        public Document()
    • Method Detail

      • getId

        public Long getId()
        Specified by:
        getId in interface WithId
        Returns:
        the document id
      • setId

        public void setId​(Long id)
        Parameters:
        id - the document id
      • setTrackingData

        public void setTrackingData​(Tracking trackingData)
        Set tracking data
        Specified by:
        setTrackingData in interface WithTrackingData
        Parameters:
        trackingData - new tracking data
      • 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 interface WithDeletionStatus
        Parameters:
        status - null or a deletion status
      • getIndex

        public int getIndex()
        Specified by:
        getIndex in interface WithIndex
        Returns:
        the index to define the place of the document
      • setIndex

        public void setIndex​(int index)
        Specified by:
        setIndex in interface WithIndex
        Parameters:
        index - the index to define the place of the document to set
      • getOwningCardContent

        public CardContent getOwningCardContent()
        Returns:
        the card content for which this document is a deliverable
      • setOwningCardContent

        public void setOwningCardContent​(CardContent cardContent)
        Parameters:
        cardContent - the card content for which this document is a deliverable
      • getOwningCardContentId

        public Long getOwningCardContentId()
        Returns:
        the id of the card content for which this document is a deliverable
      • setOwningCardContentId

        public void setOwningCardContentId​(Long cardContentId)
        Parameters:
        cardContentId - the id of the card content for which this document is a deliverable
      • hasOwningCardContent

        public boolean hasOwningCardContent()
        Returns:
        True if there is an owning card content
      • getOwningResource

        public Resource getOwningResource()
        Returns:
        the resource this document is part of
      • setOwningResource

        public void setOwningResource​(Resource resource)
        Parameters:
        resource - the resource this document is part of
      • getOwningResourceId

        public Long getOwningResourceId()
        Returns:
        the id of the resource this document is part of
      • setOwningResourceId

        public void setOwningResourceId​(Long resourceId)
        Parameters:
        resourceId - the id of the resource this document is part of
      • hasOwningResource

        public boolean hasOwningResource()
        Returns:
        True if there is an owning resource
      • setStickyNoteLinksAsSrc

        public void setStickyNoteLinksAsSrc​(List<StickyNoteLink> stickyNoteLinksAsSrc)
        Parameters:
        stickyNoteLinksAsSrc - the list of sticky note links of which the document is the source
      • 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 interface ColabEntity
        Parameters:
        other - object to take new values from
        Throws:
        ColabMergeException - if merging is not possible
      • getProject

        public Project getProject()
        Get the project this document belongs to
        Returns:
        document owner
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toPartialString

        protected String toPartialString()
        Returns:
        This abstract class fields to mention in the toString implementations