com.atlassian.jira.config.properties
Class ApplicationPropertiesImpl

java.lang.Object
  extended by com.atlassian.jira.config.properties.ApplicationPropertiesImpl
All Implemented Interfaces:
ApplicationProperties

public class ApplicationPropertiesImpl
extends Object
implements ApplicationProperties

A class to manage the interface with a single property set, used for application properties


Constructor Summary
ApplicationPropertiesImpl(ApplicationPropertiesStore applicationPropertiesStore)
           
 
Method Summary
 Map<String,Object> asMap()
          This will return all application and typed values.
 String getContentType()
           
 String getDefaultBackedString(String name)
          Get the property from the application properties, but if not found, try to get from the default properties file.
 String getDefaultBackedText(String name)
          Get the property from the application properties, but if not found, try to get from the default properties file.
 Collection<String> getDefaultKeys()
          Get all the keys from the default properties
 Locale getDefaultLocale()
           
 String getDefaultString(String name)
          Get the default property (if the property is not set)
 String getEncoding()
          Convenience method to get the content type for an application
 Collection<String> getKeys()
           
 String getMailEncoding()
          Convenience method to get the email encoding
 boolean getOption(String key)
          Get the option from the application properties, but if not found, try to get from the default properties file.
 String getString(String name)
           
 Collection<String> getStringsWithPrefix(String prefix)
           
 String getText(String name)
           
 void onClearCache(ClearCacheEvent event)
           
 void refresh()
          Refresh application properties object by refreshing the PropertiesManager
 void setOption(String key, boolean value)
           
 void setString(String name, String value)
           
 void setText(String name, String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationPropertiesImpl

public ApplicationPropertiesImpl(ApplicationPropertiesStore applicationPropertiesStore)
Method Detail

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getText

public String getText(String name)
Specified by:
getText in interface ApplicationProperties

setText

public void setText(String name,
                    String value)
Specified by:
setText in interface ApplicationProperties

getString

public String getString(String name)
Specified by:
getString in interface ApplicationProperties

getDefaultKeys

public Collection<String> getDefaultKeys()
Get all the keys from the default properties

Specified by:
getDefaultKeys in interface ApplicationProperties

getDefaultBackedString

public String getDefaultBackedString(String name)
Get the property from the application properties, but if not found, try to get from the default properties file.

Specified by:
getDefaultBackedString in interface ApplicationProperties

getDefaultBackedText

public String getDefaultBackedText(String name)
Get the property from the application properties, but if not found, try to get from the default properties file.

Specified by:
getDefaultBackedText in interface ApplicationProperties

getDefaultString

public String getDefaultString(String name)
Get the default property (if the property is not set)

Specified by:
getDefaultString in interface ApplicationProperties
Parameters:
name - the name of the property.

setString

public void setString(String name,
                      String value)
Specified by:
setString in interface ApplicationProperties

getOption

public boolean getOption(String key)
Get the option from the application properties, but if not found, try to get from the default properties file.

Specified by:
getOption in interface ApplicationProperties

getKeys

public Collection<String> getKeys()
Specified by:
getKeys in interface ApplicationProperties

asMap

public Map<String,Object> asMap()
Description copied from interface: ApplicationProperties
This will return all application and typed values. For example if the property is a boolean then a Boolean object will be returned. If an application property has a null value, then the key will still be in the Map.keySet()

Specified by:
asMap in interface ApplicationProperties
Returns:
a map of key to actual value object

setOption

public void setOption(String key,
                      boolean value)
Specified by:
setOption in interface ApplicationProperties

getEncoding

public String getEncoding()
Convenience method to get the content type for an application

Specified by:
getEncoding in interface ApplicationProperties

getMailEncoding

public String getMailEncoding()
Convenience method to get the email encoding

Specified by:
getMailEncoding in interface ApplicationProperties

getContentType

public String getContentType()
Specified by:
getContentType in interface ApplicationProperties

refresh

public void refresh()
Refresh application properties object by refreshing the PropertiesManager

Specified by:
refresh in interface ApplicationProperties

toString

public String toString()
Overrides:
toString in class Object

getDefaultLocale

public Locale getDefaultLocale()
Specified by:
getDefaultLocale in interface ApplicationProperties

getStringsWithPrefix

public Collection<String> getStringsWithPrefix(String prefix)
Specified by:
getStringsWithPrefix in interface ApplicationProperties


Copyright © 2002-2013 Atlassian. All Rights Reserved.