public class CredentialUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static hudson.util.ListBoxModel | getAllCredentialsListBoxModel(hudson.model.Item item,
                             String credentialId)Gets all the System credentials from a given Item context, as a ListBoxModel. | 
| static List<com.cloudbees.plugins.credentials.common.StandardCredentials> | getAllSystemCredentials(hudson.model.Item item)Gets all the System credentials from a given Item context. | 
| static List<com.cloudbees.plugins.credentials.common.StandardCredentials> | getAllUserScopedCredentials(hudson.model.Item item)Gets all the User credentials (for the currently logged in user) from a given Item context. | 
| static List<com.cloudbees.plugins.credentials.common.StandardCredentials> | getAllUserScopedCredentials(hudson.model.Item item,
                           org.acegisecurity.Authentication authentication)Gets all the User credentials from a given Item context. | 
| static hudson.util.ListBoxModel | getUserScopedCredentialsListBoxModel(hudson.model.Item item,
                                    String credentialId)Gets all the User credentials from a given Item context, as a ListBoxModel. | 
| static boolean | hasNonUsernamePasswordCredentials(Collection<com.cloudbees.plugins.credentials.common.StandardCredentials> credentials,
                                 Set<String> credentialIds)Checks if the input has any credential ID belonging to any credential type other than UsernamePasswordCredentials. | 
public static List<com.cloudbees.plugins.credentials.common.StandardCredentials> getAllSystemCredentials(@Nullable hudson.model.Item item)
item - the context.public static boolean hasNonUsernamePasswordCredentials(Collection<com.cloudbees.plugins.credentials.common.StandardCredentials> credentials, Set<String> credentialIds)
credentialIds - credentials to Check.public static hudson.util.ListBoxModel getAllCredentialsListBoxModel(@Nullable hudson.model.Item item, String credentialId)
item - the context.credentialId - the previously selected Credential ID.public static List<com.cloudbees.plugins.credentials.common.StandardCredentials> getAllUserScopedCredentials(@Nullable hudson.model.Item item)
item - the context.public static List<com.cloudbees.plugins.credentials.common.StandardCredentials> getAllUserScopedCredentials(@Nullable hudson.model.Item item, @Nullable org.acegisecurity.Authentication authentication)
item - the context.authentication - the authentication of the user where the Credentials are located.public static hudson.util.ListBoxModel getUserScopedCredentialsListBoxModel(@Nullable hudson.model.Item item, String credentialId)
item - the context.credentialId - the previously selected Credential ID.Copyright © 2016–2025. All rights reserved.