com.atlassian.jira.util.system
Class ExtendedSystemInfoUtilsImpl

java.lang.Object
  extended by com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl
All Implemented Interfaces:
ExtendedSystemInfoUtils

public class ExtendedSystemInfoUtilsImpl
extends Object
implements ExtendedSystemInfoUtils

Implementation for the ExtendedSystemInfoUtils interface.

Since:
v3.13

Constructor Summary
  ExtendedSystemInfoUtilsImpl(I18nHelper i18nHelper)
           
protected ExtendedSystemInfoUtilsImpl(SystemInfoUtils systemInfoUtils, ServiceManager serviceManager, com.atlassian.plugin.PluginAccessor pluginAccessor, ApplicationProperties applicationProperties, TrustedApplicationService trustedAppService, OfBizDelegator ofBizDelegator, I18nHelper i18nHelper, UserUtil userUtil, HashRegistryCache registry, LocaleManager localeManager, JiraLicenseService jiraLicenseService, BuildUtilsInfo buildUtilsInfo, UpgradeManager upgradeManager, IssueIndexManager indexManager)
           
 
Method Summary
 Map<String,String> getApplicationPropertiesFormatted(String suffix)
          For each application property, display the key and its value.
 String getAttachmentsLocation()
           
 String getBackupLocation()
           
 String getBaseUrl()
           
 Map<String,String> getBuildStats()
           
 Map<String,String> getCommonConfigProperties()
          The common configuration properties that apply to this instance of JIRA
 String getDefaultLanguage()
           
 String getEntityEngineXmlPath()
           
 String getIndexLocation()
           
 Set<String> getIPMatches(TrustedApplicationInfo info)
           
 String getJiraHomeLocation()
           
 Map<String,String> getJvmStats()
           
 Map<String,String> getLicenseInfo()
           
 Collection<org.ofbiz.core.entity.GenericValue> getListeners()
           
 String getLogPath()
           
 List<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation> getMemoryPoolInformation()
           
 long getMillisecondsToMinutes(long ms)
           
 Collection<com.atlassian.plugin.Plugin> getPlugins()
           
 Map<String,String> getProps()
          Default is to hide sensitive system information (for the 500 page, etc.)
 Map<String,String> getProps(boolean showSensitiveInfo)
           
 Map<String,String> getServicePropertyMap(JiraServiceContainer serviceContainer)
           
 Collection<JiraServiceContainer> getServices()
           
 SystemInfoUtils getSystemInfoUtils()
           
 Map<String,String> getSystemPropertiesFormatted(String suffix)
          For each system properties, display the key and its value.
 Set<TrustedApplicationInfo> getTrustedApplications(JiraServiceContext jiraServiceContext)
           
 List<UpgradeHistoryItem> getUpgradeHistory()
           
 Set<String> getUrlMatches(TrustedApplicationInfo info)
           
 Map<String,String> getUsageStats()
           
 boolean isJvmJava5OrGreater()
           
 boolean isPluginEnabled(com.atlassian.plugin.Plugin plugin)
           
 boolean isUsingSystemLocale()
          Checks whether the default locale has been set or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedSystemInfoUtilsImpl

protected ExtendedSystemInfoUtilsImpl(SystemInfoUtils systemInfoUtils,
                                      ServiceManager serviceManager,
                                      com.atlassian.plugin.PluginAccessor pluginAccessor,
                                      ApplicationProperties applicationProperties,
                                      TrustedApplicationService trustedAppService,
                                      OfBizDelegator ofBizDelegator,
                                      I18nHelper i18nHelper,
                                      UserUtil userUtil,
                                      HashRegistryCache registry,
                                      LocaleManager localeManager,
                                      JiraLicenseService jiraLicenseService,
                                      BuildUtilsInfo buildUtilsInfo,
                                      UpgradeManager upgradeManager,
                                      IssueIndexManager indexManager)

ExtendedSystemInfoUtilsImpl

