|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.Descriptor<Config>
org.jenkinsci.lib.configprovider.ConfigProvider
org.jenkinsci.lib.configprovider.AbstractConfigProviderImpl
public abstract class AbstractConfigProviderImpl
Partial default implementation of ConfigProvider.
Subtype must call the load() method in the constructor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class hudson.model.Descriptor |
|---|
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
protected Map<String,Config> |
configs
|
| Fields inherited from class hudson.model.Descriptor |
|---|
clazz |
| Fields inherited from interface hudson.model.Saveable |
|---|
NOOP |
| Constructor Summary | |
|---|---|
AbstractConfigProviderImpl()
|
|
| Method Summary | ||
|---|---|---|
Collection<Config> |
getAllConfigs()
returns all the configs of this provider |
|
Config |
getConfigById(String configId)
Returns the config item identified by this id. |
|
|
getConfigByIdTyped(String configId)
same as ConfigProvider.getConfigById(String), but wihout the need for cast |
|
protected hudson.XmlFile |
getConfigXml()
|
|
String |
getProviderId()
An ID uniquely identifying this provider, the id of each Config must start with this ID separated by a '.'! |
|
protected String |
getXmlFileName()
|
|
boolean |
isResponsibleFor(String configId)
Whether this provider is responsible for a Config with the given Id. |
|
void |
load()
Overridden for backward compatibility to let subtype customize the file name. |
|
Config |
newConfig()
Returns a new Config object with a unique id, starting with the id of this provider - separated by '.'. |
|
void |
remove(String configId)
Removes/deletes the config with the given Id |
|
void |
save()
Saves the configuration info to the disk. |
|
void |
save(Config config)
save the content of the given config. |
|
| Methods inherited from class org.jenkinsci.lib.configprovider.ConfigProvider |
|---|
all, getContentType |
| Methods inherited from class hudson.model.Descriptor |
|---|
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, self, toArray, toList, toMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Config> configs
| Constructor Detail |
|---|
public AbstractConfigProviderImpl()
| Method Detail |
|---|
public Collection<Config> getAllConfigs()
ConfigProvider
getAllConfigs in class ConfigProviderpublic Config getConfigById(String configId)
ConfigProvider
getConfigById in class ConfigProviderconfigId - the id
public <T extends Config> T getConfigByIdTyped(String configId)
ConfigProviderConfigProvider.getConfigById(String), but wihout the need for cast
getConfigByIdTyped in class ConfigProviderconfigId - the id
public String getProviderId()
ConfigProviderConfig must start with this ID separated by a '.'!
getProviderId in class ConfigProviderpublic boolean isResponsibleFor(String configId)
ConfigProvider
isResponsibleFor in class ConfigProviderconfigId - the id to check
true if the provider takes responsibilitypublic Config newConfig()
ConfigProviderConfig object with a unique id, starting with the id of this provider - separated by '.'. e.g. "MyCustomProvider.123456". This object is also used initialize the user
interface.
newConfig in class ConfigProviderpublic void remove(String configId)
ConfigProvider
remove in class ConfigProviderconfigId - the idpublic void save(Config config)
ConfigProvider
save in class ConfigProviderconfig - the config to be savedpublic void save()
save in interface hudson.model.Saveablesave in class hudson.model.Descriptor<Config>public void load()
load in class hudson.model.Descriptor<Config>protected hudson.XmlFile getConfigXml()
protected String getXmlFileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||