ITrackerResourcesProvider
ConfigurationServiceImpl
public interface ConfigurationService extends ITrackerResourcesProvider
Modifier and Type | Field | Description |
---|---|---|
static String |
PNAME_SYSTEM_BASE_URL |
Modifier and Type | Method | Description |
---|---|---|
boolean |
configurationItemExists(Configuration configuration) |
|
Configuration |
createConfigurationItem(Configuration configuration) |
Creates a
Configuration . |
CustomField |
createCustomField(CustomField customField) |
This method will create a new CustomField for persistance in the database.
|
CustomFieldValue |
createCustomFieldValue(CustomFieldValue customFieldValue) |
This method will create a new CustomFieldValue for persistance in the database.
|
ProjectScript |
createProjectScript(ProjectScript projectScript) |
This method will create a new project script for persistance in the database.
|
WorkflowScript |
createWorkflowScript(WorkflowScript workflowScript) |
This method will create a new workflow script for persistance in the database.
|
Map<String,List<String>> |
getAvailableLanguages() |
|
boolean |
getBooleanProperty(String name,
boolean defaultValue) |
Load a configuration from application properties.
|
Configuration |
getConfigurationItem(Integer id) |
Load a configuration from database.
|
List<Configuration> |
getConfigurationItemsByType(int type) |
Deprecated.
use getConfigurationItemsByType(Configuration.Type type)
|
List<Configuration> |
getConfigurationItemsByType(int type,
Locale locale) |
Deprecated.
use getConfigurationItemsByType(Configuration.Type type, Locale locale)
|
List<Configuration> |
getConfigurationItemsByType(Configuration.Type type) |
Returns all the configuration items of a particular type.
|
List<Configuration> |
getConfigurationItemsByType(Configuration.Type type,
Locale locale) |
Returns all the configuration items of a particular type.
|
CustomField |
getCustomField(Integer id) |
This method will return the requested custom field.
|
List<CustomField> |
getCustomFields() |
This method will return all the custom fields defined in the system.
|
CustomFieldValue |
getCustomFieldValue(Integer id) |
This method will return the requested custom field value.
|
Map<String,String> |
getDefinedKeys(String locale) |
|
List<NameValuePair> |
getDefinedKeysAsArray(String locale) |
|
int |
getIntegerProperty(String name,
int defaultValue) |
Load a configuration from application properties.
|
String |
getJndiPropertiesOverridePrefix() |
The JNDI context where the configuration.properties values can be overridden.
|
Language |
getLanguageItemByKey(String key,
Locale locale) |
This method will return the translation for a particular key in a locale.
|
List<Language> |
getLanguageItemsByKey(String key) |
This method will return all the translations for a particular key.
|
Properties |
getLanguageProperties(Locale locale) |
Load all translation keys for a locale.
|
String |
getLanguageValue(String key,
Locale locale) |
|
long |
getLongProperty(String name,
long defaultValue) |
Load a configuration from application properties.
|
String |
getMailSessionLookupName() |
The JNDI lookup name for the mail-session.
|
int |
getNumberAvailableLanguages() |
|
int |
getNumberDefinedKeys(String locale) |
|
ProjectScript |
getProjectScript(Integer id) |
This method will return the requested project script.
|
List<ProjectScript> |
getProjectScripts() |
This method will return all defined project scripts.
|
String |
getProperty(String name) |
Load a configuration from application properties.
|
String |
getProperty(String name,
String defaultValue) |
Load a configuration from application properties.
|
String[] |
getSortedKeys() |
Returns all of the keys currently defined in the base locale sorted and grouped in a
logical manner.
|
String |
getSystemBaseURL() |
|
SystemConfiguration |
getSystemConfiguration(Locale locale) |
This method will return the current configuration of the system.
|
WorkflowScript |
getWorkflowScript(Integer id) |
This method will return the requested workflow script.
|
List<WorkflowScript> |
getWorkflowScripts() |
This method will return all defined workflow scripts.
|
void |
initializeAllLanguages(boolean forceReload) |
This method will attempt to load all of the locales defined in the
ITracker.properties file, and add them to the database if they don't
already exist.
|
void |
initializeConfiguration() |
This method will load the some default system configuration data into the database.
|
boolean |
initializeLocale(String locale,
boolean forceReload) |
This method will load the specified locale.
|
boolean |
isConfigurationItemUpToDate(Configuration configuration) |
|
void |
removeConfigurationItem(Integer id) |
This method will remove the configuration item with the supplied id.
|
void |
removeConfigurationItems(int type) |
Deprecated.
use removeConfigurationItems(Configuration.Type type)
|
void |
removeConfigurationItems(Configuration configuration) |
This method will remove all configuration items that match the supplied models
type and value.
|
void |
removeConfigurationItems(Configuration.Type type) |
This method will remove all configuration items that match the supplied type.
|
boolean |
removeCustomField(Integer customFieldId) |
Removes a single custom field from the database.
|
boolean |
removeCustomFieldValue(Integer customFieldValueId) |
Removes a single custom field value from the database.
|
boolean |
removeCustomFieldValues(Integer customFieldId) |
Removes all custom field values from the database for a single custom field.
|
void |
removeLanguageItem(Language language) |
|
boolean |
removeLanguageKey(String key) |
This method will remove all language items with the supplied key regardless
of locale.
|
void |
removeProjectScript(Integer id) |
This method removes a project script in the database.
|
void |
removeWorkflowScript(Integer id) |
This method removes a workflow script in the database.
|
void |
resetConfigurationCache() |
This method will reset any caches in the system of configuration items for all configuration
item types.
|
void |
resetConfigurationCache(int type) |
Deprecated.
use resetConfigurationCache(Configuration.Type type)
|
void |
resetConfigurationCache(Configuration.Type type) |
This method will reset any caches in the system of configuration items for the specified
configuration item type.
|
void |
setJndiPropertiesOverridePrefix(String jndiPropertiesOverridePrefix) |
|
void |
setMailSessionLookupName(String mailSessionLookupName) |
|
Configuration |
updateConfigurationItem(Configuration configuration) |
This method updates a configuration item in the database.
|
List<Configuration> |
updateConfigurationItems(List<Configuration> configurations,
Configuration.Type type) |
Updates the configuration items.
|
CustomField |
updateCustomField(CustomField customField) |
This method updates a custom field in the database.
|
CustomFieldValue |
updateCustomFieldValue(CustomFieldValue customFieldValue) |
This method updates a custom field value in the database.
|
List<CustomFieldValue> |
updateCustomFieldValues(Integer customFieldId,
List<CustomFieldValue> customFieldValues) |
This method updates a set of custom field values in the database.
|
void |
updateLanguage(Locale locale,
List<Language> languages) |
|
void |
updateLanguage(Locale locale,
List<Language> languages,
Configuration config) |
|
Language |
updateLanguageItem(Language language) |
Updates a translations for a particular key and locale.
|
ProjectScript |
updateProjectScript(ProjectScript projectScript) |
This method updates a project script in the database.
|
WorkflowScript |
updateWorkflowScript(WorkflowScript workflowScript) |
This method updates a workflow script in the database.
|
getLanguageEntry
static final String PNAME_SYSTEM_BASE_URL
String getProperty(String name)
name
- configuration keyString getProperty(String name, String defaultValue)
getProperty
in interface ITrackerResourcesProvider
name
- configuration keydefaultValue
- returned if the value is nullboolean getBooleanProperty(String name, boolean defaultValue)
name
- configuration keydefaultValue
- returned if the value is nullint getIntegerProperty(String name, int defaultValue)
name
- configuration keydefaultValue
- returned if the value is nulllong getLongProperty(String name, long defaultValue)
name
- configuration keydefaultValue
- returned if the value is nullConfiguration getConfigurationItem(Integer id)
id
- the row identifierString getJndiPropertiesOverridePrefix()
void setJndiPropertiesOverridePrefix(String jndiPropertiesOverridePrefix)
String getMailSessionLookupName()
void setMailSessionLookupName(String mailSessionLookupName)
List<Configuration> getConfigurationItemsByType(int type)
type
- the type of configuration items to retrieveList<Configuration> getConfigurationItemsByType(Configuration.Type type)
type
- the type of configuration items to retrieveList<Configuration> getConfigurationItemsByType(Configuration.Type type, Locale locale)
type
- the type of configuration items to retrievelocale
- the locale to use when setting the configuration items name valuesList<Configuration> getConfigurationItemsByType(int type, Locale locale)
type
- the type of configuration items to retrievelocale
- the locale to use when setting the configuration items name valuesConfiguration createConfigurationItem(Configuration configuration)
Configuration
.configuration
- The Configuration
to storeConfiguration
after savingConfiguration updateConfigurationItem(Configuration configuration)
Version will be fixed to current initialized version.
configuration
- a Configuration of the item to updateList<Configuration> updateConfigurationItems(List<Configuration> configurations, Configuration.Type type)
Version will be fixed to current initialized version.
configurations
- the ConfigurationModels
to updatetype
- The type of the ConfigurationItem
s to updateboolean configurationItemExists(Configuration configuration)
boolean isConfigurationItemUpToDate(Configuration configuration)
void removeConfigurationItem(Integer id)
id
- the id of the configuration information to removevoid removeConfigurationItems(int type)
type
- the type of configuration information to removevoid removeConfigurationItems(Configuration.Type type)
type
- the type of configuration information to removevoid removeConfigurationItems(Configuration configuration)
configuration
- the model to determine the type and value fromvoid resetConfigurationCache()
void resetConfigurationCache(int type)
type
- the type of configuration item to reset in any cachesvoid resetConfigurationCache(Configuration.Type type)
type
- the type of configuration item to reset in any cachesProjectScript getProjectScript(Integer id)
id
- the id of the requested scriptList<ProjectScript> getProjectScripts()
ProjectScript createProjectScript(ProjectScript projectScript)
projectScript
- the model to create the script fromProjectScript updateProjectScript(ProjectScript projectScript)
projectScript
- a ProjectScript of the item to updatevoid removeProjectScript(Integer id)
id
- The id of the project scriptWorkflowScript getWorkflowScript(Integer id)
id
- the id of the requested scriptList<WorkflowScript> getWorkflowScripts()
WorkflowScript createWorkflowScript(WorkflowScript workflowScript)
workflowScript
- the model to create the script fromWorkflowScript updateWorkflowScript(WorkflowScript workflowScript)
workflowScript
- a WorkflowScript of the item to updatevoid removeWorkflowScript(Integer id)
id
- The id of the workflow scriptCustomField getCustomField(Integer id)
id
- the id of the requested fieldList<CustomField> getCustomFields()
CustomField createCustomField(CustomField customField)
customField
- the model to create the field fromCustomField updateCustomField(CustomField customField)
customField
- a CustomField of the item to updateboolean removeCustomField(Integer customFieldId)
customFieldId
- the id of the custom field to removeCustomFieldValue getCustomFieldValue(Integer id)
id
- the id of the requested field valueCustomFieldValue createCustomFieldValue(CustomFieldValue customFieldValue)
customFieldValue
- the model to create the field fromCustomFieldValue updateCustomFieldValue(CustomFieldValue customFieldValue)
customFieldValue
- a CustomFieldValue of the item to updateList<CustomFieldValue> updateCustomFieldValues(Integer customFieldId, List<CustomFieldValue> customFieldValues)
customFieldId
- the id of the custom field to updatecustomFieldValues
- an array of CustomFieldValueModels to updateboolean removeCustomFieldValue(Integer customFieldValueId)
customFieldValueId
- the id of the custom field value to removeboolean removeCustomFieldValues(Integer customFieldId)
customFieldId
- the id of the custom field to remove the values forLanguage getLanguageItemByKey(String key, Locale locale)
key
- the key to look uplocale
- the localue to translate the key forList<Language> getLanguageItemsByKey(String key)
key
- the key to look upLanguage updateLanguageItem(Language language)
language
- A Language for the key to updateboolean removeLanguageKey(String key)
key
- the key to removevoid removeLanguageItem(Language language)
SystemConfiguration getSystemConfiguration(Locale locale)
String[] getSortedKeys()
List<NameValuePair> getDefinedKeysAsArray(String locale)
int getNumberDefinedKeys(String locale)
int getNumberAvailableLanguages()
Properties getLanguageProperties(Locale locale)
ITrackerResourcesProvider
getLanguageProperties
in interface ITrackerResourcesProvider
locale
- the localevoid updateLanguage(Locale locale, List<Language> languages, Configuration config)
boolean initializeLocale(String locale, boolean forceReload)
locale
- the locale to loadforceReload
- if true, it will reload the languages from the property file even if it is listed
as being up to datevoid initializeConfiguration()
String getSystemBaseURL()
void initializeAllLanguages(boolean forceReload)
forceReload
- if true, it will reload the languages from the property files
even if they are listed as being up to dateCopyright © 2002–2019 itracker. All rights reserved.