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);
}
Aggregations