com.atlassian.jira.issue.customfields.manager
Interface GenericConfigManager

All Known Implementing Classes:
CachedGenericConfigManager, DefaultGenericConfigManager

public interface GenericConfigManager

Used to store Generic configuration values (mostly default values for certain fields). Implementations should aim to manage any plain java object. Two implementations of this interface exist in JIRA: An in memory cache (see CachedGenericConfigManager) and an implementation responsible for storing the config values in the DB (see DefaultGenericConfigManager). For DB persistence, objects are serialized to XML.


Field Summary
static String ENTITY_DATA_KEY
           
static String ENTITY_DATA_TYPE
           
static String ENTITY_ID
           
static String ENTITY_TABLE_NAME
           
static String ENTITY_XML_VALUE
           
 
Method Summary
 void create(String dataType, String key, Object obj)
          Stores a new entry for the config manager.
 void remove(String dataType, String key)
          Removes a generic config value.
 Object retrieve(String dataType, String key)
          Retrieves a particular entry.
 void update(String dataType, String key, Object obj)
          Updates an entry.
 

Field Detail

ENTITY_TABLE_NAME

static final String ENTITY_TABLE_NAME
See Also:
Constant Field Values

ENTITY_ID

static final String ENTITY_ID
See Also:
Constant Field Values

ENTITY_DATA_TYPE

static final String ENTITY_DATA_TYPE
See Also:
Constant Field Values

ENTITY_DATA_KEY

static final String ENTITY_DATA_KEY
See Also:
Constant Field Values

ENTITY_XML_VALUE

static final String ENTITY_XML_VALUE
See Also:
Constant Field Values
Method Detail

create

void create(String dataType,
            String key,
            Object obj)
Stores a new entry for the config manager. For example a customfield may have a default value.

Parameters:
dataType - The datatype for which to store the generic config (e.g.: DefaultValue)
key - A key that identifies the element (e.g.: 10000)
obj - The actual object to store.

update

void update(String dataType,
            String key,
            Object obj)
Updates an entry.

Parameters:
dataType -
key -
obj -

retrieve

Object retrieve(String dataType,
                String key)
Retrieves a particular entry.

Parameters:
dataType -
key -
Returns:
The entry, or null if it doesn't exist.

remove

void remove(String dataType,
            String key)
Removes a generic config value.

Parameters:
dataType -
key -


Copyright © 2002-2007 Atlassian. All Rights Reserved.