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 Ticketget(String ticketId)DAO like get method to be implemented by HelpDesk specific plugin.PlugingetTicketerPlugin()Retrieves the plugin that is currently registered.voidregisterTicketerPlugin(Plugin plugin, Map<String,String> attributes)Registers thePluginuse.voidsaveOrUpdate(Ticket ticket)DAO like saveOrUpdate method to be implemented by HelpDesk specific plugin.booleanunregisterTicketerPlugin(Plugin plugin, Map<String,String> attributes)Unregisters a previously registeredPluginuse.
-
-
-
Method Detail
-
get
public Ticket get(String ticketId) throws PluginException
Description copied from interface:PluginDAO like get method to be implemented by HelpDesk specific plugin.- Specified by:
getin interfacePlugin- Parameters:
ticketId- aStringobject.- Returns:
- a
Ticketobject. - Throws:
PluginException- if any.
-
saveOrUpdate
public void saveOrUpdate(Ticket ticket) throws PluginException
Description copied from interface:PluginDAO like saveOrUpdate method to be implemented by HelpDesk specific plugin.- Specified by:
saveOrUpdatein interfacePlugin- Parameters:
ticket- aTicketobject.- Throws:
PluginException- if any.
-
registerTicketerPlugin
public void registerTicketerPlugin(Plugin plugin, Map<String,String> attributes)
Registers thePluginuse. Only the first registered plugin will be used. This method is called by the OSGi Service Registry when a service implementing thePlugininterface is registered.- Parameters:
plugin- the pluginattributes- service-level attributes for the plugin
-
unregisterTicketerPlugin
public boolean unregisterTicketerPlugin(Plugin plugin, Map<String,String> attributes) throws Exception
Unregisters a previously registeredPluginuse. This method is called by the OSGi Service Registry when a service implementing thePlugininterface is unregistered.- Parameters:
plugin- the pluginattributes- service-level attributes for the plugin- Returns:
- true if the plugin was previously in use, false otherwise
- Throws:
Exception
-
getTicketerPlugin
public Plugin getTicketerPlugin() throws PluginException
Retrieves the plugin that is currently registered. If no plugin is currently registered, this full will throw aPluginExceptioninstead of returning null.- Returns:
- the currently registered plugin
- Throws:
PluginException- when no plugin is currently registered
-
-