public ExtendedSystemInfoUtilsImpl(I18nHelper i18nHelper)
Method Detail

getSystemInfoUtils

public SystemInfoUtils getSystemInfoUtils()
Specified by:
getSystemInfoUtils in interface ExtendedSystemInfoUtils
Returns:
the SystemInfoUtils object

getProps

public Map<String,String> getProps()
Description copied from interface: ExtendedSystemInfoUtils
Default is to hide sensitive system information (for the 500 page, etc.)

Specified by:
getProps in interface ExtendedSystemInfoUtils
Returns:
an ordered map of system properties

getProps

public Map<String,String> getProps(boolean showSensitiveInfo)
Specified by:
getProps in interface ExtendedSystemInfoUtils
Parameters:
showSensitiveInfo - Whether to include sensitive system information (e.g. database URL)
Returns:
an ordered map of system properties

getApplicationPropertiesFormatted

public Map<String,String> getApplicationPropertiesFormatted(String suffix)
Description copied from interface: ExtendedSystemInfoUtils
For each application property, display the key and its value. If the value is a path, then break the paths at semi colons ';' (For non-windows operatin systems, breaks on colon ':' as well). The break is accomplished by replacing the ';' or ':' with the suffix string argument

Specified by:
getApplicationPropertiesFormatted in interface ExtendedSystemInfoUtils
Parameters:
suffix - the string to add to the suffix of ';' and/or ':'
Returns:
Map of system property keys to its value

getSystemPropertiesFormatted

public Map<String,String> getSystemPropertiesFormatted(String suffix)
Description copied from interface: ExtendedSystemInfoUtils
For each system properties, display the key and its value. If the value is a path, then break the paths at semi colons ';' (For non-windows operatin systems, breaks on colon ':' as well). The break is accomplished by replacing the ';' or ':' with the suffix string argument

Specified by:
getSystemPropertiesFormatted in interface ExtendedSystemInfoUtils
Parameters:
suffix - the string to add to the suffix of ';' and/or ':'
Returns:
Map of system property keys to its value

getLicenseInfo

public Map<String,String> getLicenseInfo()
Specified by:
getLicenseInfo in interface ExtendedSystemInfoUtils
Returns:
details of the current license

getJvmStats

public Map<String,String> getJvmStats()
Specified by:
getJvmStats in interface ExtendedSystemInfoUtils
Returns:
memory statistics for the JVM

getCommonConfigProperties

public Map<String,String> getCommonConfigProperties()
Description copied from interface: ExtendedSystemInfoUtils
The common configuration properties that apply to this instance of JIRA

Specified by:
getCommonConfigProperties in interface ExtendedSystemInfoUtils
Returns:
a Map of property names to

getMemoryPoolInformation

public List<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation> getMemoryPoolInformation()
Specified by:
getMemoryPoolInformation in interface ExtendedSystemInfoUtils
Returns:
memory pool statistics for the JVM

getBuildStats

public Map<String,String> getBuildStats()
Specified by:
getBuildStats in interface ExtendedSystemInfoUtils
Returns:
information about the current build of JIRA

getUpgradeHistory

public List<UpgradeHistoryItem> getUpgradeHistory()
Specified by:
getUpgradeHistory in interface ExtendedSystemInfoUtils
Returns:
information about the upgrade history of JIRA

getDefaultLanguage

public String getDefaultLanguage()
Specified by:
getDefaultLanguage in interface ExtendedSystemInfoUtils
Returns:
the default language set in the application's properties - rendered in the current user's locale

getBaseUrl

public String getBaseUrl()
Specified by:
getBaseUrl in interface ExtendedSystemInfoUtils
Returns:
the base URL of the application

isUsingSystemLocale

public boolean isUsingSystemLocale()
Description copied from interface: ExtendedSystemInfoUtils
Checks whether the default locale has been set or not.

Specified by:
isUsingSystemLocale in interface ExtendedSystemInfoUtils
Returns:
true if default locale is set, false if using system locale

