Class SystemCredentialsProvider
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<SystemCredentialsProvider>
-
- com.cloudbees.plugins.credentials.SystemCredentialsProvider
-
- All Implemented Interfaces:
Describable<SystemCredentialsProvider>
,Saveable
@Extension public class SystemCredentialsProvider extends AbstractDescribableImpl<SystemCredentialsProvider> implements Saveable
The root store of credentials.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SystemCredentialsProvider.DescriptorImpl
Our management link descriptor.static class
SystemCredentialsProvider.ProviderImpl
static class
SystemCredentialsProvider.StoreImpl
OurCredentialsStore
.static class
SystemCredentialsProvider.UserFacingAction
Expose the store.
-
Constructor Summary
Constructors Constructor Description SystemCredentialsProvider()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
forceLoadDuringStartup()
Ensure the credentials are loaded using SYSTEM during the startup and migration occurs as expectedstatic XmlFile
getConfigFile()
Gets the configuration file that thisCredentialsProvider
uses to store its credentials.List<Credentials>
getCredentials()
Get all the (Domain.global()
) credentials.List<DomainCredentials>
getDomainCredentials()
Get all the credentials.Map<Domain,List<Credentials>>
getDomainCredentialsMap()
Get all the credentials.static SystemCredentialsProvider
getInstance()
Gets the singleton instance.void
save()
void
setDomainCredentialsMap(Map<Domain,List<Credentials>> domainCredentialsMap)
Set all the credentials.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
forceLoadDuringStartup
@Initializer(after=JOB_LOADED) public static void forceLoadDuringStartup()
Ensure the credentials are loaded using SYSTEM during the startup and migration occurs as expected
-
getConfigFile
public static XmlFile getConfigFile()
Gets the configuration file that thisCredentialsProvider
uses to store its credentials.- Returns:
- the configuration file that this
CredentialsProvider
uses to store its credentials.
-
getInstance
public static SystemCredentialsProvider getInstance()
Gets the singleton instance.- Returns:
- the singleton instance.
-
getCredentials
public List<Credentials> getCredentials()
Get all the (Domain.global()
) credentials.- Returns:
- all the (
Domain.global()
) credentials.
-
getDomainCredentials
public List<DomainCredentials> getDomainCredentials()
Get all the credentials.- Returns:
- all the credentials.
- Since:
- 1.5
-
getDomainCredentialsMap
@NonNull public Map<Domain,List<Credentials>> getDomainCredentialsMap()
Get all the credentials.- Returns:
- all the credentials.
- Since:
- 1.5
-
setDomainCredentialsMap
public void setDomainCredentialsMap(Map<Domain,List<Credentials>> domainCredentialsMap)
Set all the credentials.- Parameters:
domainCredentialsMap
- all the credentials.- Since:
- 1.5
-
save
public void save() throws IOException
- Specified by:
save
in interfaceSaveable
- Throws:
IOException
-
-