com.atlassian.confluence.mail.notification.listeners
Enum NotificationTemplate

java.lang.Object
  extended by java.lang.Enum<NotificationTemplate>
      extended by com.atlassian.confluence.mail.notification.listeners.NotificationTemplate
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<NotificationTemplate>

public enum NotificationTemplate
extends java.lang.Enum<NotificationTemplate>

Used to decide whether to use the Soy-based, ADG-styled notification templates or fallback to the Velocity-based, legacy templates.

This class is for internal use only. It can be removed any time once all notification templates have been transformed.

Since:
5.2

Enum Constant Summary
ADG
           
 
Method Summary
 boolean isEnabled(java.lang.String templateIdentifier)
          Check if a particular ADG template should be used.
static NotificationTemplate valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NotificationTemplate[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADG

public static final NotificationTemplate ADG
Method Detail

values

public static NotificationTemplate[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NotificationTemplate c : NotificationTemplate.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NotificationTemplate valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isEnabled

public boolean isEnabled(java.lang.String templateIdentifier)
Check if a particular ADG template should be used.

Parameters:
templateIdentifier - an identifier for a specific template, e.g. page.create or comment.remove
Returns:
true if the ADG templates are enabled and the specific template is not disabled on this instance


Copyright © 2003-2014 Atlassian. All Rights Reserved.