Package org.sonatype.nexus.timeline.feeds

Examples of org.sonatype.nexus.timeline.feeds.FeedEvent


          final Map<String, String> data = Maps.newHashMap(rec.getData());
          data.remove("_type");
          data.remove("_subType");
          data.remove("_link");
          data.remove("_author");
          final FeedEvent evt = new FeedEvent(
              rec.getType(),
              rec.getSubType(),
              new Date(rec.getTimestamp()),
              rec.getData().get("_author"), // nullable
              rec.getData().get("_link"), // nullable
View Full Code Here


          // "<br/>" );
          // stackTrace = stackTrace.replace( "\t", "&nbsp;&nbsp;&nbsp;&nbsp;" );
          // contentValue.append( "<br/>" ).append( stackTrace );
          // }

          final FeedEvent entry = new FeedEvent(
              "LOG", // ignored
              "ERROR_WARNING", // ignored
              new Date(), // TODO: timestamp from log file?
              null, // author "system"
              null, // no link (maybe log config? or support?)
              Maps.<String, String>newHashMap()
          );
          if (logLine.contains(" ERROR ")) {
            entry.setTitle("Error");
          }
          else if (logLine.contains(" WARN ")) {
            entry.setTitle("Warning");
          }
          entry.setContent(logLine);

          entries.add(entry);
          if (entries.size() > entriesToExtract) {
            entries.remove(0);
          }
View Full Code Here

  public void on(final NexusStartedEvent e) {
    final Map<String, String> data = Maps.newHashMap();
    putIfNotNull(data, "bootAction", "started");
    putIfNotNull(data, "nxVersion", systemStatusProvider.get().getVersion());
    putIfNotNull(data, "nxEdition", systemStatusProvider.get().getEditionShort());
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_SYSTEM,
        FeedRecorder.SYSTEM_BOOT,
        e.getEventDate(),
        null, // "system" is booting
        "/", // link to UI
View Full Code Here

  public void on(final NexusStoppedEvent e) {
    final Map<String, String> data = Maps.newHashMap();
    putIfNotNull(data, "bootAction", "stopped");
    putIfNotNull(data, "nxVersion", systemStatusProvider.get().getVersion());
    putIfNotNull(data, "nxEdition", systemStatusProvider.get().getEditionShort());
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_SYSTEM,
        FeedRecorder.SYSTEM_BOOT,
        e.getEventDate(),
        null, // "system" is booting
        "/", // link to UI
View Full Code Here

      changes.add(changed.getName());
    }
    final Map<String, String> data = Maps.newHashMap();
    putIfNotNull(data, "changes", changes.toString());
    putIfNotNull(data, "userId", event.getUserId());
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_SYSTEM,
        FeedRecorder.SYSTEM_CONFIG,
        event.getEventDate(),
        event.getUserId(),
        "/", // link to UI
View Full Code Here

      putIfNotNull(data, "userId", userId);
      putIfNotNull(data, "userIp",
          (String) fileItem.getResourceStoreRequest().getRequestContext().get(AccessManager.REQUEST_REMOTE_ADDRESS));
      putIfNotNull(data, "userUa",
          (String) fileItem.getResourceStoreRequest().getRequestContext().get(AccessManager.REQUEST_AGENT));
      final FeedEvent fe = new FeedEvent(
          FeedRecorder.FAMILY_ITEM,
          action,
          ievt.getEventDate(),
          userId,
          "/content/repositories/" + fileItem.getRepositoryId() + fileItem.getPath(), // link to item
View Full Code Here

      putIfNotNull(data, "userId", userId);
      putIfNotNull(data, "userIp",
          (String) fileItem.getResourceStoreRequest().getRequestContext().get(AccessManager.REQUEST_REMOTE_ADDRESS));
      putIfNotNull(data, "userUa",
          (String) fileItem.getResourceStoreRequest().getRequestContext().get(AccessManager.REQUEST_AGENT));
      final FeedEvent fe = new FeedEvent(
          FeedRecorder.FAMILY_ITEM,
          action,
          evt.getEventDate(),
          userId,
          "/content/repositories/" + fileItem.getRepositoryId() + fileItem.getPath(), // link to item
View Full Code Here

    putIfNotNull(data, "repoName", revt.getRepository().getName());
    // TODO: who changed it?
    //putIfNotNull(data, "user.id", userId);
    //putIfNotNull(data, "user.ip", userIp);
    //putIfNotNull(data, "user.ua", userAgent);
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_REPO,
        FeedRecorder.REPO_LSTATUS,
        revt.getEventDate(),
        null, // TODO: who changed it?
        "/", // link to UI
View Full Code Here

    putIfNotNull(data, "repoName", revt.getRepository().getName());
    // TODO: who changed it?
    //putIfNotNull(data, "user.id", userId);
    //putIfNotNull(data, "user.ip", userIp);
    //putIfNotNull(data, "user.ua", userAgent);
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_REPO,
        FeedRecorder.REPO_PSTATUS,
        revt.getEventDate(),
        null, // TODO: who changed it?
        "/", // link to UI
View Full Code Here

    putIfNotNull(data, "repoName", repository.getName());
    // TODO: who changed it?
    //putIfNotNull(data, "user.id", userId);
    //putIfNotNull(data, "user.ip", userIp);
    //putIfNotNull(data, "user.ua", userAgent);
    final FeedEvent fe = new FeedEvent(
        FeedRecorder.FAMILY_REPO,
        action,
        evt.getEventDate(),
        null, // TODO: who changed it?
        "/", // link to UI
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.timeline.feeds.FeedEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.