Package org.opennms.netmgt.rt
Class RequestTracker
- java.lang.Object
-
- org.opennms.netmgt.rt.RequestTracker
-
public class RequestTracker extends Object
-
-
Constructor Summary
Constructors Constructor Description RequestTracker(String baseURL, String username, String password, int timeout, int retries, boolean useSystemProxy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongcreateTicket(RTTicket ticket)HttpClientWrappergetClientWrapper()RTQueuegetFirstPublicQueueForUser(String username)RTQueuegetQueue(long id)List<RTQueue>getQueuesForUser(String username)RTTicketgetTicket(Long ticketId, boolean getTextAttachment)List<RTTicket>getTicketsForQueue(String queueName, long limit)RTUsergetUserInfo(String username)StringgetUsername()protected Map<String,String>parseResponseStream(InputStream responseStream)LongpostEdit(org.apache.http.client.methods.HttpPost post, String content, Pattern pattern)voidsetPassword(String password)voidsetUsername(String user)StringtoString()LongupdateTicket(Long id, String content)
-
-
-
Method Detail
-
createTicket
public Long createTicket(RTTicket ticket) throws RequestTrackerException
- Throws:
RequestTrackerException
-
updateTicket
public Long updateTicket(Long id, String content) throws RequestTrackerException
- Throws:
RequestTrackerException
-
postEdit
public Long postEdit(org.apache.http.client.methods.HttpPost post, String content, Pattern pattern) throws RequestTrackerException
- Throws:
RequestTrackerException
-
getTicket
public RTTicket getTicket(Long ticketId, boolean getTextAttachment) throws RequestTrackerException
- Throws:
RequestTrackerException
-
getFirstPublicQueueForUser
public RTQueue getFirstPublicQueueForUser(String username) throws RequestTrackerException
- Throws:
RequestTrackerException
-
getQueuesForUser
public List<RTQueue> getQueuesForUser(String username) throws RequestTrackerException
- Throws:
RequestTrackerException
-
getQueue
public RTQueue getQueue(long id) throws RequestTrackerException
- Throws:
RequestTrackerException
-
parseResponseStream
protected Map<String,String> parseResponseStream(InputStream responseStream) throws IOException
- Throws:
IOException
-
getClientWrapper
public HttpClientWrapper getClientWrapper()
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String user)
-
setPassword
public void setPassword(String password)
-
-