Examples of NotificationBuilder


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

                        .append("</li>");

                notifiedChanges.add(change.changeId);
            }
            stringBuilder.append("</ul>");
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Gerrit Changes waiting for my review",
                    stringBuilder.toString()
            );
            notificationService.notifyInformation(notification);
View Full Code Here

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

                        hashes.add(revisionId);

                        gitCommits = GitHistoryUtils.commitsDetails(project, filePath, new SymbolicRefs(), hashes);
                    } catch (VcsException e) {
                        log.warn("Error getting Git commit details.", e);
                        NotificationBuilder notification = new NotificationBuilder(
                                project, "Cannot show change",
                                "Git error occurred while getting commit. Please check if Gerrit is configured as remote " +
                                        "for the currently used Git repository."
                        );
                        notificationService.notifyError(notification);
View Full Code Here

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

        return path;
    }

    public void showAddGitRepositoryNotification(final Project project) {
        NotificationBuilder notification = new NotificationBuilder(project, "Insufficient dependencies for Gerrit plugin",
                "Please configure a Git repository.<br/><a href='vcs'>Open Settings</a>")
                .listener(new NotificationListener() {
                    @Override
                    public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
                        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
View Full Code Here

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

            }
        });
    }

    private void notifyError(Throwable throwable, String errorMessage, Project project) {
        NotificationBuilder notification = new NotificationBuilder(project, errorMessage, getErrorTextFromException(throwable));
        notificationService.notifyError(notification);
    }
View Full Code Here

Examples of org.glassfish.admin.amx.util.jmx.NotificationBuilder

    public void sendNotification(final Notification notification) {
        getNotificationEmitter().sendNotification(notification);
    }

    protected NotificationBuilder createNotificationBuilder(final String notificationType) {
        NotificationBuilder builder = null;

        if (notificationType.equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)) {
            builder = new AttributeChangeNotificationBuilder(getObjectName());
        } else {
            builder = new NotificationBuilder(notificationType, getObjectName());
        }

        return (builder);
    }
View Full Code Here

Examples of org.glassfish.admin.amx.util.jmx.NotificationBuilder

    protected synchronized NotificationBuilder getNotificationBuilder(final String notificationType) {
        if (mNotificationBuilders == null) {
            mNotificationBuilders = new HashMap<String, NotificationBuilder>();
        }

        NotificationBuilder builder = mNotificationBuilders.get(notificationType);

        if (builder == null) {
            builder = createNotificationBuilder(notificationType);
            mNotificationBuilders.put(notificationType, builder);
        }
View Full Code Here

Examples of org.glassfish.admin.amx.util.jmx.NotificationBuilder

    protected void sendNotification(
            final String notificationType,
            final String message,
            final String key,
            final Serializable value) {
        final NotificationBuilder builder =
                getNotificationBuilder(notificationType);

        final Notification notif = builder.buildNew(message);
        NotificationBuilder.putMapData(notif, key, value);

        sendNotification(notif);
    }
View Full Code Here

Examples of org.glassfish.admin.amx.util.jmx.NotificationBuilder

        mNotificationTypeToNotificationBuilderMap.clear();
        for( final String notifType : ALL_LOG_RECORD_NOTIFICATION_TYPES )
        {
            mNotificationTypeToNotificationBuilderMap.put(
                notifType,
                new NotificationBuilder( notifType, objectName ) );
        }
    }
View Full Code Here

Examples of org.glassfish.admin.amx.util.jmx.NotificationBuilder

   
   
        private NotificationBuilder
    notificationTypeToNotificationBuilder( final String notificationType )
    {
        NotificationBuilder builder =
            mNotificationTypeToNotificationBuilderMap.get( notificationType );
           
        assert( builder != null );
       
        return builder;
View Full Code Here

Examples of org.glassfish.admin.amx.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
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.