Class MantisBtClient
java.lang.Object
com.michelin.cert.redscan.utils.mantisbt.MantisBtClient
MantisBT client.
- Author:
- Maxime ESCOURBIAC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddComment(BigInteger id, String comment) Add a note to a ticket.createIssue(Vulnerability vulnerability) Create a MantisBT issue from vulnerability.booleanDelete MantisBT issue.biz.futureware.mantisconnect.IssueDatagetIssue(BigInteger id) Get issue by MantisBT id.biz.futureware.mantisconnect.IssueData[]Get issue by Internal id.Get MantisBT version.static voidInit the MantisBT client.booleanReopen a ticket.booleanshouldBeReopened(biz.futureware.mantisconnect.IssueData issue) Determine if the ticket should be reopened.
-
Constructor Details
-
MantisBtClient
public MantisBtClient()
-
-
Method Details
-
init
Init the MantisBT client.- Parameters:
url- MantisBT url (ex: http://10.124.2.25:9200 )username- MantisBT Search user.password- MantisBT Search password.
-
getMantisVersion
Get MantisBT version.- Returns:
- MantisBT version.
-
getIssue
Get issue by MantisBT id.- Parameters:
id- MantisBT id.- Returns:
- MantisBT issue.
-
getIssuesByInternalId
Get issue by Internal id. In normal case, only one issue should be found.- Parameters:
id- Internal id- Returns:
- MantisBT issues.
-
deleteIssue
Delete MantisBT issue.- Parameters:
id- MantisBT id.- Returns:
- True if the deletion is successful.
-
shouldBeReopened
public boolean shouldBeReopened(biz.futureware.mantisconnect.IssueData issue) Determine if the ticket should be reopened.- Parameters:
issue- Issue to verify.- Returns:
- True if the issue should be reopened.
-
reopenTicket
Reopen a ticket.- Parameters:
id- Ticket id.- Returns:
- True if the ticket has been reopened.
-
addComment
Add a note to a ticket.- Parameters:
id- Ticket id.comment- Comment to add.- Returns:
- Comment id.
-
createIssue
Create a MantisBT issue from vulnerability.- Parameters:
vulnerability- Vulnerability to create.- Returns:
- ID of the created ticket.
-