|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.model.ResourceModelValidator
org.glassfish.jersey.server.model.BasicValidator
public class BasicValidator
Performs a basic check on abstract resources.
Validity check populates a list of potential issues with the given resource. The issues are divided into two categories: fatal and non-fatal issues. The former type prevents the resource to be deployed and makes the whole web application deployment fail. To check a single resource class, one could use one of theResource
builder(...) methods to get a resource model.
ResourceModelValidator.validate(ResourceModelComponent)
method then populates the issue list, which could be then obtained by the
ResourceModelValidator.getIssueList(). Unless you explicitly clear
the list, subsequent calls to the validate method will add new items to the list,
so that you can build the issue list for more than one resource. To clear the
list, you may want to call ResourceModelValidator.cleanIssueList() method.
| Field Summary | |
|---|---|
protected Set<Class<?>> |
checkedClasses
Classes that have been checked already. |
| Constructor Summary | |
|---|---|
BasicValidator()
Construct a new basic validator with an empty issue list. |
|
BasicValidator(List<ResourceModelIssue> issueList)
Construct a new basic validator. |
|
BasicValidator(List<ResourceModelIssue> issueList,
MessageBodyWorkers workers)
Construct a new basic validator. |
|
| Method Summary | |
|---|---|
static boolean |
isSingleton(Class<?> resourceClass)
Check if the resource class is declared to be a singleton. |
void |
visitInvocable(Invocable invocable)
Visit a single resource method invocable model. |
void |
visitMethodHandler(MethodHandler methodHandler)
Visit a single resource method handler model. |
void |
visitResourceClass(Resource resource)
Start visiting a single resource model. |
void |
visitResourceHandlerConstructor(HandlerConstructor constructor)
Process a resource method handler constructor. |
void |
visitResourceMethod(ResourceMethod method)
Visit a single resource method model. |
| Methods inherited from class org.glassfish.jersey.server.model.ResourceModelValidator |
|---|
addFatalIssue, addMinorIssue, cleanIssueList, fatalIssuesFound, getIssueList, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Set<Class<?>> checkedClasses
| Constructor Detail |
|---|
public BasicValidator()
public BasicValidator(List<ResourceModelIssue> issueList)
issueList - validation issue list.
public BasicValidator(List<ResourceModelIssue> issueList,
MessageBodyWorkers workers)
issueList - validation issue list.workers - message body workers for computing effective types.| Method Detail |
|---|
public void visitResourceClass(Resource resource)
ResourceModelVisitor
resource - resource model.public void visitResourceHandlerConstructor(HandlerConstructor constructor)
ResourceModelVisitor
constructor - resource method handler constructor.public static boolean isSingleton(Class<?> resourceClass)
resourceClass - resource class.
true if the resource class is a singleton, false otherwise.public void visitInvocable(Invocable invocable)
ResourceModelVisitor
invocable - resource method invocable model.public void visitMethodHandler(MethodHandler methodHandler)
ResourceModelVisitor
methodHandler - resource method handler model.public void visitResourceMethod(ResourceMethod method)
ResourceModelVisitor
method - resource method model.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||