public synchronized void doCreateView(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, ParseException, Descriptor.FormException { checkPermission(View.CREATE); addView(View.create(req, rsp, this)); }
public synchronized void doCreateView(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, ParseException, Descriptor.FormException { checkPermission(View.CREATE); addView(View.create(req, rsp, this)); }
/** * Checks if a top-level view with the given name exists. * * @param value the name of the child. * @return the validation results. */ public FormValidation doViewExistsCheck(@QueryParameter String value) { checkPermission(View.CREATE); String view = fixEmpty(value); if (view == null) { return FormValidation.ok(); } if (getView(view) == null) { return FormValidation.ok(); } else { return FormValidation.error(jenkins.model.Messages.Hudson_ViewAlreadyExists(view)); } }
/** * Checks if a top-level view with the given name exists. * * @param value the name of the child. * @return the validation results. */ public FormValidation doViewExistsCheck(@QueryParameter String value) { checkPermission(View.CREATE); String view = fixEmpty(value); if (view == null) { return FormValidation.ok(); } if (getView(view) == null) { return FormValidation.ok(); } else { return FormValidation.error(jenkins.model.Messages.Hudson_ViewAlreadyExists(view)); } }
@Restricted(DoNotUse.class) @RequirePOST public void doDoRename(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if (!hasPermission(CONFIGURE)) { // rename is essentially delete followed by a create checkPermission(CREATE); checkPermission(DELETE); } String newName = req.getParameter("newName"); Jenkins.checkGoodName(newName); String blocker = renameBlocker(); if (blocker != null) { rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8") + "&blocker=" + URLEncoder.encode(blocker, "UTF-8")); return; } renameTo(newName); rsp.sendRedirect2("../" + newName); }
/** * Stapler action method to disable the folder. * * @return the response. * @throws IOException if the folder could not be disabled. * @throws ServletException if something goes wrong. * @since 6.1.0 */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler action method public HttpResponse doDisable() throws IOException, ServletException { checkPermission(CONFIGURE); makeDisabled(true); return new HttpRedirect("."); }
/** * Stapler action method to enable the folder. * * @return the response. * @throws IOException if the folder could not be disabled. * @throws ServletException if something goes wrong. * @since 6.1.0 */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler action method public HttpResponse doEnable() throws IOException, ServletException { checkPermission(CONFIGURE); makeDisabled(false); return new HttpRedirect("."); }
/** * Stapler action method to disable the folder. * * @return the response. * @throws IOException if the folder could not be disabled. * @throws ServletException if something goes wrong. * @since 6.1.0 */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler action method public HttpResponse doDisable() throws IOException, ServletException { checkPermission(CONFIGURE); makeDisabled(true); return new HttpRedirect("."); }
/** * Stapler action method to enable the folder. * * @return the response. * @throws IOException if the folder could not be disabled. * @throws ServletException if something goes wrong. * @since 6.1.0 */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler action method public HttpResponse doEnable() throws IOException, ServletException { checkPermission(CONFIGURE); makeDisabled(false); return new HttpRedirect("."); }
public void delete() throws IOException, InterruptedException { checkPermission(DELETE);
public void delete() throws IOException, InterruptedException { checkPermission(DELETE);
@Restricted(NoExternalUse.class) @RequirePOST public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException { checkPermission(CONFIGURE);
@Restricted(NoExternalUse.class) @RequirePOST public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException { checkPermission(CONFIGURE);