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,Loadable,OnMaster
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jsonObject) static PluginImplget()protected XmlFilestatic voidinit()booleanvoidload()static LocaleParses a string like "ja_JP" into aLocaleobject.voidsetIgnoreAcceptLanguage(boolean ignoreAcceptLanguage) Sets whether the plugin should take user preferences into account.voidsetSystemLocale(String systemLocale) Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, 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
-
Constructor Details
-
PluginImpl
public PluginImpl()
-
-
Method Details
-
get
-
getConfigFile
- Overrides:
getConfigFilein classDescriptor<GlobalConfiguration>
-
init
- Throws:
Exception
-
load
public void load()- Specified by:
loadin interfaceLoadable- Overrides:
loadin classDescriptor<GlobalConfiguration>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jsonObject) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
isIgnoreAcceptLanguage
public boolean isIgnoreAcceptLanguage() -
getSystemLocale
-
setSystemLocale
-
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
-
parse
Parses a string like "ja_JP" into aLocaleobject.- Parameters:
s- the locale string using underscores as delimiters- Returns:
- the Locale object
-
getCategory
- Overrides:
getCategoryin classDescriptor<GlobalConfiguration>
-