X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fportalapp%2Fportal%2Fcontroller%2FTicketEventController.java;h=7a5196ca6e2294e74da76b21897ac7e51cee3aee;hb=23634dba70b166ad3c79b5eadfbd32b5375d44be;hp=222f4502a1ca288baf2f842aecded49d5539af03;hpb=4ba6a0f20a190030700917a6065a6779ca9d308f;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java index 222f4502..7a5196ca 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java @@ -33,13 +33,12 @@ import org.openecomp.portalapp.portal.domain.EPUser; import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse; import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum; import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; +import org.openecomp.portalapp.portal.service.TicketEventService; import org.openecomp.portalapp.portal.service.UserNotificationService; import org.openecomp.portalapp.portal.transport.EpNotificationItem; import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem; -import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties; import org.openecomp.portalapp.portal.utils.PortalConstants; import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; @@ -67,6 +66,9 @@ public class TicketEventController implements BasicAuthenticationController { @Autowired private UserNotificationService userNotificationService; + + @Autowired + private TicketEventService ticketEventService; private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(TicketEventController.class); @@ -106,6 +108,7 @@ public class TicketEventController implements BasicAuthenticationController { JsonNode event = ticketEventNotif.get("event"); JsonNode header = event.get("header"); JsonNode body = event.get("body"); + JsonNode application = ticketEventNotif.get("application"); epItem.setMsgDescription(body.toString()); Long eventDate = System.currentTimeMillis(); if (body.get("eventDate") != null) { @@ -114,7 +117,7 @@ public class TicketEventController implements BasicAuthenticationController { String eventSource = header.get("eventSource").asText(); epItem.setMsgSource(eventSource); String ticket = body.get("ticketNum").asText(); - String hyperlink = SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_SYSTEM_NOTIFICATION_URL)+eventSource+"num="+ticket; + String hyperlink = ticketEventService.getNotificationHyperLink(application, ticket, eventSource); if(body.get("notificationHyperlink")!=null){ hyperlink=body.get("notificationHyperlink").asText(); } @@ -201,7 +204,7 @@ public class TicketEventController implements BasicAuthenticationController { .split(","); List users = userNotificationService.getUsersByOrgIds(Arrays.asList(UserIds)); if(users==null||users.size()==0) - return "Invalid Attuid"; + return "Invalid Org User ID"; return null; }