org.glassfish.jersey.server.model
Class BasicValidator

java.lang.Object
  extended by org.glassfish.jersey.server.model.ResourceModelValidator
      extended by org.glassfish.jersey.server.model.BasicValidator
All Implemented Interfaces:
ResourceModelVisitor

public class BasicValidator
extends ResourceModelValidator

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 the IntrospectionModeller.createResource(java.lang.Class) method to get an abstract resource model. ResourceModelValidator.validate(org.glassfish.jersey.server.model.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.

Author:
Jakub Podlesak (jakub.podlesak at oracle.com)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.glassfish.jersey.server.model.ResourceModelValidator
ResourceModelValidator.ModelException
 
Constructor Summary
BasicValidator()
           
BasicValidator(MessageBodyWorkers workers)
           
 
Method Summary
 void checkMethod(AbstractResourceMethod method)
           
 void visitInflectorResourceMethod(InflectorBasedResourceMethod method)
          Process a programmatically created resource method.
 void visitResourceClass(ResourceClass resource)
          Start visiting a resource class
 void visitResourceConstructor(ResourceConstructor constructor)
          Process a resource class constructor.
 void visitResourceMethod(ResourceMethod method)
          Process a resource method based on a real annotated Java method.
 void visitSubResourceLocator(SubResourceLocator locator)
          Process a sub-resource locator.
 void visitSubResourceMethod(SubResourceMethod method)
          Process a sub-resource method based on a real annotated Java method.
 
Methods inherited from class org.glassfish.jersey.server.model.ResourceModelValidator
cleanIssueList, fatalIssuesFound, getIssueList, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicValidator

public BasicValidator()

BasicValidator

public BasicValidator(MessageBodyWorkers workers)
Method Detail

visitResourceClass

public void visitResourceClass(ResourceClass resource)
Description copied from interface: ResourceModelVisitor
Start visiting a resource class


visitResourceConstructor

public void visitResourceConstructor(ResourceConstructor constructor)
Description copied from interface: ResourceModelVisitor
Process a resource class constructor.


visitResourceMethod

public void visitResourceMethod(ResourceMethod method)
Description copied from interface: ResourceModelVisitor
Process a resource method based on a real annotated Java method.


checkMethod

public void checkMethod(AbstractResourceMethod method)

visitSubResourceMethod

public void visitSubResourceMethod(SubResourceMethod method)
Description copied from interface: ResourceModelVisitor
Process a sub-resource method based on a real annotated Java method.


visitSubResourceLocator

public void visitSubResourceLocator(SubResourceLocator locator)
Description copied from interface: ResourceModelVisitor
Process a sub-resource locator.


visitInflectorResourceMethod

public void visitInflectorResourceMethod(InflectorBasedResourceMethod method)
Description copied from interface: ResourceModelVisitor
Process a programmatically created resource method.



Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.