Package org.opennms.netmgt.ticketd
Class OSGiBasedTicketerPlugin
- java.lang.Object
-
- org.opennms.netmgt.ticketd.OSGiBasedTicketerPlugin
-
-
Constructor Summary
Constructors Constructor Description OSGiBasedTicketerPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ticket
get(java.lang.String ticketId)
DAO like get method to be implemented by HelpDesk specific plugin.Plugin
getTicketerPlugin()
Retrieves the plugin that is currently registered.void
registerTicketerPlugin(Plugin plugin, java.util.Map<java.lang.String,java.lang.String> attributes)
Registers thePlugin
use.void
saveOrUpdate(Ticket ticket)
DAO like saveOrUpdate method to be implemented by HelpDesk specific plugin.boolean
unregisterTicketerPlugin(Plugin plugin, java.util.Map<java.lang.String,java.lang.String> attributes)
Unregisters a previously registeredPlugin
use.
-
-
-
Method Detail
-
get
public Ticket get(java.lang.String ticketId) throws PluginException
Description copied from interface:Plugin
DAO like get method to be implemented by HelpDesk specific plugin.- Specified by:
get
in interfacePlugin
- Parameters:
ticketId
- aString
object.- Returns:
- a
Ticket
object. - Throws:
PluginException
- if any.
-
saveOrUpdate
public void saveOrUpdate(Ticket ticket) throws PluginException
Description copied from interface:Plugin
DAO like saveOrUpdate method to be implemented by HelpDesk specific plugin.- Specified by:
saveOrUpdate
in interfacePlugin
- Parameters:
ticket
- aTicket
object.- Throws:
PluginException
- if any.
-
registerTicketerPlugin
public void registerTicketerPlugin(Plugin plugin, java.util.Map<java.lang.String,java.lang.String> attributes)
Registers thePlugin
use. Only the first registered plugin will be used. This method is called by the OSGi Service Registry when a service implementing thePlugin
interface is registered.- Parameters:
plugin
- the pluginattributes
- service-level attributes for the plugin
-
unregisterTicketerPlugin
public boolean unregisterTicketerPlugin(Plugin plugin, java.util.Map<java.lang.String,java.lang.String> attributes) throws java.lang.Exception
Unregisters a previously registeredPlugin
use. This method is called by the OSGi Service Registry when a service implementing thePlugin
interface is unregistered.- Parameters:
plugin
- the pluginattributes
- service-level attributes for the plugin- Returns:
- true if the plugin was previously in use, false otherwise
- Throws:
java.lang.Exception
-
getTicketerPlugin
public Plugin getTicketerPlugin() throws PluginException
Retrieves the plugin that is currently registered. If no plugin is currently registered, this full will throw aPluginException
instead of returning null.- Returns:
- the currently registered plugin
- Throws:
PluginException
- when no plugin is currently registered
-
-