/*
 * Copyright 2015 Ryan Gilera.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.daytron.revworks.util;

import com.vaadin.server.Page;
import com.vaadin.shared.Position;
import com.vaadin.ui.Notification;

/**
 * Utility class for formatted notifications.
 * 
 * @author Ryan Gilera
 */
public class NotificationUtil {
    /**
     * Creates an error notification with a single parameter for caption.
     * 
     * @param caption The main message of the notification
     */
    public static void showError(String caption) {
        showError(caption, "");
    }
    
    /**
     * Creates an error notification with two parameters for caption and 
     * description.
     * 
     * @param caption The main message of the notification
     * @param description Secondary description message
     */
    public static void showError(String caption, String description) {
        Notification errorNotification;
        
        caption = "<i class=\"fa fa-exclamation-circle fa-2x\"></i>&nbsp;&nbsp;"
                    + caption;
        if (description.isEmpty()) {
            errorNotification = new Notification(caption, 
                    Notification.Type.ERROR_MESSAGE);
        } else {
            errorNotification = new Notification(caption, description, 
                    Notification.Type.ERROR_MESSAGE);
        }
        
        errorNotification.setHtmlContentAllowed(true);
        errorNotification.setPosition(Position.TOP_CENTER);
        
        errorNotification.show(Page.getCurrent());
    }
}

@@ -1192,219 +1192,993 @@
   * 
-description.%0A     * %0A     * @param caption The main message of the notification%0A     * @param description Secondary description message%0A     */%0A    public static void showError(String caption, String description
+time delay.%0A     * %0A     * @param caption The main message of the notification%0A     * @param delay The time delay in milliseconds%0A     */%0A    public static void showError(String caption, int delay) %7B%0A        showError(caption, %22%22, delay);%0A    %7D%0A    %0A    /**%0A     * Creates an error notification with two parameters for caption and %0A     * description.%0A     * %0A     * @param caption The main message of the notification%0A     * @param description Secondary description message%0A     */%0A    public static void showError(String caption, String description) %7B%0A        showError(caption, description, 0);%0A    %7D%0A    %0A    /**%0A     * Creates an error notification with three parameters for caption, %0A     * description and time delay.%0A     * %0A     * @param caption The main message of the notification%0A     * @param description Secondary description message%0A     * @param delay The time delay in milliseconds%0A     */%0A    public static void showError(String caption, String description, int delay
 ) %7B%0A
@@ -2766,32 +2766,128 @@
 NTER);%0A        %0A
+        if (delay != 0) %7B%0A            errorNotification.setDelayMsec(delay);%0A        %7D%0A        %0A
         errorNot

Add time delay parameter