congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DescribableList.rebuild
Code IndexAdd Tabnine to your IDE (free)

How to use
rebuild
method
in
hudson.util.DescribableList

Best Java code snippets using hudson.util.DescribableList.rebuild (Showing top 20 results out of 315)

origin: jenkinsci/jenkins

/**
 * @deprecated as of 1.271
 *      Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead.
 */
@Deprecated
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, IOException {
  rebuild(req,json,descriptors);
}
origin: jenkinsci/jenkins

@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  super.submit(req,rsp);
  JSONObject json = req.getSubmittedForm();
  getBuildWrappersList().rebuild(req,json, BuildWrappers.getFor(this));
  getBuildersList().rebuildHetero(req,json, Builder.all(), "builder");
  getPublishersList().rebuildHetero(req, json, Publisher.all(), "publisher");
}
origin: jenkinsci/jenkins

  @Override
  public Object onConvert(Type targetType, Class targetTypeErasure, Object jsonSource) {
    if (jsonForProperties != jsonSource) {
      return old.get().onConvert(targetType, targetTypeErasure, jsonSource);
    }
    try {
      DescribableList<NodeProperty<?>, NodePropertyDescriptor> tmp = new DescribableList<NodeProperty<?>, NodePropertyDescriptor>(Saveable.NOOP,getNodeProperties().toList());
      tmp.rebuild(req, jsonForProperties, NodeProperty.all());
      return tmp.toList();
    } catch (FormException e) {
      throw new IllegalArgumentException(e);
    } catch (IOException e) {
      throw new IllegalArgumentException(e);
    }
  }
}));
origin: org.jenkins-ci.main/jenkins-core

@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  super.submit(req,rsp);
  JSONObject json = req.getSubmittedForm();
  getBuildWrappersList().rebuild(req,json, BuildWrappers.getFor(this));
  getBuildersList().rebuildHetero(req,json, Builder.all(), "builder");
  getPublishersList().rebuildHetero(req, json, Publisher.all(), "publisher");
}
origin: jenkinsci/jenkins

  @Override
  public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
    try {
      Jenkins j = Jenkins.get();
      JSONObject np = json.getJSONObject("globalNodeProperties");
      if (!np.isNullObject()) {
        j.getGlobalNodeProperties().rebuild(req, np, NodeProperty.for_(j));
      }
      return true;
    } catch (IOException e) {
      throw new FormException(e,"globalNodeProperties");
    }
  }
}
origin: jenkinsci/jenkins

/**
 * Accepts the update to the node configuration.
 */
@RequirePOST
public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  final Jenkins app = Jenkins.getInstance();
  app.checkPermission(Jenkins.ADMINISTER);
  properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
  this.description = req.getSubmittedForm().getString("description");
  updateTransientActions();
  save();
  FormApply.success(".").generateResponse(req, rsp, null);
}
origin: jenkinsci/jenkins

/**
 * Accepts submission from the node configuration page.
 */
@RequirePOST
public synchronized void doConfigExecutorsSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  checkPermission(ADMINISTER);
  BulkChange bc = new BulkChange(this);
  try {
    JSONObject json = req.getSubmittedForm();
    ExtensionList.lookupSingleton(MasterBuildConfiguration.class).configure(req,json);
    getNodeProperties().rebuild(req, json.optJSONObject("nodeProperties"), NodeProperty.all());
  } finally {
    bc.commit();
  }
  updateComputerList();
  rsp.sendRedirect(req.getContextPath()+'/'+toComputer().getUrl());  // back to the computer page
}
origin: jenkinsci/jenkins

/**
 * Accepts submission from the configuration page.
 */
@RequirePOST
public synchronized HttpResponse doConfigSubmit( StaplerRequest req) throws IOException, ServletException, FormException {
  BulkChange bc = new BulkChange(MONITORS_OWNER);
  try {
    Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
    monitors.rebuild(req,req.getSubmittedForm(),getNodeMonitorDescriptors());
    // add in the rest of instances are ignored instances
    for (Descriptor<NodeMonitor> d : NodeMonitor.all())
      if(monitors.get(d)==null) {
        NodeMonitor i = createDefaultInstance(d, true);
        if(i!=null)
          monitors.add(i);
      }
    // recompute the data
    for (NodeMonitor nm : monitors) {
      nm.triggerUpdate();
    }
    return FormApply.success(".");
  } finally {
    bc.commit();
  }
}
origin: jenkinsci/jenkins

/**
 * Accepts submission from the configuration page.
 *
 * Subtypes should override the {@link #submit(StaplerRequest)} method.
 */
