protected String buildTitle(NexusArtifactEvent event) { return event.getAction(); }
protected String buildDescriptionMsgAction(NexusArtifactEvent event) { StringBuilder msg = new StringBuilder(" was "); if (NexusArtifactEvent.ACTION_CACHED.equals(event.getAction())) { msg.append("cached from remote URL ").append(event.getNexusItemInfo().getRemoteUrl()).append("."); else if (NexusArtifactEvent.ACTION_DEPLOYED.equals(event.getAction())) { msg.append("deployed."); else if (NexusArtifactEvent.ACTION_DELETED.equals(event.getAction())) { msg.append("deleted."); else if (NexusArtifactEvent.ACTION_RETRIEVED.equals(event.getAction())) { msg.append("served downstream."); else if (NexusArtifactEvent.ACTION_BROKEN.equals(event.getAction())) { msg.append("broken."); else if (NexusArtifactEvent.ACTION_BROKEN_WRONG_REMOTE_CHECKSUM.equals(event.getAction())) { msg.append("proxied, and the remote repository contains wrong checksum for it.");
public void addNexusArtifactEvent(NexusArtifactEvent nae) { Map<String, String> map = new HashMap<String, String>(); map.put(REPOSITORY, nae.getNexusItemInfo().getRepositoryId()); map.put(REPOSITORY_PATH, nae.getNexusItemInfo().getPath()); if (nae.getNexusItemInfo().getRemoteUrl() != null) { map.put(REMOTE_URL, nae.getNexusItemInfo().getRemoteUrl()); } putContext(map, CTX_PREFIX, nae.getEventContext()); putContext(map, ATR_PREFIX, nae.getItemAttributes()); if (nae.getMessage() != null) { map.put(MESSAGE, nae.getMessage()); } map.put(DATE, getDateFormat().format(nae.getEventDate())); map.put(ACTION, nae.getAction()); addToTimeline(map, REPO_EVENT_TYPE, nae.getAction()); }