Esempio n. 1
0
 public void load() {
   XmlFile file = getConfigFile();
   if (file.exists()) {
     try {
       file.unmarshal(this);
     } catch (IOException e) {
       LOGGER.log(Level.WARNING, "Failed to load " + file, e);
     }
   }
   properties.setOwner(this);
   updateTransientActions();
 }
Esempio n. 2
0
  /** 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);
  }