org.sonar.api.notifications
Class NotificationDispatcherMetadata

java.lang.Object
  extended by org.sonar.api.notifications.NotificationDispatcherMetadata
All Implemented Interfaces:
Extension, ServerComponent, ServerExtension

public final class NotificationDispatcherMetadata
extends Object
implements ServerExtension

Notification dispatchers (see NotificationDispatcher) can define their own metadata class in order to tell more about them.

Instances of these classes must be declared in Plugin.getExtensions().

Since:
3.5

Field Summary
static String GLOBAL_NOTIFICATION
           
static String PER_PROJECT_NOTIFICATION
           
 
Method Summary
static NotificationDispatcherMetadata create(String dispatcherKey)
          Creates a new metadata instance for the given dispatcher.
 boolean equals(Object o)
           
 String getDispatcherKey()
          Returns the unique key of the dispatcher.
 String getProperty(String key)
          Gives the property for the given key.
 int hashCode()
           
 NotificationDispatcherMetadata setProperty(String key, String value)
          Sets a property on this metadata object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GLOBAL_NOTIFICATION

public static final String GLOBAL_NOTIFICATION
See Also:
Constant Field Values

PER_PROJECT_NOTIFICATION

public static final String PER_PROJECT_NOTIFICATION
See Also:
Constant Field Values
Method Detail

create

public static NotificationDispatcherMetadata create(String dispatcherKey)
Creates a new metadata instance for the given dispatcher.

By default the key is the class name without package. It can be changed by overriding NotificationDispatcher.getKey().


setProperty

public NotificationDispatcherMetadata setProperty(String key,
                                                  String value)
Sets a property on this metadata object.


getProperty

public String getProperty(String key)
Gives the property for the given key.


getDispatcherKey

public String getDispatcherKey()
Returns the unique key of the dispatcher.


toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2014 SonarSource. All Rights Reserved.