FormValidation
as a return value in your check method.@Deprecated public abstract class FormFieldValidator extends Object
The check()
method is to be implemented by derived classes to perform
the validation. See hudson-behavior.js 'validated' CSS class and 'checkUrl' attribute.
Modifier and Type | Field and Description |
---|---|
static Permission |
CHECK
Deprecated.
|
protected Permission |
permission
Deprecated.
Permission to check, or null if this check doesn't require any permission.
|
protected org.kohsuke.stapler.StaplerRequest |
request
Deprecated.
|
protected org.kohsuke.stapler.StaplerResponse |
response
Deprecated.
|
protected AccessControlled |
subject
Deprecated.
The object to which the permission is checked against.
|
Modifier | Constructor and Description |
---|---|
protected |
FormFieldValidator(AccessControlled subject,
Permission permission)
Deprecated.
|
protected |
FormFieldValidator(Permission permission)
Deprecated.
|
protected |
FormFieldValidator(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response,
AccessControlled subject,
Permission permission)
Deprecated.
Use
FormFieldValidator(AccessControlled,Permission) and remove StaplerRequest and StaplerResponse
from your "doCheck..." method parameter |
protected |
FormFieldValidator(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response,
boolean adminOnly)
Deprecated.
|
protected |
FormFieldValidator(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response,
Permission permission)
Deprecated.
Use
FormFieldValidator(Permission) and remove StaplerRequest and StaplerResponse
from your "doCheck..." method parameter |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
check()
Deprecated.
|
void |
error(String message)
Deprecated.
Sends out a string error message that indicates an error.
|
void |
error(String format,
Object... args)
Deprecated.
Sends out a string error message that indicates an error,
by formatting it with
String.format(String, Object[]) |
void |
errorWithMarkup(String message)
Deprecated.
Sends out an HTML fragment that indicates an error.
|
protected File |
getFileParameter(String paramName)
Deprecated.
Gets the parameter as a file.
|
void |
ok()
Deprecated.
Sends out an HTML fragment that indicates a success.
|
void |
ok(String message)
Deprecated.
|
void |
ok(String format,
Object... args)
Deprecated.
|
void |
okWithMarkup(String message)
Deprecated.
|
void |
process()
Deprecated.
Runs the validation code.
|
void |
respond(String html)
Deprecated.
Sends out an arbitrary HTML fragment.
|
void |
warning(String message)
Deprecated.
|
void |
warning(String format,
Object... args)
Deprecated.
|
void |
warningWithMarkup(String message)
Deprecated.
|
public static final Permission CHECK
protected final org.kohsuke.stapler.StaplerRequest request
protected final org.kohsuke.stapler.StaplerResponse response
protected final Permission permission
protected final AccessControlled subject
permission
is non-null, must be non-null.protected FormFieldValidator(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, boolean adminOnly)
adminOnly
- Pass true to only let admin users to run the check. This is necessary
for security reason, so that unauthenticated user cannot obtain sensitive
information or run a process that may have side-effect.@Deprecated protected FormFieldValidator(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, Permission permission)
FormFieldValidator(Permission)
and remove StaplerRequest
and StaplerResponse
from your "doCheck..." method parameterprotected FormFieldValidator(Permission permission)
permission
- Permission needed to perform this validation, or null if no permission is necessary.@Deprecated protected FormFieldValidator(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, AccessControlled subject, Permission permission)
FormFieldValidator(AccessControlled,Permission)
and remove StaplerRequest
and StaplerResponse
from your "doCheck..." method parameterprotected FormFieldValidator(AccessControlled subject, Permission permission)
public final void process() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected abstract void check() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected final File getFileParameter(String paramName)
public void ok() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void respond(String html) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void error(String message) throws IOException, javax.servlet.ServletException
message
- Human readable message to be sent. error(null)
can be used as ok()
.IOException
javax.servlet.ServletException
public void warning(String message) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void ok(String message) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void error(String format, Object... args) throws IOException, javax.servlet.ServletException
String.format(String, Object[])
IOException
javax.servlet.ServletException
public void warning(String format, Object... args) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void ok(String format, Object... args) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void errorWithMarkup(String message) throws IOException, javax.servlet.ServletException
This method must be used with care to avoid cross-site scripting attack.
message
- Human readable message to be sent. error(null)
can be used as ok()
.IOException
javax.servlet.ServletException
public void warningWithMarkup(String message) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void okWithMarkup(String message) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2004–2022. All rights reserved.