public class HttpBugzillaSession extends AbstractHttpSession
| Modifier and Type | Class and Description |
|---|---|
protected class |
HttpBugzillaSession.BugzillaBugIterator
Implementation of a bug iterator.
|
protected class |
HttpBugzillaSession.XmlParser
Does the actual meat by parsing the XML response.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
BUGZILLA_GET_ATTACHMENT
Constant for requesting URL connection to get attachment content
|
static int |
BUGZILLA_LOGIN
Constant for requesting URL connection to login page
|
static int |
BUGZILLA_LOGOUT
Constant for requesting URL connection to logout page
|
static int |
BUGZILLA_SEARCH
Constant for requesting URL connection to search result page
|
static int |
BUGZILLA_SHOW_BUG
Constant for requesting URL connection to show bug page
|
protected static String[] |
PAGES
The URL paths to the Bugzilla pages
|
| Constructor and Description |
|---|
HttpBugzillaSession()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the previously established Bugzilla session.
|
InputStream |
getAttachment(Attachment attachment)
Returns an input stream that will contain the attachment's content.
|
protected HttpURLConnection |
getConnection(int bugzillaPage)
Makes a request to Bugzilla without any GET parameters.
|
protected HttpURLConnection |
getConnection(int bugzillaPage,
String getParams)
Makes a request to Bugzilla including eventual GET parameters.
|
static UrlParameters |
getDefaultSearchParameters()
Returns default search parameters.
|
Issue |
getIssue(String id)
Returns the given issue
|
String |
getMaximumBugzillaVersion()
Returns the maximum Bugzilla version this session class supports.
|
String |
getMinimumBugzillaVersion()
Returns the minimum Bugzilla version this session class supports.
|
boolean |
open()
Opens the session with configured Bugzilla instance.
|
Iterator<Issue> |
searchBugs(SearchData searchData,
SearchResultCountCallback callback)
Performs a search for Bugzilla bugs.
|
addCookie, applyCookies, configure, debugResponse, dump, getBaseUrl, getBugzillaVersion, getConnection, getConnection, getConnection, getCookies, getProxy, getProxyAuthorizationCallback, isLoggedIn, retrieveCookies, setBaseUrl, setBugzillaVersion, setLoggedIn, setProxy, setProxyAuthorizationCallbackcheckBugzillaVersion, createIssue, getAuthorizationCallback, getBugzillaBugClass, getLog, getLogin, getPassword, setAuthorizationCallback, setBugzillaBugClasspublic static final int BUGZILLA_LOGIN
public static final int BUGZILLA_SEARCH
public static final int BUGZILLA_LOGOUT
public static final int BUGZILLA_SHOW_BUG
public static final int BUGZILLA_GET_ATTACHMENT
protected static final String[] PAGES
public String getMinimumBugzillaVersion()
MINIMUM_BUGZILLA_VERSIONpublic String getMaximumBugzillaVersion()
MAXIMUM_BUGZILLA_VERSIONpublic boolean open()
public void close()
close in interface Sessionclose in class AbstractHttpSessionpublic Issue getIssue(String id)
id - id of issuepublic InputStream getAttachment(Attachment attachment) throws IOException
attachment - attachment to retrieve.IOException - when the IO stream cannot be createdpublic Iterator<Issue> searchBugs(SearchData searchData, SearchResultCountCallback callback)
Iterator.next()
method is made. A separate thread will then be spawned to retrieve the
required details.searchData - - all search parameterscallback - - a callback object that will retrieve the number of bugs
found for this searchprotected HttpURLConnection getConnection(int bugzillaPage)
bugzillaPage - - ID of page to make the request to.protected HttpURLConnection getConnection(int bugzillaPage, String getParams)
bugzillaPage - - ID of page to make the request topublic static UrlParameters getDefaultSearchParameters()
Copyright © 2012. All Rights Reserved.