org.opennms.api.integration.ticketing
Class Ticket

java.lang.Object
  extended by org.opennms.api.integration.ticketing.Ticket

public class Ticket
extends java.lang.Object

OpenNMS Trouble Ticket Model class used to contain common ticket data by implementations of TicketerPlugin API.

Author:
Mathew Brozowski, David Hustace

Nested Class Summary
static class Ticket.State
          Enumeration for representation of a Ticket's state.
 
Constructor Summary
Ticket()
           
 
Method Summary
 void addAttribute(java.lang.String key, java.lang.String value)
          Adds a single free form attribute to the Ticket.
 java.lang.String getAttribute(java.lang.String key)
          Gets a single free form attribute from a Ticket.
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
           
 java.lang.String getDetails()
          TODO: This should probably turn into a collection of comments.
 java.lang.String getId()
          This should be the ticket ID assigned by the HelpDesk system.
 java.lang.String getModificationTimestamp()
          A timestamp to be used for optimistic locking with the trouble ticketing system
 Ticket.State getState()
          Returns the current Ticket.State
 java.lang.String getSummary()
          Returns a simple high level summary about the ticket that is generated from the Alarm logmsg.
 java.lang.String getUser()
          User name owning/createing the ticket.
 void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
          Store a list of free form attributes in the Ticket.
 void setDetails(java.lang.String details)
          TODO: This should probably turn into a collection of comments or some such thing.
 void setId(java.lang.String id)
          The TicketerPlugin should set the ID.
 void setModificationTimestamp(java.lang.String modificationTimestamp)
           
 void setState(Ticket.State state)
          Sets the Ticket state to one of the Ticket.State Enums.
 void setSummary(java.lang.String summary)
          Set a summary into the ticket.
 void setUser(java.lang.String user)
          Set the user name owning the ticket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ticket

public Ticket()
Method Detail

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns:
a Map of free from attributes of the ticket. Typically, from OnmsAlarm attributes.

setAttributes

public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Store a list of free form attributes in the Ticket. Typically, from the OnmsAlarm attributes.

Parameters:
attributes -

addAttribute

public void addAttribute(java.lang.String key,
                         java.lang.String value)
Adds a single free form attribute to the Ticket.

Parameters:
key -
value -

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Gets a single free form attribute from a Ticket.

Parameters:
key -
Returns:

getSummary

public java.lang.String getSummary()
Returns a simple high level summary about the ticket that is generated from the Alarm logmsg.

Returns:
A string containing the summary of the ticket.

setSummary

public void setSummary(java.lang.String summary)
Set a summary into the ticket. Typically the alarm's logmsg.

Parameters:
summary -

getDetails

public java.lang.String getDetails()
TODO: This should probably turn into a collection of comments.

Returns:
A string of details about the Ticket.

setDetails

public void setDetails(java.lang.String details)
TODO: This should probably turn into a collection of comments or some such thing.

Parameters:
details -

getId

public java.lang.String getId()
This should be the ticket ID assigned by the HelpDesk system.

Returns:

setId

public void setId(java.lang.String id)
The TicketerPlugin should set the ID.

Parameters:
id -

getUser

public java.lang.String getUser()
User name owning/createing the ticket. Will be set initially to the user name set in the parameter of the create ticket event.

Returns:
a String containing the user name that owns the ticket.

setUser

public void setUser(java.lang.String user)
Set the user name owning the ticket. Typically set by the TicketerServiceLayer implemenation as the user name parameter from the create ticket event.

Parameters:
user -

getState

public Ticket.State getState()
Returns the current Ticket.State

Returns:
the ticket state enum.

setState

public void setState(Ticket.State state)
Sets the Ticket state to one of the Ticket.State Enums.

Parameters:
state -

getModificationTimestamp

public java.lang.String getModificationTimestamp()
A timestamp to be used for optimistic locking with the trouble ticketing system

Returns:

setModificationTimestamp

public void setModificationTimestamp(java.lang.String modificationTimestamp)


Copyright © 2008. All Rights Reserved.