net.sf.jagzilla
Interface SystemQuery

All Known Implementing Classes:
SystemQueryHibernateImpl

public interface SystemQuery

interface for all operations which are not directly related to bugs. This class defines methods for many administration operations.

Author:
mike
See Also:
BugQuery

Method Summary
 void addCc(int bugId, int profileId)
          adds a profile to the cc list of a bug.
 java.util.List getAllComponents()
          gets a list of all components in the system regardless of which product they belong to.
 BugQuery getBugQuery()
          gets an instance of the BugQuery with transport configuration of actual implementation.
 java.util.List getComponentNames(java.lang.String product)
          gets a list of component names.
 java.util.List getComponents(java.lang.String product)
          gets all components for a product.
 java.util.List getMilestoneNames(java.lang.String product)
          gets a list of milestone names for the given product.
 java.util.List getMilestones(java.lang.String product)
          gets all milestones for a given product.
 java.util.List getProductNames()
          gets a List of strings of product names in database.
 java.util.List getProducts()
          gets a List of Products in database.
 Profile getProfile(int userId)
          gets the profile for a given user id.
 java.util.List getProfiles()
          gets all profiles in database.
 int getUserId(java.lang.String login)
          gets the id of the user given it's login.
 java.util.List getVersionNames(java.lang.String product)
          gets a list of version names for a given product
 java.util.List getVersions(java.lang.String product)
          gets all versions for a given product.
 void removeCc(int bugId, int profileId)
          removes a profile from the cc list of a bug.
 

Method Detail

getProducts

public java.util.List getProducts()
                           throws JagzillaException
gets a List of Products in database.

Returns:
a List containing one entry (class Product) for each Product found
Throws:
JagzillaException - if an error occurs
See Also:
Product, Product

getProductNames

public java.util.List getProductNames()
                               throws JagzillaException
gets a List of strings of product names in database.

Returns:
a List containing one entry (class String) for each Product found
Throws:
JagzillaException - if an error occurs

getComponents

public java.util.List getComponents(java.lang.String product)
                             throws JagzillaException,
                                    NoSuchProductException
gets all components for a product.

Parameters:
product - the product for which components are queried
Returns:
a List of components
Throws:
NoSuchProductException - if the product specified in product cannot be found
JagzillaException - if an error occurs
See Also:
Component, Component

getAllComponents

public java.util.List getAllComponents()
                                throws JagzillaException
gets a list of all components in the system regardless of which product they belong to.

Returns:
Throws:
JagzillaException
See Also:
Component

getComponentNames

public java.util.List getComponentNames(java.lang.String product)
                                 throws JagzillaException,
                                        NoSuchProductException
gets a list of component names.

Parameters:
product -
Returns:
Throws:
JagzillaException
NoSuchProductException - if the product specified in product cannot be found

getVersions

public java.util.List getVersions(java.lang.String product)
                           throws JagzillaException,
                                  NoSuchProductException
gets all versions for a given product.

Parameters:
product - to query versions from
Returns:
a List containing Version
Throws:
NoSuchProductException - if the product specified in product cannot be found
JagzillaException - if an error occurs
See Also:
Version, Version

getVersionNames

public java.util.List getVersionNames(java.lang.String product)
                               throws JagzillaException,
                                      NoSuchProductException
gets a list of version names for a given product

Parameters:
product -
Returns:
Throws:
JagzillaException
NoSuchProductException - if the product specified in product cannot be found

getMilestones

public java.util.List getMilestones(java.lang.String product)
                             throws JagzillaException,
                                    NoSuchProductException
gets all milestones for a given product.

Parameters:
product - to query milestones from
Returns:
a List containing Milestones
Throws:
NoSuchProductException - if the product specified in product cannot be found
JagzillaException - if an error occurs
See Also:
Milestone

getMilestoneNames

public java.util.List getMilestoneNames(java.lang.String product)
                                 throws JagzillaException,
                                        NoSuchProductException
gets a list of milestone names for the given product.

Parameters:
product -
Returns:
Throws:
JagzillaException
NoSuchProductException - if the product specified in product cannot be found

getProfiles

public java.util.List getProfiles()
                           throws JagzillaException
gets all profiles in database.

Returns:
a List containing a Profile in each entry.
Throws:
JagzillaException - if an error occurs
See Also:
Profile

getProfile

public Profile getProfile(int userId)
                   throws JagzillaException,
                          NoSuchProfileException
gets the profile for a given user id.

Parameters:
userId -
Returns:
the Profile
Throws:
NoSuchProfileException - if the userid specified in userId cannot be found
JagzillaException - if an error occurs
See Also:
Profile

getUserId

public int getUserId(java.lang.String login)
              throws JagzillaException,
                     NoSuchProfileException,
                     InconsistencyException
gets the id of the user given it's login.

Parameters:
login - the user login to search
Returns:
the user id
Throws:
JagzillaException - if an error occurs
NoSuchProfileException - if there is no user with the specified login
InconsistencyException - if there is more than one user with the specified login

addCc

public void addCc(int bugId,
                  int profileId)
           throws JagzillaException,
                  NoSuchBugException,
                  NoSuchProfileException
adds a profile to the cc list of a bug.

Parameters:
bugId - id of the bug
profileId - id of the profile to be added to the cclist
Throws:
JagzillaException - if an error occurs
NoSuchBugException - if the bug cannot be found
NoSuchProfileException - if the profile id cannot be found

removeCc

public void removeCc(int bugId,
                     int profileId)
              throws JagzillaException,
                     NoSuchBugException,
                     NoSuchProfileException
removes a profile from the cc list of a bug.

Parameters:
bugId - id of the bug
profileId - id of the profile to be added to the cclist
Throws:
JagzillaException - if an error occurs
NoSuchBugException - if the bug cannot be found
NoSuchProfileException - if the profile id cannot be found

getBugQuery

public BugQuery getBugQuery()
                     throws JagzillaException
gets an instance of the BugQuery with transport configuration of actual implementation.

Returns:
an instance of BugQuery
Throws:
JagzillaException - if an error occurs
See Also:
BugQuery


Distributed under the GPL. By Miguel Griffa. See the Jagzilla project page for more info.