|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
defines methods to query bugs. This class contains two different and important groups of methods:
The methods that modify bugs in database are:
Methods for addition
Bug, SystemQuery| Method Summary | |
void |
addBug(Bug bug)
adds a new bug to the database. |
void |
addBugAttach(Attachment attach)
Adds an attachment to a bug. |
void |
addBugComment(int bugId,
int userId,
java.lang.String comment)
adds a comment to the bug. |
void |
addBugWithComment(Bug bug,
java.lang.String comment)
adds a bug with comment as the first long description of the bug. |
void |
changeBugPriority(int profile,
int bugId,
java.lang.String pri,
java.lang.String comment)
changes the priority of a bug. |
void |
changeBugSeverity(int profile,
int bugId,
java.lang.String sev,
java.lang.String comment)
changes the severity of a bug. |
void |
changeBugStatus(int profile,
int bugId,
java.lang.String status,
int asignee)
changes the status of a bug. |
java.util.List |
getAllBugs()
gets a list of all bugs in database. |
Bug |
getBugById(int id)
gets the bug with the given id. |
int |
getBugCountForComponent(java.lang.String component)
gets the total ammount of bugs for the given component. |
int |
getBugCountQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo)
Deprecated. see getBugCountQuery(String, String, String , String , Date , Date , String , String , String , String , int , int ) |
int |
getBugCountQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo,
int reportedBy)
|
int |
getBugCountWithStatus(java.lang.String status)
return the ammount of bugs with given status. |
java.util.List |
getBugsAssignedTo(int userid)
gets all bugs that are assigned to the specified user |
java.util.List |
getBugsForComponent(Component component)
gets all bugs for the specified component |
java.util.List |
getBugsForMilestone(Milestone milestone)
gets all bugs for the specified milestone |
java.util.List |
getBugsForProduct(Product product)
gets all bugs for the specified product. |
java.util.List |
getBugsForVersion(Version version)
gets all bugs for the specified version |
java.util.List |
getBugsQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo,
int reportedBy)
gets all bugs that match the criteria. |
java.util.List |
getBugsReportedBy(int userid)
gets all bugs reported by the specified user. |
java.util.List |
getBugsSince(java.util.Date since)
gets a list of bugs created after since |
java.util.List |
getCcList(int bugId)
returns the cc list of a given bug. |
java.util.List |
getLastBugs(int count)
gets the latest bugs. |
SystemQuery |
getSystemQuery()
gets an instance of SystemQuery with configuration of current implementation. |
int |
getTotalBugCount()
return the total ammount of bugs in database. |
void |
removeBug(int id)
removes the bug with the given id |
void |
resolveBug(int profile,
int bugId,
java.lang.String resolution,
int dupeId)
resolves a bug. |
void |
updateBug(Bug bug)
updates the bug. |
| Method Detail |
public java.util.List getLastBugs(int count)
throws JagzillaException
count - ammunt of bugs to be retrived.
JagzillaExceptionBug
public java.util.List getBugsAssignedTo(int userid)
throws JagzillaException,
NoSuchProfileException
userid - id of the user
JagzillaException - if an error occurs
NoSuchProfileException - if the userid cannot be foundBug
public java.util.List getBugsReportedBy(int userid)
throws JagzillaException,
NoSuchProfileException
userid - the user id
JagzillaException - if an error occurs
NoSuchProfileException - if the user cannot be found
public int getTotalBugCount()
throws JagzillaException
JagzillaException
public Bug getBugById(int id)
throws JagzillaException,
NoSuchBugException
id - the id of the bug to search for
JagzillaException - if an error occurs
NoSuchBugException - if there is no bug with the given idBug
public int getBugCountWithStatus(java.lang.String status)
throws JagzillaException
getBugConuntQuery(null, status, null).
status - the status to search
JagzillaException - if an error occurs
public int getBugCountForComponent(java.lang.String component)
throws JagzillaException
component -
JagzillaException
public int getBugCountQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo)
throws JagzillaException
product - component - version - milestone - creationFrom - creation date from which to search bugscreationTo - creation date to which to search bugspriority - severity - status - resolution - assignedTo -
JagzillaException
public int getBugCountQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo,
int reportedBy)
throws JagzillaException
JagzillaException
public java.util.List getBugsQuery(java.lang.String product,
java.lang.String component,
java.lang.String version,
java.lang.String milestone,
java.util.Date creationFrom,
java.util.Date creationTo,
java.lang.String priority,
java.lang.String severity,
java.lang.String status,
java.lang.String resolution,
int assignedTo,
int reportedBy)
throws JagzillaException,
NoSuchProductException,
NoSuchComponentException,
NoSuchVersionException,
NoSuchMilestoneException,
NoSuchReporterException,
NoSuchAsigneeException,
BadStatusException,
BadPriorityException,
BadSeverityException,
DateInFutureException
product - component - version - milestone - creationFrom - creationTo - priority - severity - status - resolution - assignedTo - reportedBy -
JagzillaException
NoSuchProductException
NoSuchComponentException
NoSuchVersionException
NoSuchMilestoneException
NoSuchReporterException
NoSuchAsigneeException
BadStatusException
BadPriorityException
BadSeverityException
DateInFutureException
public java.util.List getBugsForProduct(Product product)
throws JagzillaException
product -
JagzillaException - if an error occurs
public java.util.List getBugsForComponent(Component component)
throws JagzillaException
component -
JagzillaException - if an error occurs
public java.util.List getBugsForMilestone(Milestone milestone)
throws JagzillaException
milestone -
JagzillaException - if an error occurs
public java.util.List getBugsForVersion(Version version)
throws JagzillaException
version -
JagzillaException - if an error occurs
public java.util.List getBugsSince(java.util.Date since)
throws JagzillaException,
DateInFutureException
since
since - Date of creation bugs
Bug opened after since date
JagzillaException - if an error occurs
DateInFutureException - if the since parameter refences a future date
public java.util.List getAllBugs()
throws JagzillaException
Bug
JagzillaException - if an error occursBug
public void addBug(Bug bug)
throws JagzillaException,
NoSuchProductException,
NoSuchComponentException,
NoSuchReporterException,
NoSuchAsigneeException,
NoSuchVersionException,
NoSuchMilestoneException,
ComponentNotUniqueException,
ProductComponentRelationException,
InconsistencyException
bug - the bug to add
JagzillaException - if an error occurs
InconsistencyException - if there are no products in database or there are no components for specified product
NoSuchProductException - if the product specified is not null and cannot be found
NoSuchComponentException - if the component specified is not null and cannot be found
NoSuchReporterException - if the reporter specified is not null and cannot be found
NoSuchAsigneeException - if the asignee specified is not null and cannot be found
NoSuchVersionException - if the version specified is not null and cannot be found
NoSuchMilestoneException - if the milestone specified is not null and cannot be found
ComponentNotUniqueException - if the product is null, and the component name specified appears more than once
ProductComponentRelationException - if the component is not null and the product is not null and the component is not related to that product
public void addBugWithComment(Bug bug,
java.lang.String comment)
throws JagzillaException,
NoSuchProductException,
NoSuchComponentException
comment as the first long description of the bug.
The userid of the comment is taken from the reporter. This methos is equivalent to
call:
addBug(bug);
addBugComment(bug.getId(), bug.getReporter(), comment);
bug - comment -
JagzillaException
NoSuchProductException
NoSuchComponentException
public void addBugComment(int bugId,
int userId,
java.lang.String comment)
throws JagzillaException,
NoSuchBugException,
NoSuchProfileException
bugId - the bug id to which the comment will be added.userId - id of the profile requesting the operationcomment - comment to add
JagzillaException - if an error occurs
NoSuchBugException - if the bugId did not retrive an existent bug
NoSuchProfileException - if the profileId cannot be found
public void addBugAttach(Attachment attach)
throws JagzillaException,
NoSuchBugException,
NoSuchProfileException
attach - the attachment to add
JagzillaException - if an error occurs
NoSuchBugException - if the bugId did not retrive an existent bug
NoSuchProfileException - if the userId did not retrive an existent profileAttachment
public void removeBug(int id)
throws JagzillaException,
NoSuchBugException
id - if of the bug to remove
JagzillaException - if an error occurs
NoSuchBugException - if the bug cannot be found
public void updateBug(Bug bug)
throws JagzillaException,
NoSuchProductException,
NoSuchComponentException,
NoSuchReporterException,
NoSuchAsigneeException,
NoSuchVersionException,
NoSuchMilestoneException
bug - bug with new data
JagzillaException - if an error occurs
NoSuchProductException - if the product specified is not null and cannot be found
NoSuchComponentException - if the component specified is not null and cannot be found
NoSuchReporterException - if the reporter specified is not null and cannot be found
NoSuchAsigneeException - if the asignee specified is not null and cannot be found
NoSuchVersionException - if the version specified is not null and cannot be found
NoSuchMilestoneException - if the milestone specified is not null and cannot be found
public void changeBugStatus(int profile,
int bugId,
java.lang.String status,
int asignee)
throws JagzillaException,
NoSuchBugException,
NoSuchProfileException
Bug.STATUS_RESOLVED
the application should also call resolveBug in order to specify the
resolution the bug is assigned.
profile - id of the user requesting the actionbugId - id of the bug to changeasignee - id of the user the bug is assigned to only if the status is ASSIGNED, this value is ignored in other statuses.status - new value for the status fiedl, must be in Bug.STATUS_ARR
JagzillaException - if an error occurs
NoSuchBugException - if the bug cannot be found
NoSuchProfileException - if the profile cannot be found or status is assigned and the asignee profile cannot be found
BadStatusException - if the status is not a constant value in the Bug classresolveBug(int, int, String, int)
public void changeBugPriority(int profile,
int bugId,
java.lang.String pri,
java.lang.String comment)
throws JagzillaException,
NoSuchBugException,
NoSuchProfileException,
BadPriorityException
profile - id of user requesting the operationbugId - if of bug to change prioritypri - new priority. must be defined in Bugcomment - optional comment to add. can be null
JagzillaException - if an error occurs
NoSuchBugException - if the bug with given id cannot be found
NoSuchProfileException - if the profile with given id cannot be found
BadPriorityException - if priority is not a Bug constantBug
public void changeBugSeverity(int profile,
int bugId,
java.lang.String sev,
java.lang.String comment)
throws JagzillaException,
NoSuchBugException,
NoSuchProfileException,
BadSeverityException
profile - id of user requesting the operationbugId - if of bug to change prioritysev - new severity. must be defined in Bugcomment - optional comment to add. can be null
JagzillaException - if an error occurs
NoSuchBugException - if the bug with given id cannot be found
NoSuchProfileException - if the profile with given id cannot be found
BadSeverityException - if severity is not a Bug constantBug
public void resolveBug(int profile,
int bugId,
java.lang.String resolution,
int dupeId)
throws JagzillaException,
NoSuchBugException,
BadResolutionException
changeBugStatus.
If the bug is not in Bug.STATUS_RESOLVED this method
will invoke changeBugStatus to make the bug status resolved.
Notice however, that this will not work in all cases, since when a bug is initially resolved
it can be changed the resolution many times and the record of resolution change will not
be added since bug.getStatus() will report
Bug.STATUS_RESOLVED.
profile - id of the user requesting the actionbugId - id of the bug to changeresolution - resolution to set. must be a constant value in BugdupeId - if of duplicate-of bug. This field is only meaningfull is resolutions is RESOLUTION_DUPLICATE. It's value is ignored on other cases.
JagzillaException - if an error occurs
NoSuchBugException - if the bug cannot be found, or if resolution is duplicate and dupeId cannot be found
BadResolutionException - if the resolution is not a constant of the Bug classchangeBugStatus(int, int, String, int)
public java.util.List getCcList(int bugId)
throws JagzillaException,
NoSuchBugException
bugId - the id of the bug to search the cc list for.
List of Profile
JagzillaException - if an error occurs
InconsistencyException - if a profile is not found in profiles tables with the id given in cc table
NoSuchBugException - if the bug id cannot be foundProfile,
SystemQuery.addCc(int,int),
SystemQuery.removeCc(int,int)
public SystemQuery getSystemQuery()
throws JagzillaException
JagzillaException - if an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||