@RequirePOST
public final synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  checkPermission(CONFIGURE);
  submit(req);
  description = Util.nullify(req.getParameter("description"));
  filterExecutors = req.getParameter("filterExecutors") != null;
  filterQueue = req.getParameter("filterQueue") != null;
  rename(req.getParameter("name"));
  getProperties().rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
  save();
  FormApply.success("../" + Util.rawEncode(name)).generateResponse(req,rsp,this);
}
origin: jenkinsci/jenkins

JSONObject jsonProperties = json.optJSONObject("properties");
if (jsonProperties != null) {
 t.rebuild(req,jsonProperties,JobPropertyDescriptor.getPropertyDescriptors(Job.this.getClass()));
} else {
 t.clear();
origin: org.eclipse.hudson.main/hudson-core

/**
 * @deprecated as of 1.271
 *      Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead.
 */
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, IOException {
  rebuild(req,json,descriptors);
}
origin: hudson/hudson-2.x

/**
 * @deprecated as of 1.271
 *      Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead.
 */
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, IOException {
  rebuild(req,json,descriptors);
}
origin: org.jvnet.hudson.main/hudson-core

/**
 * @deprecated as of 1.271
 *      Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead.
 */
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, IOException {
  rebuild(req,json,descriptors);
}
origin: org.jenkins-ci.main/jenkins-core

/**
 * @deprecated as of 1.271
 *      Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead.
 */
@Deprecated
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, IOException {
  rebuild(req,json,descriptors);
}
origin: org.eclipse.hudson.main/hudson-core

/**
 * Accepts the update to the node configuration.
 */
public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  final Hudson app = Hudson.getInstance();
  app.checkPermission(Hudson.ADMINISTER);
  properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
  updateTransientActions();
  save();
  // take the user back to the label top page.
  rsp.sendRedirect2(".");
}
origin: org.jenkins-ci.plugins/ivy

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req, rsp);
  targets = Util.fixEmptyAndTrim(req.getParameter("targets"));
  relativePathToDescriptorFromModuleRoot = Util.fixEmptyAndTrim(req.getParameter("relativePathToDescriptorFromModuleRoot"));
  publishers.rebuild(req,req.getSubmittedForm(),BuildStepDescriptor.filter(Publisher.all(),this.getClass()));
  // dependency setting might have been changed by the user, so rebuild.
  Hudson.getInstance().rebuildDependencyGraph();
}
origin: org.jvnet.hudson.plugins/ivy

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req, rsp);
  targets = Util.fixEmptyAndTrim(req.getParameter("targets"));
  relativePathToDescriptorFromModuleRoot = Util.fixEmptyAndTrim(req.getParameter("relativePathToDescriptorFromModuleRoot"));
  publishers.rebuild(req,req.getSubmittedForm(),BuildStepDescriptor.filter(Publisher.all(),this.getClass()));
  // dependency setting might have been changed by the user, so rebuild.
  Hudson.getInstance().rebuildDependencyGraph();
}
origin: org.hudsonci.plugins/ivy

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req, rsp);
  targets = Util.fixEmptyAndTrim(req.getParameter("targets"));
  relativePathToDescriptorFromModuleRoot = Util.fixEmptyAndTrim(req.getParameter("relativePathToDescriptorFromModuleRoot"));
  publishers.rebuild(req,req.getSubmittedForm(),BuildStepDescriptor.filter(Publisher.all(),this.getClass()));
  // dependency setting might have been changed by the user, so rebuild.
  Hudson.getInstance().rebuildDependencyGraph();
}
origin: org.jvnet.hudson.main/hudson-core

/**
 * Accepts the update to the node configuration.
 */
public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  final Hudson app = Hudson.getInstance();
  app.checkPermission(Hudson.ADMINISTER);
  properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
  updateTransientActions();
  save();
  // take the user back to the label top page.
  rsp.sendRedirect2(".");
}
origin: hudson/hudson-2.x

/**
 * Accepts the update to the node configuration.
 */
public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
  final Hudson app = Hudson.getInstance();
  app.checkPermission(Hudson.ADMINISTER);
  properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
  updateTransientActions();
  save();
  // take the user back to the label top page.
  rsp.sendRedirect2(".");
}
hudson.utilDescribableListrebuild

Javadoc

Rebuilds the list by creating a fresh instances from the submitted form.

This method is almost always used by the owner. This method does not invoke the save method.

Popular methods of DescribableList

  • get
  • toList
  • add
  • <init>
  • remove
  • setOwner
  • getAll
  • toMap
    Creates a detached map from the current snapshot of the data, keyed from a descriptor to an instance
  • buildDependencyGraph
    Picks up DependecyDeclarers and allow it to build dependencies.
  • rebuildHetero
    Rebuilds the list by creating a fresh instances from the submitted form. This version works with the
  • addAll
  • isEmpty
  • addAll,
  • isEmpty,
  • replace,
  • replaceBy,
  • addAllTo,
  • removeAll,
  • size,
  • onModified,
  • clear

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • JOptionPane (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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