org.sonar.api.checks.templates
Class BundleCheckTemplate

java.lang.Object
  extended by org.sonar.api.checks.templates.CheckTemplate
      extended by org.sonar.api.checks.templates.BundleCheckTemplate

public class BundleCheckTemplate
extends CheckTemplate

Internationalized check template. Translations are loaded from resource bundles (properties files in the classpath)

Since:
2.1

Field Summary
 
Fields inherited from class org.sonar.api.checks.templates.CheckTemplate
configKey, isoCategory, key, priority, properties
 
Constructor Summary
protected BundleCheckTemplate(java.lang.String key, java.lang.Class bundleClass)
           
protected BundleCheckTemplate(java.lang.String key, java.lang.String bundleBaseName)
           
 
Method Summary
protected  java.util.ResourceBundle getBundle(java.util.Locale locale)
           
protected  java.lang.String getDefaultDescription()
           
protected  java.lang.String getDefaultTitle()
           
 java.lang.String getDescription(java.util.Locale locale)
           
 java.lang.String getMessage(java.util.Locale locale, java.lang.String key, java.lang.Object... params)
           
protected  java.lang.String getText(java.lang.String key, java.util.Locale locale, java.lang.String defaultValue)
           
 java.lang.String getTitle(java.util.Locale locale)
           
protected  void setDefaultDescription(java.lang.String defaultDescription)
           
protected  void setDefaultTitle(java.lang.String defaultTitle)
           
 
Methods inherited from class org.sonar.api.checks.templates.CheckTemplate
addProperty, equals, getConfigKey, getIsoCategory, getKey, getPriority, getProperties, getProperty, hashCode, setConfigKey, setIsoCategory, setKey, setPriority
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleCheckTemplate

protected BundleCheckTemplate(java.lang.String key,
                              java.lang.String bundleBaseName)

BundleCheckTemplate

protected BundleCheckTemplate(java.lang.String key,
                              java.lang.Class bundleClass)
Method Detail

getDefaultTitle

protected java.lang.String getDefaultTitle()

setDefaultTitle

protected void setDefaultTitle(java.lang.String defaultTitle)

getDefaultDescription

protected java.lang.String getDefaultDescription()

setDefaultDescription

protected void setDefaultDescription(java.lang.String defaultDescription)

getTitle

public java.lang.String getTitle(java.util.Locale locale)
Specified by:
getTitle in class CheckTemplate

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Specified by:
getDescription in class CheckTemplate

getMessage

public java.lang.String getMessage(java.util.Locale locale,
                                   java.lang.String key,
                                   java.lang.Object... params)
Specified by:
getMessage in class CheckTemplate

getText

protected java.lang.String getText(java.lang.String key,
                                   java.util.Locale locale,
                                   java.lang.String defaultValue)

getBundle

protected java.util.ResourceBundle getBundle(java.util.Locale locale)


Copyright © 2009-2010 SonarSource SA. All Rights Reserved.