com.atlassian.jira.plugin.profile
Class DefaultUserFormatMapper

java.lang.Object
  extended by com.atlassian.jira.plugin.profile.DefaultUserFormatMapper
All Implemented Interfaces:
Startable, UserFormatMapper

public class DefaultUserFormatMapper
extends Object
implements UserFormatMapper, Startable

Since:
v3.13

Field Summary
static String PS_KEY
           
 
Constructor Summary
DefaultUserFormatMapper(com.atlassian.plugin.PluginAccessor pluginAccessor, JiraPropertySetFactory jiraPropertySetFactory)
           
 
Method Summary
 Set getTypes()
          Returns a Set of all the user format types this manager is aware of
 com.atlassian.plugin.ModuleDescriptor getUserFormatModuleDescriptorForType(String type)
          Retrieves the user format module descriptor currently set for a given type.
 Collection getUserFormatModuleDescriptorsForType(String type)
          Retrieves all enabled user format module descriptors that can handle the provided type.
 void setUserFormatForType(String type, String moduleKey)
          Updates the mapping from a specific type to another plugin module.
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PS_KEY

public static final String PS_KEY
See Also:
Constant Field Values
Constructor Detail

DefaultUserFormatMapper

public DefaultUserFormatMapper(com.atlassian.plugin.PluginAccessor pluginAccessor,
                               JiraPropertySetFactory jiraPropertySetFactory)
Method Detail

getTypes

public Set getTypes()
Description copied from interface: UserFormatMapper
Returns a Set of all the user format types this manager is aware of

Specified by:
getTypes in interface UserFormatMapper
Returns:
a Set of all the user format types this manager is aware of

setUserFormatForType

public void setUserFormatForType(String type,
                                 String moduleKey)
Description copied from interface: UserFormatMapper
Updates the mapping from a specific type to another plugin module. This can be used to swap out what userformat is used for a particular type.

Specified by:
setUserFormatForType in interface UserFormatMapper
Parameters:
type - the user format type to update
moduleKey - The module Key of the updated plugin module.

getUserFormatModuleDescriptorsForType

public Collection getUserFormatModuleDescriptorsForType(String type)
Description copied from interface: UserFormatMapper
Retrieves all enabled user format module descriptors that can handle the provided type.

Specified by:
getUserFormatModuleDescriptorsForType in interface UserFormatMapper
Parameters:
type - the specific type for which to find a User Format module descriptors
Returns:
A collection of UserFormatModuleDescriptors or empty collection if none can be found.

getUserFormatModuleDescriptorForType

public com.atlassian.plugin.ModuleDescriptor getUserFormatModuleDescriptorForType(String type)
Description copied from interface: UserFormatMapper
Retrieves the user format module descriptor currently set for a given type.

Specified by:
getUserFormatModuleDescriptorForType in interface UserFormatMapper
Parameters:
type - the specific type for which to find a UserFormatModuleDescriptor
Returns:
The module descriptor mapped to the given type or null

start

public void start()
           throws Exception
Specified by:
start in interface Startable
Throws:
Exception


Copyright © 2002-2009 Atlassian. All Rights Reserved.