Class ViewSystemInfoAction

java.lang.Object
org.apache.struts2.ActionSupport
com.opensymphony.xwork2.ActionSupport
All Implemented Interfaces:
WebInterface, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class ViewSystemInfoAction extends ConfluenceActionSupport
See Also:
  • Constructor Details

    • ViewSystemInfoAction

      public ViewSystemInfoAction()
      Keep the blank constructor so Struts can construct the action
    • ViewSystemInfoAction

      public ViewSystemInfoAction(javax.servlet.ServletContext servletContext)
      This constructor is used by the error page (500page.jsp) to create a new action after the ActionContext has been reset.
  • Method Details

    • isPermitted

      public boolean isPermitted()
      Description copied from class: ConfluenceActionSupport
      Overrides:
      isPermitted in class ConfluenceActionSupport
    • execute

      public String execute() throws Exception
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Throws:
      Exception
    • getServletContext

      public javax.servlet.ServletContext getServletContext()
    • getSummaryInfo

      public Map<String,String> getSummaryInfo()
    • getEnvironmentVariables

      public Map<String,String> getEnvironmentVariables()
    • getRuntimeEnvironment

      public Map<String,String> getRuntimeEnvironment()
    • getDatabaseInfo

      public Map<String,String> getDatabaseInfo()
    • getSearchInfo

      public Map<String,String> getSearchInfo()
    • getAttachmentStorageInfo

      public Map<String,String> getAttachmentStorageInfo()
    • getUsageInfo

      public Map<String,String> getUsageInfo()
    • getModifications

      public Map<String,String> getModifications()
    • getMemoryStatistics

      public MemoryInfo getMemoryStatistics()
    • getBuildStats

      public Map<String,Object> getBuildStats()
    • getPlugins

      public Collection<com.atlassian.plugin.Plugin> getPlugins()
    • isPluginEnabled

      public boolean isPluginEnabled(String pluginKey)
    • getPluginEnabledAsEnglish

      public String getPluginEnabledAsEnglish(String pluginKey)
      Get English label of whether a plugin is enabled or disabled.
      Returns:
      "enabled" for enabled plugins or "disabled" for disabled ones
    • getPluginEnabledAsI18nLabel

      public String getPluginEnabledAsI18nLabel(String pluginKey)
      Get internationalised label of whether a plugin is enabled or disabled.
      Returns:
      i18n version of "enabled" for enabled plugins or "disabled" for disabled ones
    • isClustered

      public boolean isClustered()
      Returns:
      true if the server is part of a cluster; otherwise false
    • isDailyBackupEnabled

      public boolean isDailyBackupEnabled()
      Returns:
      true if daily backups are enabled, otherwise false
    • getServerId

      public String getServerId()
      Returns:
      the server Id for this server or null if there is none set.
    • getServerIdOrEnglishNone

      public String getServerIdOrEnglishNone()
      Returns:
      the server Id for this server or "none" if there is none set.
    • getServerIdOrI18nNone

      public String getServerIdOrI18nNone()
      Returns:
      the server Id for this server or localised version of "none.word" if there is none set.
    • getSupportEntitlementNumberOrEnglishNone

      public String getSupportEntitlementNumberOrEnglishNone()
      Returns the license's SupportEntitlementNumber (SEN) if specified in a license, otherwise return none.
      Returns:
      This instance's SupportEntitlementNumber (SEN) or none
    • getSupportEntitlementNumberOrI18nNone

      public String getSupportEntitlementNumberOrI18nNone()
      Returns the license's SupportEntitlementNumber (SEN) if specified in a license or the localisation of "none.word" if the license has no SEN.
      Returns:
      This instance's SupportEntitlementNumber (SEN) or localised version of "none.word".
    • setSidManager

      public void setSidManager(ConfluenceSidManager sidManager)
    • getSystemProperties

      public Map<Object,Object> getSystemProperties()
      Returns:
      the System properties.
    • getSystemPropertiesHtml

      public Map getSystemPropertiesHtml()
      Returns:
      break up some typically long-lined properties using spaces
    • setClusterManager

      public void setClusterManager(ClusterManager clusterManager)
      Parameters:
      clusterManager - the ClusterManager used to discover whether the server is part of a cluster.
    • setScheduledJobManager

      public void setScheduledJobManager(ScheduledJobManager scheduledJobManager)
      Parameters:
      scheduledJobManager - ScheduledJobManager used to discover whether daily back ups are enabled.
    • getEnabledPlugins

      public List<com.atlassian.plugin.Plugin> getEnabledPlugins()
      Retrieves the list of enabled plugins. Returns null when there was a problem retrieving the pluginAccessor
      Returns:
      List containing the enabled plugins
    • setGc

      public void setGc(boolean gc)
    • setLicenseService

      public void setLicenseService(LicenseService licenseService)
    • setPluginMetadataManager

      public void setPluginMetadataManager(com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager)
    • getPercentage

      public static long getPercentage(long numerator, long denom)
      converts a fraction into a percentage
      Parameters:
      numerator - the number to include in the percentage
      denom - the total number
      Returns:
      the percentage as a long integer, rounded
    • getPercentage

      public static long getPercentage(String numeratorAsString, String denomAsString)