code: public FormValidation doViewExistsCheck(@QueryParameter String value, @QueryParameter boolean exists) {
          checkPermission(View.CREATE);
  
          String view = Util.fixEmpty(value);
          if (view == null) return FormValidation.ok();
          if (exists) {
          	return (getView(view)!=null) ?
              		FormValidation.ok() :
              		FormValidation.error(Messages.MyViewsProperty_ViewExistsCheck_NotExist(view));
          } else {
          	return (getView(view)==null) ?
          			FormValidation.ok() :
          			FormValidation.error(Messages.MyViewsProperty_ViewExistsCheck_AlreadyExists(view));
          }
      }
docs: Checks if a private view with the given name exists.
  An error is returned if exists==true but the view does not exist.
  An error is also returned if exists==false but the view does exist.