Class Issue

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.help.Issue
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Object>, Auditable, AuthoredBean, IDBean, ViewEntry, Cacheable

public class Issue extends DatabaseBean implements Auditable, AuthoredBean, ViewEntry
A bean to store Help Desk Issues.
Since:
1.0
Version:
11.0
Author:
Luke
See Also:
  • Constructor Details

    • Issue

      public Issue(String subj)
      Creates a new Issue bean.
      Parameters:
      subj - the Issue subject
      Throws:
      NullPointerException - if subj is null
  • Method Details

    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      Returns:
      the author's database ID
      See Also:
    • getAssignedTo

      public int getAssignedTo()
      Returns the database ID of the Person this Issue is assigned to.
      Returns:
      the Assignee's database ID
      See Also:
    • getLastCommentAuthorID

      public int getLastCommentAuthorID()
      Returns the database ID of the author of the last comment on this Issue.
      Returns:
      the last comment author's datbase ID
      See Also:
    • getLinkedIssueID

      public int getLinkedIssueID()
      Returns the database ID of a linked Development Issue.
      Returns:
      the database ID
      See Also:
    • getStatus

      public IssueStatus getStatus()
      Returns the Issue status.
      Returns:
      the IssueStatus
      See Also:
    • getPublic

      public boolean getPublic()
      Returns whether the Issue is Public.
      Returns:
      TRUE if the Issue is Public, otherwise FALSE
      See Also:
    • getFAQ

      public boolean getFAQ()
      Returns whether the Issue is in the FAQ.
      Returns:
      TRUE if the Issue is in the FAQ, otherwise FALSE
      See Also:
    • getSubject

      public String getSubject()
      Returns the Issue subject.
      Returns:
      the subject
      See Also:
    • getBody

      public String getBody()
      Returns the Issue body text.
      Returns:
      the body text
      See Also:
    • getCreatedOn

      public Instant getCreatedOn()
      Returns the date/time the Issue was created on.
      Returns:
      the Issue creation date/time
      See Also:
    • getResolvedOn

      public Instant getResolvedOn()
      Returns the date/time the Issue was resolved on.
      Returns:
      the Issue resolution date/time
      See Also:
    • getLastComment

      public Instant getLastComment()
      Returns the date of the last comment. This may be null if no comments have been entered.
      Returns:
      the date/time of the last comment
      See Also:
    • getCommentCount

      public int getCommentCount()
      Returns the number of Comments for this Issue.
      Returns:
      the number of Comments
      See Also:
    • getComments

      public Collection<IssueComment> getComments()
      Returns all comments for this Issue.
      Returns:
      a Collection of IssueComment beans
      See Also:
    • addComment

      public void addComment(IssueComment ic)
      Adds a Comment to this Issue.
      Parameters:
      ic - the IssueComment bean to add
      See Also:
    • setSubject

      public void setSubject(String sbj)
      Updates the Issue subject.
      Parameters:
      sbj - the subject
      Throws:
      NullPointerException - if sbj is null
      See Also:
    • setBody

      public void setBody(String body)
      Updates the Issue body text.
      Parameters:
      body - the body text
      See Also:
    • setAuthorID

      public void setAuthorID(int id)
      Description copied from interface: AuthoredBean
      Updates the author of this bean.
      Specified by:
      setAuthorID in interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • setAssignedTo

      public void setAssignedTo(int id)
      Updates the database ID of the Issue assignee.
      Parameters:
      id - the assignee's database ID
      Throws:
      IllegalArgumentException - if id is negative
      See Also:
    • setLastCommentAuthorID

      public void setLastCommentAuthorID(int id)
      Updates the database ID of the author of the last Comment on this Issue.
      Parameters:
      id - the author's database ID
      Throws:
      IllegalArgumentException - if id is negative
      See Also:
    • setLinkedIssueID

      public void setLinkedIssueID(int id)
      Updates the database ID of a linked Development issue.
      Parameters:
      id - the Development Issue database ID
      Throws:
      IllegalArgumentException - if id is negative
      See Also:
    • setCreatedOn

      public void setCreatedOn(Instant dt)
      Updates the creation date of this Issue.
      Parameters:
      dt - the date/time the Issue was created
      See Also:
    • setLastComment

      public void setLastComment(Instant dt)
      Updates the date of the last comment on this Issue.
      Parameters:
      dt - the date/time of the last comment
      See Also:
    • setResolvedOn

      public void setResolvedOn(Instant dt)
      Updates the resolution date of this Issue.
      Parameters:
      dt - the date/time the Issue was resolved
      See Also:
    • setStatus

      public void setStatus(IssueStatus status)
      Updates this Issue's status.
      Parameters:
      status - the IssueStatus
      See Also:
    • setPublic

      public void setPublic(boolean isPublic)
      Marks the Issue as Public.
      Parameters:
      isPublic - TRUE if the Issue is public, otherwise FALSE
      See Also:
    • setFAQ

      public void setFAQ(boolean isFAQ)
      Marks the Issue as part of the FAQ.
      Parameters:
      isFAQ - TRUE if the Issue is part of the FAQ, otherwise FALSE
      See Also:
    • setCommentCount

      public void setCommentCount(int comments)
      Updates the number of Comments for this Issue.
      Parameters:
      comments - the number of Comments
      Throws:
      IllegalArgumentException - if comments are already populated or negative
      See Also:
    • getAuditID

      public String getAuditID()
      Description copied from interface: Auditable
      Returns the object ID for this auditable object.
      Specified by:
      getAuditID in interface Auditable
      Returns:
      the ID
    • isCrossApp

      public boolean isCrossApp()
      Description copied from interface: Auditable
      Returns whether this object is within multiple web applications. Objects where this is false will need additional data appended to the audit ID to prevent information leakage across applications where the audit IDs are identical between apps.
      Specified by:
      isCrossApp in interface Auditable
      Returns:
      TRUE if cross-application, otherwise FALSE
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name, or NULL if none