Search in sources :

Example 6 with FormException

use of hudson.model.Descriptor.FormException in project hudson-2.x by hudson.

the class View method rename.

/**
 * Renames this view.
 */
public void rename(String newName) throws Failure, FormException {
    // noop
    if (name.equals(newName))
        return;
    checkGoodName(newName);
    if (owner.getView(newName) != null)
        throw new FormException(Messages.Hudson_ViewAlreadyExists(newName), "name");
    String oldName = name;
    name = newName;
    owner.onViewRenamed(this, oldName, newName);
}
Also used : FormException(hudson.model.Descriptor.FormException)

Aggregations

FormException (hudson.model.Descriptor.FormException)6 BulkChange (hudson.BulkChange)2 TcpSlaveAgentListener (hudson.TcpSlaveAgentListener)1 MarkupFormatter (hudson.markup.MarkupFormatter)1 RawHtmlMarkupFormatter (hudson.markup.RawHtmlMarkupFormatter)1 Descriptor (hudson.model.Descriptor)1 Failure (hudson.model.Failure)1 ComputerLauncher (hudson.slaves.ComputerLauncher)1 BuildStepDescriptor (hudson.tasks.BuildStepDescriptor)1 FormValidation (hudson.util.FormValidation)1 DefaultMyViewsTabBar (hudson.views.DefaultMyViewsTabBar)1 DefaultViewsTabBar (hudson.views.DefaultViewsTabBar)1 MyViewsTabBar (hudson.views.MyViewsTabBar)1 ViewsTabBar (hudson.views.ViewsTabBar)1 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 JSONObject (net.sf.json.JSONObject)1 VSphereDuplicateException (org.jenkinsci.plugins.vsphere.tools.VSphereDuplicateException)1 VSphereException (org.jenkinsci.plugins.vsphere.tools.VSphereException)1