/** {@inheritDoc} */ @Override public Ticket get(String ticketId) { Ticket ticket = new Ticket(); ticket.setId("Ticketing not configured"); return ticket; }
/** {@inheritDoc} */ @Override public Ticket get(String ticketId) { Ticket ticket = new Ticket(); ticket.setId("Ticketing not configured"); return ticket; }
private void save(Ticket newTicket) throws PluginException { HPD_IncidentInterface_Create_WSPortTypePortType port = getCreateTicketServicePort(m_createportname,m_createendpoint); try { String incident_number = port.helpDesk_Submit_Service(getRemedyAuthenticationHeader(), getRemedyCreateInputMap(newTicket)).getIncident_Number(); LOG.debug("created new remedy ticket with reported incident number: {}", incident_number); newTicket.setId(incident_number); } catch (RemoteException e) { e.printStackTrace(); throw new PluginException("Problem saving ticket", e); } }
opennmsTicket.setId(otrsTicket.getTicketID().toString()); opennmsTicket.setSummary(otrsTicket.getTitle());
newTicket.setId(newTicketID);
newTicket.setId(newTicketID);
/** * {@inheritDoc} * * Gets ticket details from the RT trouble ticket system */ @Override public Ticket get(final String ticketId) throws PluginException { Ticket ticket = null; RTTicket rtt = null; try { rtt = m_requestTracker.getTicket(Long.valueOf(ticketId), false); } catch (final RequestTrackerException e) { throw new PluginException(e); } if (rtt != null) { ticket = new Ticket(); ticket.setState(rtToOpenNMSState(rtt.getStatus())); ticket.setId(rtt.getId().toString()); ticket.setUser(StringUtils.join(rtt.getRequestors(), ", ")); ticket.setSummary(rtt.getSubject()); ticket.setDetails(rtt.getText()); } else { throw new PluginException("could not find ticket in RT for Ticket: " + ticketId); } return ticket; }
private Ticket getInternal(String ticketId, JiraRestClient jira) throws PluginException { // w00t Issue issue; try { issue = jira.getIssueClient().getIssue(ticketId).get(); } catch (InterruptedException|ExecutionException e) { throw new PluginException("Failed to get issue with id: " + ticketId, e); } if (issue != null) { Ticket ticket = new Ticket(); ticket.setId(issue.getKey()); ticket.setModificationTimestamp(String.valueOf(issue.getUpdateDate().toDate().getTime())); ticket.setSummary(issue.getSummary()); ticket.setDetails(issue.getDescription()); ticket.setState(getStateFromStatusName(issue.getStatus().getName())); return ticket; } else { return null; } }
/** * {@inheritDoc} * * Gets ticket details from the RT trouble ticket system */ @Override public Ticket get(final String ticketId) throws PluginException { Ticket ticket = null; RTTicket rtt = null; try { rtt = m_requestTracker.getTicket(Long.valueOf(ticketId), false); } catch (final RequestTrackerException e) { throw new PluginException(e); } if (rtt != null) { ticket = new Ticket(); ticket.setState(rtToOpenNMSState(rtt.getStatus())); ticket.setId(rtt.getId().toString()); ticket.setUser(StringUtils.join(rtt.getRequestors(), ", ")); ticket.setSummary(rtt.getSubject()); ticket.setDetails(rtt.getText()); } else { throw new PluginException("could not find ticket in RT for Ticket: " + ticketId); } return ticket; }
private Ticket getInternal(String ticketId, JiraRestClient jira) throws PluginException { // w00t Issue issue; try { issue = jira.getIssueClient().getIssue(ticketId).get(); } catch (InterruptedException|ExecutionException e) { throw new PluginException("Failed to get issue with id: " + ticketId, e); } if (issue != null) { Ticket ticket = new Ticket(); ticket.setId(issue.getKey()); ticket.setModificationTimestamp(String.valueOf(issue.getUpdateDate().toDate().getTime())); ticket.setSummary(issue.getSummary()); ticket.setDetails(issue.getDescription()); ticket.setState(getStateFromStatusName(issue.getStatus().getName())); return ticket; } else { return null; } }
LOG.info("get: found ticket: {} status: {}", ticketId, outputmap.getStatus().getValue()); LOG.info("get: found ticket: {} urgency: {}", ticketId, outputmap.getUrgency().getValue()); opennmsTicket.setId(ticketId); opennmsTicket.setSummary(outputmap.getSummary()); opennmsTicket.setDetails(outputmap.getNotes());
newTicket.setId(String.valueOf(idAndNumber.getTicketNumber()));
/** * Called from API implemented method after successful retrieval of Alarm. * * @param alarm OpenNMS Model class alarm * @param attributes * @return OpenNMS Ticket with contents of alarm. * TODO: Add alarm attributes to Ticket. * TODO: Add alarmid to Ticket class for ability to reference back to Alarm (waffling on this * since ticket isn't a persisted object and other reasons) */ protected Ticket createTicketFromAlarm(OnmsAlarm alarm, Map<String, String> attributes) { Ticket ticket = new Ticket(); ticket.setSummary(alarm.getLogMsg()); ticket.setDetails(alarm.getDescription()); ticket.setId(alarm.getTTicketId()); ticket.setAlarmId(alarm.getId()); ticket.setNodeId(alarm.getNodeId()); ticket.setIpAddress(alarm.getIpAddr()); ticket.setAttributes(attributes); if (attributes.containsKey("user")) ticket.setUser(attributes.get("user")); return ticket; }
/** * Called from API implemented method after successful retrieval of Alarm. * * @param alarm OpenNMS Model class alarm * @param attributes * @return OpenNMS Ticket with contents of alarm. * TODO: Add alarm attributes to Ticket. * TODO: Add alarmid to Ticket class for ability to reference back to Alarm (waffling on this * since ticket isn't a persisted object and other reasons) */ protected Ticket createTicketFromAlarm(OnmsAlarm alarm, Map<String, String> attributes) { Ticket ticket = new Ticket(); ticket.setSummary(alarm.getLogMsg()); ticket.setDetails(alarm.getDescription()); ticket.setId(alarm.getTTicketId()); ticket.setAlarmId(alarm.getId()); ticket.setNodeId(alarm.getNodeId()); ticket.setIpAddress(alarm.getIpAddr()); ticket.setAttributes(attributes); if (attributes.containsKey("user")) ticket.setUser(attributes.get("user")); return ticket; }
opennmsTicket.setId(ticketWithArticles.getTicket().getTicketNumber().toString()); opennmsTicket.setSummary(ticketWithArticles.getTicket().getTitle());
ticket.setId(incidentKey.getTICKETID().getValue());
ticket.setId(incidentKey.getTICKETID().getValue());
ticket.setId(createdIssue.getKey());
newTicket.setId(response.getTicketID().toString());
ticket.setId(createdIssue.getKey());