Package org.opennms.netmgt.ticketer.rt
Class RtTicketerPlugin
- java.lang.Object
-
- org.opennms.netmgt.ticketer.rt.RtTicketerPlugin
-
- All Implemented Interfaces:
Plugin
public class RtTicketerPlugin extends Object implements Plugin
OpenNMS Trouble Ticket Plugin API implementation for RT- Author:
- Jonathan Sartin, Benjamin Reed
-
-
Constructor Summary
Constructors Constructor Description RtTicketerPlugin()
Constructor for RtTicketerPlugin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ticket
get(String ticketId)
DAO like get method to be implemented by HelpDesk specific plugin.String
openNMSToRTState(Ticket.State state)
Convenience method for converting OpenNMS enumerated ticket states to RT status.Ticket.State
rtToOpenNMSState(String rtStatus)
Convenience method for converting RT ticket Status to OpenNMS enumerated ticket states.void
saveOrUpdate(Ticket newTicket)
DAO like saveOrUpdate method to be implemented by HelpDesk specific plugin.void
setPassword(String password)
setPasswordvoid
setUser(String user)
setUser
-
-
-
Method Detail
-
get
public Ticket get(String ticketId) throws PluginException
DAO like get method to be implemented by HelpDesk specific plugin. Gets ticket details from the RT trouble ticket system- Specified by:
get
in interfacePlugin
- Parameters:
ticketId
- aString
object.- Returns:
- a
Ticket
object. - Throws:
PluginException
- if any.
-
saveOrUpdate
public void saveOrUpdate(Ticket newTicket) throws PluginException
DAO like saveOrUpdate method to be implemented by HelpDesk specific plugin. Creates a new ticket (if none exists) or updates an existing ticket in the RT trouble ticket system. Ticket updates are currently limited to updating the ticket status only.- Specified by:
saveOrUpdate
in interfacePlugin
- Parameters:
newTicket
- aTicket
object.- Throws:
PluginException
- if any.
-
openNMSToRTState
public String openNMSToRTState(Ticket.State state)
Convenience method for converting OpenNMS enumerated ticket states to RT status.- Parameters:
state
- a validorg.opennms.netmgt.ticketd.Ticket.State
.- Returns:
- a String representing the RT Status of the ticket.
-
rtToOpenNMSState
public Ticket.State rtToOpenNMSState(String rtStatus)
Convenience method for converting RT ticket Status to OpenNMS enumerated ticket states.- Parameters:
rtStatus
- a valid RT status string- Returns:
- the converted
org.opennms.netmgt.ticketd.Ticket.State
-
-