Tabnine Logo
CredentialsStore.getProvider
Code IndexAdd Tabnine to your IDE (free)

How to use
getProvider
method
in
com.cloudbees.plugins.credentials.CredentialsStore

Best Java code snippets using com.cloudbees.plugins.credentials.CredentialsStore.getProvider (Showing top 20 results out of 315)

origin: org.jenkins-ci.plugins/credentials

/**
 * {@inheritDoc}
 */
@Override
public String getIconClassName() {
  return store.getProvider().getIconClassName();
}
origin: org.jenkins-ci.plugins/credentials

/**
 * {@inheritDoc}
 */
@Override
public String getIconClassName() {
  return store.getProvider().getIconClassName();
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Exposes the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 *
 * @return the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 */
public String getDescription() {
  return store.getProvider().getDisplayName();
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Exposes the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 *
 * @return the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 */
public String getDescription() {
  return store.getProvider().getDisplayName();
}
origin: jenkinsci/credentials-plugin

/**
 * {@inheritDoc}
 */
@Override
public String getIconClassName() {
  return store.getProvider().getIconClassName();
}
origin: jenkinsci/credentials-plugin

/**
 * Exposes the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 *
 * @return the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 */
public String getDescription() {
  return store.getProvider().getDisplayName();
}
origin: jenkinsci/credentials-plugin

/**
 * {@inheritDoc}
 */
@Override
public String getIconClassName() {
  return store.getProvider().getIconClassName();
}
origin: jenkinsci/credentials-plugin

/**
 * Exposes the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 *
 * @return the description of this store (i.e. the {@link CredentialsProvider#getDisplayName()}.
 */
public String getDescription() {
  return store.getProvider().getDisplayName();
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Returns the {@link CredentialsProvider} or dies trying.
 *
 * @return the {@link CredentialsProvider}
 * @since 2.0
 */
@NonNull
public final CredentialsProvider getProviderOrDie() {
  CredentialsProvider provider = getProvider();
  if (provider == null) {
    // we can only construct an instance if we were given the providerClass or we successfully inferred it
    // thus if the provider is missing it must have been removed from the extension list, e.g. by an admin
    // that wanted to block that provider from users before the addition of provider visibility controls
    throw new IllegalStateException("The credentials provider " + providerClass
        + " has been removed from the list of active extension points");
  }
  return provider;
}
origin: jenkinsci/credentials-plugin

/**
 * Returns the {@link CredentialsProvider} or dies trying.
 *
 * @return the {@link CredentialsProvider}
 * @since 2.0
 */
@NonNull
public final CredentialsProvider getProviderOrDie() {
  CredentialsProvider provider = getProvider();
  if (provider == null) {
    // we can only construct an instance if we were given the providerClass or we successfully inferred it
    // thus if the provider is missing it must have been removed from the extension list, e.g. by an admin
    // that wanted to block that provider from users before the addition of provider visibility controls
    throw new IllegalStateException("The credentials provider " + providerClass
        + " has been removed from the list of active extension points");
  }
  return provider;
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Returns the {@link CredentialsScope} instances that are applicable to this store.
 * @return the {@link CredentialsScope} instances that are applicable to this store or {@code null} if the store
 * instance is no longer enabled.
 *
 * @since 2.1.5
 */
@Nullable
public final Set<CredentialsScope> getScopes() {
  CredentialsProvider provider = getProvider();
  return provider == null ? null : provider.getScopes(getContext());
}
origin: jenkinsci/credentials-plugin

/**
 * Returns the {@link CredentialsScope} instances that are applicable to this store.
 * @return the {@link CredentialsScope} instances that are applicable to this store or {@code null} if the store
 * instance is no longer enabled.
 *
 * @since 2.1.5
 */
@Nullable
public final Set<CredentialsScope> getScopes() {
  CredentialsProvider provider = getProvider();
  return provider == null ? null : provider.getScopes(getContext());
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Returns the list of {@link CredentialsDescriptor} instances that are applicable within this
 * {@link CredentialsStore}.
 *
 * @return the list of {@link CredentialsDescriptor} instances that are applicable within this
 * {@link CredentialsStore}.
 * @since 2.0
 */
public final List<CredentialsDescriptor> getCredentialsDescriptors() {
  CredentialsProvider provider = getProvider();
  List<CredentialsDescriptor> result =
      DescriptorVisibilityFilter.apply(this, ExtensionList.lookup(CredentialsDescriptor.class));
  if (provider != null && provider.isEnabled()) {
    if (!(result instanceof ArrayList)) {
      // should never happen, but let's be defensive in case the DescriptorVisibilityFilter contract changes
      result = new ArrayList<CredentialsDescriptor>(result);
    }
    for (Iterator<CredentialsDescriptor> iterator = result.iterator(); iterator.hasNext(); ) {
      CredentialsDescriptor d = iterator.next();
      if (!_isApplicable(d) || !provider._isApplicable(d) || !d.isApplicable(provider)) {
        iterator.remove();
      }
    }
  }
  return result;
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Constructor.
 *
 * @param store the store.
 */
public StoreItem(CredentialsStore store) {
  this.store = store;
  String provider = store.getProvider().getClass().getName();
  String resolver = null;
  String token = null;
  ModelObject storeContext = store.getContext();
  // we only support the cases where the
  for (ContextResolver r : ExtensionList.lookup(ContextResolver.class)) {
    String t = r.getToken(storeContext);
    if (t != null) {
      resolver = r.getClass().getName();
      token = t;
      break;
    }
  }
  this.url = token == null
      ? null
      : String.format(
          "descriptor/%s/resolver/%s/provider/%s/context/%s",
          CredentialsSelectHelper.class.getName(),
          Util.rawEncode(resolver),
          Util.rawEncode(provider),
          Util.rawEncode(token)
      );
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Determines if the specified {@link Descriptor} is applicable to this {@link CredentialsStore}.
 * <p>
 * The default implementation consults the {@link DescriptorVisibilityFilter}s, {@link #_isApplicable(Descriptor)}
 * and the {@link #getProviderOrDie()}.
 *
 * @param descriptor the {@link Descriptor} to check.
 * @return {@code true} if the supplied {@link Descriptor} is applicable in this {@link CredentialsStore}
 * @since 2.0
 */
public final boolean isApplicable(Descriptor<?> descriptor) {
  for (DescriptorVisibilityFilter filter : DescriptorVisibilityFilter.all()) {
    if (!filter.filter(this, descriptor)) {
      return false;
    }
  }
  CredentialsProvider provider = getProvider();
  return _isApplicable(descriptor) && (provider == null || provider.isApplicable(descriptor));
}
origin: jenkinsci/pipeline-model-definition-plugin

private CredentialsStore getFolderStore(Folder f) {
  Iterable<CredentialsStore> stores = CredentialsProvider.lookupStores(f);
  CredentialsStore folderStore = null;
  for (CredentialsStore s : stores) {
    if (s.getProvider() instanceof FolderCredentialsProvider && s.getContext() == f) {
      folderStore = s;
      break;
    }
  }
  return folderStore;
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Checks if this action should be visible.
 *
 * @return {@code true} if the action should be visible.
 */
public boolean isVisible() {
  CredentialsStore store = getStore();
  if (!store.getProvider().isEnabled()) {
    return false;
  }
  CredentialsStoreAction storeAction = store.getStoreAction();
  if (storeAction != null && this != storeAction) {
    // 2.0+ implementations of CredentialsStore should be returning their action via getStoreAction()
    // and we want to display that action from ViewCredentialsAction
    // Old implementations will be returning null from getStoreAction() so we let them display as before
    // Forward looking implementations written against the old API will want to "hide" their old
    // action and display the new one returned from getStoreAction() which is what this hook enables.
    return false;
  }
  return store.hasPermission(CredentialsProvider.VIEW) && !store.getCredentialsDescriptors().isEmpty();
}
origin: jenkinsci/credentials-plugin

/**
 * Checks if this action should be visible.
 *
 * @return {@code true} if the action should be visible.
 */
public boolean isVisible() {
  CredentialsStore store = getStore();
  if (!store.getProvider().isEnabled()) {
    return false;
  }
  CredentialsStoreAction storeAction = store.getStoreAction();
  if (storeAction != null && this != storeAction) {
    // 2.0+ implementations of CredentialsStore should be returning their action via getStoreAction()
    // and we want to display that action from ViewCredentialsAction
    // Old implementations will be returning null from getStoreAction() so we let them display as before
    // Forward looking implementations written against the old API will want to "hide" their old
    // action and display the new one returned from getStoreAction() which is what this hook enables.
    return false;
  }
  return store.hasPermission(CredentialsProvider.VIEW) && !store.getCredentialsDescriptors().isEmpty();
}
origin: jenkinsci/cloudbees-folder-plugin

private CredentialsStore getFolderStore(Folder f) {
  Iterable<CredentialsStore> stores = CredentialsProvider.lookupStores(f);
  CredentialsStore folderStore = null;
  for (CredentialsStore s : stores) {
    if (s.getProvider() instanceof FolderCredentialsProvider && s.getContext() == f) {
      folderStore = s;
      break;
    }
  }
  return folderStore;
}
origin: jenkinsci/credentials-plugin

/**
 * Determines if the specified {@link Descriptor} is applicable to this {@link CredentialsStore}.
 * <p>
 * The default implementation consults the {@link DescriptorVisibilityFilter}s, {@link #_isApplicable(Descriptor)}
 * and the {@link #getProviderOrDie()}.
 *
 * @param descriptor the {@link Descriptor} to check.
 * @return {@code true} if the supplied {@link Descriptor} is applicable in this {@link CredentialsStore}
 * @since 2.0
 */
public final boolean isApplicable(Descriptor<?> descriptor) {
  for (DescriptorVisibilityFilter filter : DescriptorVisibilityFilter.all()) {
    if (!filter.filter(this, descriptor)) {
      return false;
    }
  }
  CredentialsProvider provider = getProvider();
  return _isApplicable(descriptor) && (provider == null || provider.isApplicable(descriptor));
}
com.cloudbees.plugins.credentialsCredentialsStoregetProvider

Javadoc

Returns the CredentialsProvider.

Popular methods of CredentialsStore

  • addCredentials
    Adds the specified Credentials within the specified Domain for this CredentialsStore.
  • getDomains
    Returns all the com.cloudbees.plugins.credentials.domains.Domains that this credential provider has.
  • addDomain
    Adds a new Domain with seed credentials.
  • getContext
    Returns the context within which this store operates. Credentials in this store will be available to
  • getCredentials
    Returns an unmodifiable list of credentials for the specified domain.
  • isDomainsModifiable
    Identifies whether this CredentialsStore supports making changes to the list of domains or whether i
  • updateCredentials
    Updates the specified Credentials from the specified Domain for this CredentialsStore with the suppl
  • _isApplicable
    CredentialsStore subtypes can override this method to veto some Descriptors from being available fro
  • checkPermission
    Checks if the current security principal has this permission. Note: This is just a convenience funct
  • getACL
  • getContextDisplayName
    Returns the display name of the #getContext() of this CredentialsStore. The default implementation c
  • getCredentialsDescriptors
    Returns the list of CredentialsDescriptor instances that are applicable within this CredentialsStore
  • getContextDisplayName,
  • getCredentialsDescriptors,
  • getRelativeLinkToAction,
  • getRelativeLinkToContext,
  • getScopes,
  • getStoreAction,
  • hasPermission,
  • isOverridden,
  • removeCredentials

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Notification (javax.management)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JTextField (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now