com.atlassian.jira.plugin.userformat.configuration
Class PluginsAwareUserFormatTypeConfiguration

java.lang.Object
  extended by com.atlassian.jira.plugin.userformat.configuration.PluginsAwareUserFormatTypeConfiguration
All Implemented Interfaces:
Startable, UserFormatTypeConfiguration

public class PluginsAwareUserFormatTypeConfiguration
extends Object
implements UserFormatTypeConfiguration, Startable

Reacts to plugin system events and updates the user format configuration accordingly. Delegates storage and retrieval to an instance of PropertySetBackedUserFormatTypeConfiguration

Since:
v4.4

Constructor Summary
PluginsAwareUserFormatTypeConfiguration(com.atlassian.event.api.EventPublisher eventPublisher, JiraPropertySetFactory jiraPropertySetFactory)
           
 
Method Summary
 boolean containsType(String userFormatType)
          Whether there is a configuration entry stored for the specified type.
 String getUserFormatKeyForType(String userFormatType)
          Retrieves the module key of the user format descriptor configured to render the specified type.
 void onPluginUninstalled(com.atlassian.plugin.event.events.PluginUninstalledEvent event)
           
 void remove(String userFormatType)
          Removes the configuration entry for the specified type if one exists.
 void setUserFormatKeyForType(String userFormatType, String moduleKey)
          Stores a configuration entry for the specified type agains a user format module descriptor key.
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginsAwareUserFormatTypeConfiguration

public PluginsAwareUserFormatTypeConfiguration(com.atlassian.event.api.EventPublisher eventPublisher,
                                               JiraPropertySetFactory jiraPropertySetFactory)
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.

onPluginUninstalled

public void onPluginUninstalled(com.atlassian.plugin.event.events.PluginUninstalledEvent event)

containsType

public boolean containsType(String userFormatType)
Description copied from interface: UserFormatTypeConfiguration
Whether there is a configuration entry stored for the specified type.

Specified by:
containsType in interface UserFormatTypeConfiguration
Parameters:
userFormatType - The type find a confiuration entry for.
Returns:
true if there is configuration entry stored for the specified type; otherwise false.

setUserFormatKeyForType

public void setUserFormatKeyForType(String userFormatType,
                                    String moduleKey)
Description copied from interface: UserFormatTypeConfiguration
Stores a configuration entry for the specified type agains a user format module descriptor key.

Specified by:
setUserFormatKeyForType in interface UserFormatTypeConfiguration
Parameters:
userFormatType - the user format type to configure.
moduleKey - The complete module key of the .

getUserFormatKeyForType

public String getUserFormatKeyForType(String userFormatType)
Description copied from interface: UserFormatTypeConfiguration
Retrieves the module key of the user format descriptor configured to render the specified type.

Specified by:
getUserFormatKeyForType in interface UserFormatTypeConfiguration
Parameters:
userFormatType - The type to retrieve a module key for.
Returns:
the module key of the user format descriptor configured to render the specified type, or null if there is no module key configured for that type.

remove

public void remove(String userFormatType)
Description copied from interface: UserFormatTypeConfiguration
Removes the configuration entry for the specified type if one exists.

Specified by:
remove in interface UserFormatTypeConfiguration
Parameters:
userFormatType - The type to remove from the configuration.


Copyright © 2002-2012 Atlassian. All Rights Reserved.