Package hudson.plugins.locale
Class PluginImpl
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- hudson.plugins.locale.PluginImpl
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension @Symbol("locale") public class PluginImpl extends GlobalConfiguration
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description PluginImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jsonObject)
static PluginImpl
get()
protected XmlFile
getConfigFile()
String
getSystemLocale()
static void
init()
boolean
isIgnoreAcceptLanguage()
void
load()
static Locale
parse(String s)
Parses a string like "ja_JP" into aLocale
object.void
setIgnoreAcceptLanguage(boolean ignoreAcceptLanguage)
Sets whether the plugin should take user preferences into account.void
setSystemLocale(String systemLocale)
-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
get
public static PluginImpl get()
-
getConfigFile
protected XmlFile getConfigFile()
- Overrides:
getConfigFile
in classDescriptor<GlobalConfiguration>
-
init
@Initializer(after=EXTENSIONS_AUGMENTED) public static void init() throws Exception
- Throws:
Exception
-
load
public void load()
- Overrides:
load
in classDescriptor<GlobalConfiguration>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jsonObject) throws Descriptor.FormException
- Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
isIgnoreAcceptLanguage
public boolean isIgnoreAcceptLanguage()
-
getSystemLocale
public String getSystemLocale()
-
setSystemLocale
public void setSystemLocale(String systemLocale)
-
setIgnoreAcceptLanguage
public void setIgnoreAcceptLanguage(boolean ignoreAcceptLanguage)
Sets whether the plugin should take user preferences into account.- Parameters:
ignoreAcceptLanguage
- Iftrue
, Ignore browser preference and force this language to all users- Since:
- 1.3
-
-