package com.novoda.downloadmanager;

import android.app.Notification;
import android.support.v4.app.NotificationCompat;

public interface NotificationCustomizer<T> {

    NotificationDisplayState notificationDisplayState(T payload);

    /**
     * Create a custom {@link Notification} from the given {@link NotificationCompat.Builder} and payload.
     *
     * @param builder the base {@link NotificationCompat.Builder} to build the {@link Notification} from.
     * @param payload the information to add to the {@link Notification}.
     * @return the custom {@link Notification} to display.
     */
    Notification customNotificationFrom(NotificationCompat.Builder builder, T payload);

    enum NotificationDisplayState {
        SINGLE_PERSISTENT_NOTIFICATION,
        STACK_NOTIFICATION_NOT_DISMISSIBLE,
        STACK_NOTIFICATION_DISMISSIBLE,
        HIDDEN_NOTIFICATION
    }
}

@@ -118,53 +118,810 @@
 t;%0A%0A
-public interface NotificationCustomizer%3CT%3E %7B%0A
+/**%0A * Used to customize the download notifications that are shown to the user.%0A * Clients of this library can create their own custom implementation and%0A * pass it to %7B@link DownloadManagerBuilder#withNotification(NotificationCustomizer)%7D.%0A *%0A * @param %3CT%3E The payload that is used to drive the customization.%0A */%0Apublic interface NotificationCustomizer%3CT%3E %7B%0A%0A    /**%0A     * Should return a given %7B@link NotificationDisplayState%7D for a given %7B@link T%7D payload.%0A     * Different payloads may want to hide or show differing notifications.%0A     * See %7B@link DownloadManagerBuilder.DownloadNotificationCustomizer%7D for an example.%0A     *%0A     * @param payload to determine the %7B@link NotificationDisplayState%7D from.%0A     * @return the %7B@link NotificationDisplayState%7D used to display notifications.%0A     */
 %0A   
@@ -1438,24 +1438,129 @@
  payload);%0A%0A
+    /**%0A     * Represents the different ways in which a notification can be displayed to a user.%0A     */%0A
     enum Not

Add full javadoc to NotificationCustomizer.