/** * Creates a matcher that matches when none of the supplied matchers match. * * @param matchers the matchers to match. * @return a matcher that matches when none of the supplied matchers match. */ @NonNull public static CredentialsMatcher noneOf(@NonNull CredentialsMatcher... matchers) { return not(anyOf(matchers)); }
/** * Creates a matcher that matches when none of the supplied matchers match. * * @param matchers the matchers to match. * @return a matcher that matches when none of the supplied matchers match. */ @NonNull public static CredentialsMatcher noneOf(@NonNull CredentialsMatcher... matchers) { return not(anyOf(matchers)); }
/** * {@inheritDoc} */ @NonNull @Override public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @NonNull Item item, @Nullable Authentication authentication, @NonNull List<DomainRequirement> domainRequirements) { if (ACL.SYSTEM.equals(authentication)) { return DomainCredentials.getCredentials(SystemCredentialsProvider.getInstance() .getDomainCredentialsMap(), type, domainRequirements, not(withScope(SYSTEM))); } return new ArrayList<C>(); }
/** * {@inheritDoc} */ @NonNull @Override public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @NonNull Item item, @Nullable Authentication authentication, @NonNull List<DomainRequirement> domainRequirements) { if (ACL.SYSTEM.equals(authentication)) { return DomainCredentials.getCredentials(SystemCredentialsProvider.getInstance() .getDomainCredentialsMap(), type, domainRequirements, not(withScope(SYSTEM))); } return new ArrayList<C>(); }
/** * {@inheritDoc} */ @NonNull @Override public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @Nullable ItemGroup itemGroup, @Nullable Authentication authentication, @NonNull List<DomainRequirement> domainRequirements) { if (ACL.SYSTEM.equals(authentication)) { CredentialsMatcher matcher = Jenkins.getInstance() == itemGroup ? always() : not(withScope(SYSTEM)); return DomainCredentials.getCredentials(SystemCredentialsProvider.getInstance() .getDomainCredentialsMap(), type, domainRequirements, matcher); } return new ArrayList<C>(); }
/** * {@inheritDoc} */ @NonNull @Override public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @Nullable ItemGroup itemGroup, @Nullable Authentication authentication, @NonNull List<DomainRequirement> domainRequirements) { if (ACL.SYSTEM.equals(authentication)) { CredentialsMatcher matcher = Jenkins.getInstance() == itemGroup ? always() : not(withScope(SYSTEM)); return DomainCredentials.getCredentials(SystemCredentialsProvider.getInstance() .getDomainCredentialsMap(), type, domainRequirements, matcher); } return new ArrayList<C>(); }