com.atlassian.jira.plugin.profile
Interface UserFormatMapper

All Known Implementing Classes:
DefaultUserFormatMapper

public interface UserFormatMapper

Allows modifying the user format type mapping, and provides methods for querying all available types, and module descriptors.

Since:
v3.13

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.
 

Method Detail

getTypes

Set getTypes()
Returns a Set of all the user format types this manager is aware of

Returns:
a Set of all the user format types this manager is aware of

setUserFormatForType

void setUserFormatForType(String type,
                          String moduleKey)
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.

Parameters:
type - the user format type to update
moduleKey - The module Key of the updated plugin module.
Throws:
IllegalArgumentException - if the module key leads to a disabled or nonexistant module

getUserFormatModuleDescriptorsForType

Collection getUserFormatModuleDescriptorsForType(String type)
Retrieves all enabled user format module descriptors that can handle the provided type.

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

com.atlassian.plugin.ModuleDescriptor getUserFormatModuleDescriptorForType(String type)
Retrieves the user format module descriptor currently set for a given type.

Parameters:
type - the specific type for which to find a UserFormatModuleDescriptor
Returns:
The module descriptor mapped to the given type or null


Copyright © 2002-2010 Atlassian. All Rights Reserved.