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
A bean to store Help Desk Issues.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a Comment to this Issue.int
Returns the database ID of the Person this Issue is assigned to.Returns the object ID for this auditable object.int
Returns the Author of this bean.getBody()
Returns the Issue body text.int
Returns the number of Comments for this Issue.Returns all comments for this Issue.Returns the date/time the Issue was created on.boolean
getFAQ()
Returns whether the Issue is in the FAQ.Returns the date of the last comment.int
Returns the database ID of the author of the last comment on this Issue.int
Returns the database ID of a linked Development Issue.boolean
Returns whether the Issue is Public.Returns the date/time the Issue was resolved on.Returns the CSS class for this object if rendered in a view table.Returns the Issue status.Returns the Issue subject.boolean
Returns whether this object is within multiple web applications.void
setAssignedTo
(int id) Updates the database ID of the Issue assignee.void
setAuthorID
(int id) Updates the author of this bean.void
Updates the Issue body text.void
setCommentCount
(int comments) Updates the number of Comments for this Issue.void
setCreatedOn
(Instant dt) Updates the creation date of this Issue.void
setFAQ
(boolean isFAQ) Marks the Issue as part of the FAQ.void
Updates the date of the last comment on this Issue.void
setLastCommentAuthorID
(int id) Updates the database ID of the author of the last Comment on this Issue.void
setLinkedIssueID
(int id) Updates the database ID of a linked Development issue.void
setPublic
(boolean isPublic) Marks the Issue as Public.void
setResolvedOn
(Instant dt) Updates the resolution date of this Issue.void
setStatus
(IssueStatus status) Updates this Issue's status.void
setSubject
(String sbj) Updates the Issue subject.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.Auditable
getAuditType
-
Constructor Details
-
Issue
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 interfaceAuthoredBean
- 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
-
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
-
getBody
-
getCreatedOn
Returns the date/time the Issue was created on.- Returns:
- the Issue creation date/time
- See Also:
-
getResolvedOn
Returns the date/time the Issue was resolved on.- Returns:
- the Issue resolution date/time
- See Also:
-
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
Returns all comments for this Issue.- Returns:
- a Collection of IssueComment beans
- See Also:
-
addComment
Adds a Comment to this Issue.- Parameters:
ic
- the IssueComment bean to add- See Also:
-
setSubject
Updates the Issue subject.- Parameters:
sbj
- the subject- Throws:
NullPointerException
- if sbj is null- See Also:
-
setBody
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 interfaceAuthoredBean
- 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
Updates the creation date of this Issue.- Parameters:
dt
- the date/time the Issue was created- See Also:
-
setLastComment
Updates the date of the last comment on this Issue.- Parameters:
dt
- the date/time of the last comment- See Also:
-
setResolvedOn
Updates the resolution date of this Issue.- Parameters:
dt
- the date/time the Issue was resolved- See Also:
-
setStatus
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
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- 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 interfaceAuditable
- Returns:
- TRUE if cross-application, otherwise FALSE
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-