/** * Makes call to API to close a trouble ticket associated with an OnmsAlarm. * @param e An OpenNMS event. * @throws InsufficientInformationException */ private void handleCloseTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.closeTicketForAlarm(alarmId, ticketId); }
/** * Makes call to API to close a trouble ticket associated with an OnmsAlarm. * @param e An OpenNMS event. * @throws InsufficientInformationException */ private void handleCloseTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.closeTicketForAlarm(alarmId, ticketId); }
/** * Makes call to API to Cancel a Trouble Ticket associated with an OnmsAlarm. * @param e * @throws InsufficientInformationException */ private void handleCancelTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.cancelTicketForAlarm(alarmId, ticketId); }
/** * Make call to API to Update a trouble ticket with new data from an OnmsAlarm. * @param e An OpenNMS Event * @throws InsufficientInformationException */ private void handleUpdateTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.updateTicketForAlarm(alarmId, ticketId); }
/** * Make call to API to Update a trouble ticket with new data from an OnmsAlarm. * @param e An OpenNMS Event * @throws InsufficientInformationException */ private void handleUpdateTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.updateTicketForAlarm(alarmId, ticketId); }
/** * Makes call to API to Cancel a Trouble Ticket associated with an OnmsAlarm. * @param e * @throws InsufficientInformationException */ private void handleCancelTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); EventUtils.requireParm(e, EventConstants.PARM_TROUBLE_TICKET); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); String ticketId = EventUtils.getParm(e, EventConstants.PARM_TROUBLE_TICKET); m_ticketerServiceLayer.cancelTicketForAlarm(alarmId, ticketId); }
/** * Make call to API to Create a new Trouble Ticket to be associated with an OnmsAlarm. * @param e An OpenNMS Event * @throws InsufficientInformationException */ private void handleCreateTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); Map<String,String> attributes = new HashMap<String, String>(); for (final Parm parm: e.getParmCollection()) { attributes.put(parm.getParmName(), parm.getValue().getContent()); } m_ticketerServiceLayer.createTicketForAlarm(alarmId,attributes); }
/** * Make call to API to Create a new Trouble Ticket to be associated with an OnmsAlarm. * @param e An OpenNMS Event * @throws InsufficientInformationException */ private void handleCreateTicket(Event e) throws InsufficientInformationException { EventUtils.requireParm(e, EventConstants.PARM_ALARM_ID); EventUtils.requireParm(e, EventConstants.PARM_ALARM_UEI); EventUtils.requireParm(e, EventConstants.PARM_USER); int alarmId = EventUtils.getIntParm(e, EventConstants.PARM_ALARM_ID, 0); Map<String,String> attributes = new HashMap<String, String>(); for (final Parm parm: e.getParmCollection()) { attributes.put(parm.getParmName(), parm.getValue().getContent()); } m_ticketerServiceLayer.createTicketForAlarm(alarmId,attributes); }