public class CredentialManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CredentialManager.CredentialResponse
Represents the list response from Jenkins with the 2.x credentials plugin
|
static class |
CredentialManager.CredentialResponseV1
Represents the list response from Jenkins with the 1.x credentials plugin
|
| Modifier and Type | Field and Description |
|---|---|
static String |
V1URL |
static String |
V2URL |
| Constructor and Description |
|---|
CredentialManager(String version,
JenkinsHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
createCredential(Credential credential,
Boolean crumbFlag)
Create a new credential
|
void |
deleteCredential(String credentialId,
Boolean crumbFlag)
Delete the credential with the given id
|
Map<String,Credential> |
listCredentials()
Return the list of exsting credentials.
|
void |
updateCredential(String credentialId,
Credential credential,
Boolean crumbFlag)
Update an existing credential.
|
public static final String V1URL
public static final String V2URL
public CredentialManager(String version, JenkinsHttpClient client)
public Map<String,Credential> listCredentials() throws IOException
IOExceptionpublic void createCredential(Credential credential, Boolean crumbFlag) throws IOException
credential - the credential instance to create.crumbFlag - IOExceptionpublic void updateCredential(String credentialId, Credential credential, Boolean crumbFlag) throws IOException
credentialId - the id of the credential to updatecredential - the credential to updatecrumbFlag - IOExceptionpublic void deleteCredential(String credentialId, Boolean crumbFlag) throws IOException
credentialId - the id of the credentialcrumbFlag - IOExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.