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

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

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

origin: org.jenkins-ci.plugins/credentials

/**
 * Exposes {@link CredentialsStore#isDomainsModifiable()} for Jelly.
 *
 * @return {@link CredentialsStore#isDomainsModifiable()}.
 */
public boolean isDomainsModifiable() {
  return getStore().isDomainsModifiable();
}
origin: jenkinsci/credentials-plugin

/**
 * Exposes {@link CredentialsStore#isDomainsModifiable()} for Jelly.
 *
 * @return {@link CredentialsStore#isDomainsModifiable()}.
 */
public boolean isDomainsModifiable() {
  return getStore().isDomainsModifiable();
}
origin: org.jenkins-ci.plugins/credentials

  return;
if (req.getMethod().equals("POST") && getStore().isDomainsModifiable()) {
if (req.getMethod().equals("DELETE") && getStore().isDomainsModifiable()) {
  if (getStore().removeDomain(domain)) {
    return;
origin: jenkinsci/subversion-plugin

if (store.isDomainsModifiable()) {
  Matcher matcher = Pattern.compile("\\s*<([^>]+)>.*").matcher(legacyRealm);
  if (matcher.matches()) {
origin: jenkinsci/credentials-plugin

  return;
if (req.getMethod().equals("POST") && getStore().isDomainsModifiable()) {
if (req.getMethod().equals("DELETE") && getStore().isDomainsModifiable()) {
  if (getStore().removeDomain(domain)) {
    return;
origin: org.jenkins-ci.plugins/credentials

public HttpResponse doCreateDomain(StaplerRequest req) throws ServletException, IOException {
  getStore().checkPermission(MANAGE_DOMAINS);
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(HttpServletResponse.SC_BAD_REQUEST);
origin: org.jenkins-ci.plugins/credentials

  return HttpResponses.status(400);
if (!destinationStore.isDomainsModifiable()) {
  return HttpResponses.status(400);
origin: jenkinsci/credentials-plugin

public HttpResponse doCreateDomain(StaplerRequest req) throws ServletException, IOException {
  getStore().checkPermission(MANAGE_DOMAINS);
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(HttpServletResponse.SC_BAD_REQUEST);
origin: jenkinsci/credentials-plugin

  return HttpResponses.status(400);
if (!destinationStore.isDomainsModifiable()) {
  return HttpResponses.status(400);
origin: org.jenkins-ci.plugins/credentials

/**
 * Creates the context menu with the supplied prefix to all URLs.
 *
 * @param prefix the prefix to prepend to relative urls.
 * @return the {@link ContextMenu} or {@code null}
 * @since 2.0
 */
@CheckForNull
public ContextMenu getContextMenu(String prefix) {
  ContextMenu menu = new ContextMenu();
  if (getStore().isDomainsModifiable() && getStore().hasPermission(MANAGE_DOMAINS)) {
    menu.add(ContextMenuIconUtils.buildUrl(prefix, "newDomain"),
        getMenuItemIconUrlByClassSpec("icon-credentials-new-domain icon-md"),
        Messages.CredentialsStoreAction_AddDomainAction()
    );
  }
  for (Action action : getActions()) {
    ContextMenuIconUtils.addMenuItem(menu, prefix, action);
  }
  return menu.items.isEmpty() ? null : menu;
}
origin: jenkinsci/credentials-plugin

/**
 * Creates the context menu with the supplied prefix to all URLs.
 *
 * @param prefix the prefix to prepend to relative urls.
 * @return the {@link ContextMenu} or {@code null}
 * @since 2.0
 */
@CheckForNull
public ContextMenu getContextMenu(String prefix) {
  ContextMenu menu = new ContextMenu();
  if (getStore().isDomainsModifiable() && getStore().hasPermission(MANAGE_DOMAINS)) {
    menu.add(ContextMenuIconUtils.buildUrl(prefix, "newDomain"),
        getMenuItemIconUrlByClassSpec("icon-credentials-new-domain icon-md"),
        Messages.CredentialsStoreAction_AddDomainAction()
    );
  }
  for (Action action : getActions()) {
    ContextMenuIconUtils.addMenuItem(menu, prefix, action);
  }
  return menu.items.isEmpty() ? null : menu;
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Deletes a domain.
 *
 * @param req the request.
 * @return the response.
 * @throws IOException if something goes wrong.
 */
@RequirePOST
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doDoDelete(StaplerRequest req) throws IOException {
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(400);
  }
  getStore().checkPermission(MANAGE_DOMAINS);
  if (getStore().removeDomain(domain)) {
    return HttpResponses.redirectTo("../..");
  }
  return HttpResponses.redirectToDot();
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Stapler web binding for adding credentials to the domain.
 *
 * @param req the request.
 * @param rsp the response.
 * @throws IOException      if something goes wrong.
 * @throws ServletException if something goes wrong.
 */
@RequirePOST
public void doAddCredentials(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  if (!store.isDomainsModifiable()) {
    hudson.util.HttpResponses.status(400).generateResponse(req, rsp, null);
    FormApply.applyResponse("window.alert('Domain is read-only')").generateResponse(req, rsp, null);
  }
  store.checkPermission(CredentialsStoreAction.CREATE);
  JSONObject data = req.getSubmittedForm();
  String domainName = data.getString("domain");
  CredentialsStoreAction.DomainWrapper wrapper = getWrappers().get(domainName);
  if (!store.getDomains().contains(wrapper.getDomain())) {
    hudson.util.HttpResponses.status(400).generateResponse(req, rsp, null);
    FormApply.applyResponse("window.alert('Store does not have selected domain')")
        .generateResponse(req, rsp, null);
  }
  store.checkPermission(CredentialsStoreAction.CREATE);
  Credentials credentials = req.bindJSON(Credentials.class, data.getJSONObject("credentials"));
  store.addCredentials(wrapper.getDomain(), credentials);
  FormApply.applyResponse("window.credentials.refreshAll();").generateResponse(req, rsp, null);
}
origin: jenkinsci/credentials-plugin

/**
 * Deletes a domain.
 *
 * @param req the request.
 * @return the response.
 * @throws IOException if something goes wrong.
 */
@RequirePOST
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doDoDelete(StaplerRequest req) throws IOException {
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(400);
  }
  getStore().checkPermission(MANAGE_DOMAINS);
  if (getStore().removeDomain(domain)) {
    return HttpResponses.redirectTo("../..");
  }
  return HttpResponses.redirectToDot();
}
origin: jenkinsci/credentials-plugin

/**
 * Stapler web binding for adding credentials to the domain.
 *
 * @param req the request.
 * @param rsp the response.
 * @throws IOException      if something goes wrong.
 * @throws ServletException if something goes wrong.
 */
@RequirePOST
public void doAddCredentials(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  if (!store.isDomainsModifiable()) {
    hudson.util.HttpResponses.status(400).generateResponse(req, rsp, null);
    FormApply.applyResponse("window.alert('Domain is read-only')").generateResponse(req, rsp, null);
  }
  store.checkPermission(CredentialsStoreAction.CREATE);
  JSONObject data = req.getSubmittedForm();
  String domainName = data.getString("domain");
  CredentialsStoreAction.DomainWrapper wrapper = getWrappers().get(domainName);
  if (!store.getDomains().contains(wrapper.getDomain())) {
    hudson.util.HttpResponses.status(400).generateResponse(req, rsp, null);
    FormApply.applyResponse("window.alert('Store does not have selected domain')")
        .generateResponse(req, rsp, null);
  }
  store.checkPermission(CredentialsStoreAction.CREATE);
  Credentials credentials = req.bindJSON(Credentials.class, data.getJSONObject("credentials"));
  store.addCredentials(wrapper.getDomain(), credentials);
  FormApply.applyResponse("window.credentials.refreshAll();").generateResponse(req, rsp, null);
}
origin: org.jenkins-ci.plugins/credentials

/**
 * Updates the domain configuration.
 *
 * @param req the request.
 * @return the response.
 * @throws ServletException if something goes wrong.
 * @throws IOException      if something goes wrong.
 */
@RequirePOST
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doConfigSubmit(StaplerRequest req) throws ServletException, IOException {
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(400);
  }
  getStore().checkPermission(MANAGE_DOMAINS);
  JSONObject data = req.getSubmittedForm();
  Domain domain = req.bindJSON(Domain.class, data);
  String domainName = domain.getName();
  if (domainName != null && getStore().updateDomain(this.domain, domain)) {
    return HttpResponses.redirectTo("../../domain/" + Util.rawEncode(domainName));
  }
  return HttpResponses.redirectToDot();
}
origin: jenkinsci/credentials-plugin

/**
 * Updates the domain configuration.
 *
 * @param req the request.
 * @return the response.
 * @throws ServletException if something goes wrong.
 * @throws IOException      if something goes wrong.
 */
@RequirePOST
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doConfigSubmit(StaplerRequest req) throws ServletException, IOException {
  if (!getStore().isDomainsModifiable()) {
    return HttpResponses.status(400);
  }
  getStore().checkPermission(MANAGE_DOMAINS);
  JSONObject data = req.getSubmittedForm();
  Domain domain = req.bindJSON(Domain.class, data);
  String domainName = domain.getName();
  if (domainName != null && getStore().updateDomain(this.domain, domain)) {
    return HttpResponses.redirectTo("../../domain/" + Util.rawEncode(domainName));
  }
  return HttpResponses.redirectToDot();
}
com.cloudbees.plugins.credentialsCredentialsStoreisDomainsModifiable

Javadoc

Identifies whether this CredentialsStore supports making changes to the list of domains or whether it only supports a fixed set of domains (which may only be one domain).

Note: in order for implementations to return true all of the following methods must be overridden:

  • #getDomains
  • #addDomain(Domain,java.util.List)
  • #removeDomain(Domain)
  • #updateDomain(Domain,Domain)

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
  • getProvider
    Returns the CredentialsProvider.
  • getCredentials
    Returns an unmodifiable list of credentials for the specified domain.
  • 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
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JComboBox (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