Examples of NotificationBuilder


Examples of com.sun.appserv.management.util.jmx.NotificationBuilder

                // don't construct a Notification if there are no listeners.
                if ( getLogLevelListenerCount( level ) != 0 )
                {
                    final String notifType  = logLevelToNotificationType( level );
                   
                    final NotificationBuilder   builder =
                        notificationTypeToNotificationBuilder( notifType );
                   
                    // Notification.getMessage() will be the formatted log record
                    final String    logRecordAsString    = formatter.format( logRecord );
                   
                    final Map<String,Serializable>  userData    =
                        logRecordToMap( logRecord, logRecordAsString );
                       
                    final Notification notif    =
                        builder.buildNewWithMap( logRecordAsString, userData);
                       
                    debug( "privateLoggingHook: sending: " + notif );
                    sendNotification( notif );
                }
                else
View Full Code Here

Examples of com.sun.appserv.management.util.jmx.NotificationBuilder

      public long
  emitNotifications(
      final String notifType,
      final int    howMany )
  {
      final NotificationBuilder builder   =
          new NotificationBuilder( notifType, mSelfObjectName );
         
      final long start    = System.currentTimeMillis();
     
      for( int i = 0; i < howMany; ++i )
      {
          final Notification  notif = builder.buildNew( "test Notification" );
         
          sendNotification( notif );
      }
     
      final long elapsed = System.currentTimeMillis() - start;
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

        List<ProjectInfo> availableProjects = null;
        try {
            availableProjects = gerritUtil.getAvailableProjects(project);
        } catch (Exception e) {
            log.info(e);
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Couldn't get the list of Gerrit repositories",
                    gerritUtil.getErrorTextFromException(e));
            notificationService.notifyError(notification);
        }
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

            ByteStreams.copy(commitMessageHook, new FileOutputStream(targetFile));
            //noinspection ResultOfMethodCallIgnored
            targetFile.setExecutable(true);
        } catch (Exception e) {
            log.info(e);
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Couldn't set up Gerrit Commit-Message Hook. Please do it manually.",
                    gerritUtil.getErrorTextFromException(e));
            notificationService.notifyError(notification);
        }
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

                        return Optional.of(repository);
                    }
                }
            }
        }
        NotificationBuilder notification = new NotificationBuilder(project, "Error",
                String.format("No repository found for Gerrit project: '%s'.", gerritProjectName));
        notificationService.notifyError(notification);
        return Optional.absent();
    }
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

                            fetchNatively(gitRepository.getGitDir(), remote, repositoryUrl, branch, project, indicator);
                            return;
                        }
                    }
                }
                NotificationBuilder notification = new NotificationBuilder(project, "Error",
                        String.format("Could not fetch commit because no remote url matches Gerrit host.<br/>" +
                                "Git repository: '%s'.", gitRepository.getPresentableUrl()));
                notificationService.notifyError(notification);
            }
        });
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

            UntrackedFilesNotifier.notifyUntrackedFilesOverwrittenBy(project, platformFacade, untrackedFilesDetector.getFiles(),
                    "cherry-pick", description);
            return false;
        } else if (localChangesOverwrittenDetector.hasHappened()) {
            notificationService.notifyError(new NotificationBuilder(project, "Cherry-Pick Error",
                    "Your local changes would be overwritten by cherry-pick.<br/>Commit your changes or stash them to proceed."));
            return false;
        } else {
            notificationService.notifyError(new NotificationBuilder(project, "Cherry-Pick Error",
                    result.getErrorOutputAsHtmlString()));
            return false;
        }
    }
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

            gerritGitUtil.fetchChange(project, gitRepository, url, ref, fetchCallback);
        }
    }

    private void notifyError() {
        NotificationBuilder notification = new NotificationBuilder(
                project, "Cannot fetch changes",
                "No fetch information provided. If you are using Gerrit 2.8 or later, " +
                        "you need to install the plugin 'download-commands' in Gerrit."
        );
        notificationService.notifyError(notification);
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

        }
        SubmitInput submitInput = new SubmitInput();
        gerritUtil.postSubmit(selectedChange.get().id, submitInput, project, new Consumer<Void>() {
            @Override
            public void consume(Void aVoid) {
                NotificationBuilder notification = new NotificationBuilder(
                        project, "Change submitted", getSuccessMessage(selectedChange.get())
                ).hideBalloon();
                notificationService.notifyInformation(notification);
            }
        });
View Full Code Here

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

                        reviewInput,
                        project,
                        new Consumer<Void>() {
                            @Override
                            public void consume(Void result) {
                                NotificationBuilder notification = new NotificationBuilder(
                                        project, "Review posted",
                                        buildSuccessMessage(changeDetails, reviewInput))
                                        .hideBalloon();
                                notificationService.notifyInformation(notification);
                                if (finalSubmitChange) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.