getUsageStats

public Map<String,String> getUsageStats()
Specified by:
getUsageStats in interface ExtendedSystemInfoUtils
Returns:
usage statistics for the application (user counts, issue counts, etc)

getEntityEngineXmlPath

public String getEntityEngineXmlPath()
Specified by:
getEntityEngineXmlPath in interface ExtendedSystemInfoUtils
Returns:
the path to the entityengine.xml file

getLogPath

public String getLogPath()
Specified by:
getLogPath in interface ExtendedSystemInfoUtils
Returns:
the path to the atlassian-jira.log file

getIndexLocation

public String getIndexLocation()
Specified by:
getIndexLocation in interface ExtendedSystemInfoUtils
Returns:
the path to the application's index file

getAttachmentsLocation

public String getAttachmentsLocation()
Specified by:
getAttachmentsLocation in interface ExtendedSystemInfoUtils
Returns:
the path to the attachments directory

getBackupLocation

public String getBackupLocation()
Specified by:
getBackupLocation in interface ExtendedSystemInfoUtils
Returns:
the path to the backup directory

getJiraHomeLocation

public String getJiraHomeLocation()
Specified by:
getJiraHomeLocation in interface ExtendedSystemInfoUtils
Returns:
the current configured location of JIRA Home

getListeners

public Collection<org.ofbiz.core.entity.GenericValue> getListeners()
Specified by:
getListeners in interface ExtendedSystemInfoUtils
Returns:
a collection of raw listener GVs

getServices

public Collection<JiraServiceContainer> getServices()
Specified by:
getServices in interface ExtendedSystemInfoUtils
Returns:
a collection of JiraServiceContainers for each service

getServicePropertyMap

public Map<String,String> getServicePropertyMap(JiraServiceContainer serviceContainer)
Specified by:
getServicePropertyMap in interface ExtendedSystemInfoUtils
Parameters:
serviceContainer - the service object to obtain properties for
Returns:
a map of properties relating to the service configuration

getMillisecondsToMinutes

public long getMillisecondsToMinutes(long ms)
Specified by:
getMillisecondsToMinutes in interface ExtendedSystemInfoUtils
Parameters:
ms - milliseconds
Returns:
the number of minutes represented by the specified number of milliseconds

getPlugins

public Collection<com.atlassian.plugin.Plugin> getPlugins()
Specified by:
getPlugins in interface ExtendedSystemInfoUtils
Returns:
a collection of plugins

isPluginEnabled

public boolean isPluginEnabled(com.atlassian.plugin.Plugin plugin)
Specified by:
isPluginEnabled in interface ExtendedSystemInfoUtils
Parameters:
plugin - the plugin
Returns:
true if the plugin is currently enabled; false otherwise

getTrustedApplications

public Set<TrustedApplicationInfo> getTrustedApplications(JiraServiceContext jiraServiceContext)
Specified by:
getTrustedApplications in interface ExtendedSystemInfoUtils
Parameters:
jiraServiceContext - the JIRA service context
Returns:
a set of TrustedApplicationInfo objects

getIPMatches

public Set<String> getIPMatches(TrustedApplicationInfo info)
Specified by:
getIPMatches in interface ExtendedSystemInfoUtils
Parameters:
info - the trusted application
Returns:
the set of IP matches defined for this trusted app

getUrlMatches

public Set<String> getUrlMatches(TrustedApplicationInfo info)
Specified by:
getUrlMatches in interface ExtendedSystemInfoUtils
Parameters:
info - the trusted application
Returns:
the set of URL matches defined for this trusted app

isJvmJava5OrGreater

public boolean isJvmJava5OrGreater()
Specified by:
isJvmJava5OrGreater in interface ExtendedSystemInfoUtils
Returns:
true if using a 1.5 or higher JVM, false otherwise.


Copyright © 2002-2013 Atlassian. All Rights Reserved.