Interface NotificationType

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  NotificationType.Scope  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @NotNull String getConfigurationData()
      Returns the string representation of the configurable data of the notification type to be persisted to the db
      @NotNull String getDescription()
      Returns generic string description of this notification type
      @NotNull String getEditHtml()
      Returns the html to be displayed on the edit screen (to input data into notification type)
      @NotNull String getKey()
      returns key for this condition object
      @Nullable com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
      returns the moduleDescriptor for this plugin object if it exists.
      @NotNull String getName()
      Returns a short name of the notification type
      NotificationType.Scope getScope()  
      @NotNull String getViewHtml()
      Returns the HTML representing the notification type for the notification
      void init​(@NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
      initialises the notification type plugin object with its module descriptor
      boolean isNotificationRequired​(@NotNull Object event)
      Determines whether or not a notification should be sent based on the event.
      void populate​(@NotNull Map<String,​String[]> params)
      takes the map of config data from action and extracts the parameters it needs
      void setConfigurationData​(@Nullable String data)
      initalises the notification type object with its data based on the config string retrieved from the database
      @NotNull ErrorCollection validate​(@NotNull Map<String,​String[]> params)
      validate the user inputed data
    • Method Detail

      • init

        void init​(@NotNull
                  @NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
        initialises the notification type plugin object with its module descriptor
        Parameters:
        moduleDescriptor - for this plugin object
      • getModuleDescriptor

        @Nullable
        @Nullable com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
        returns the moduleDescriptor for this plugin object if it exists.
        Returns:
      • setConfigurationData

        void setConfigurationData​(@Nullable
                                  @Nullable String data)
        initalises the notification type object with its data based on the config string retrieved from the database
        Parameters:
        data - string representation of configurable data
      • getConfigurationData

        @NotNull
        @NotNull String getConfigurationData()
        Returns the string representation of the configurable data of the notification type to be persisted to the db
        Returns:
        String of config data. Empty string if no config data
      • getName

        @NotNull
        @NotNull String getName()
        Returns a short name of the notification type
        Returns:
      • getDescription

        @NotNull
        @NotNull String getDescription()
        Returns generic string description of this notification type
        Returns:
        string description - can not be null
      • getKey

        @NotNull
        @NotNull String getKey()
        returns key for this condition object
        Returns:
        string key (as in plugin definition), can not be null
      • populate

        void populate​(@NotNull
                      @NotNull Map<String,​String[]> params)
        takes the map of config data from action and extracts the parameters it needs
        Parameters:
        params - map of key (String), value (String []) pairs from action
      • validate

        @NotNull
        @NotNull ErrorCollection validate​(@NotNull
                                          @NotNull Map<String,​String[]> params)
        validate the user inputed data
        Parameters:
        params - map of key (String), value (String []) pairs from action
        Returns:
        error collection of any errors to be reported back to the user
      • getEditHtml

        @NotNull
        @NotNull String getEditHtml()
        Returns the html to be displayed on the edit screen (to input data into notification type)
        Returns:
        String of html
      • getViewHtml

        @NotNull
        @NotNull String getViewHtml()
        Returns the HTML representing the notification type for the notification
        Returns:
        HTML of data for view configuration. If this returns null the description will be used.
      • isNotificationRequired

        boolean isNotificationRequired​(@NotNull
                                       @NotNull Object event)
        Determines whether or not a notification should be sent based on the event. Can look for context specific information as well as user configuration.
        Returns:
        true or false - to send or not to send.
      • getScope

        NotificationType.Scope getScope()
        Returns:
        The scope of the notification type, e.g. "plan" or "system" or "chain" or "deployment".