com.sun.jersey.server.impl.modelapi.validation
Class BasicValidator
java.lang.Object
com.sun.jersey.server.impl.modelapi.validation.AbstractModelValidator
com.sun.jersey.server.impl.modelapi.validation.BasicValidator
- All Implemented Interfaces:
- AbstractModelVisitor
public class BasicValidator
- extends AbstractModelValidator
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. AbstractModelValidator.validate(com.sun.jersey.api.model.AbstractModelComponent)
method then populates the issue list, which could be then obtained by the AbstractModelValidator.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
AbstractModelValidator.cleanIssueList() method.
- Author:
- jakub.podlesak@oracle.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicValidator
public BasicValidator()
visitAbstractResource
public void visitAbstractResource(AbstractResource resource)
visitAbstractResourceConstructor
public void visitAbstractResourceConstructor(AbstractResourceConstructor constructor)
visitAbstractField
public void visitAbstractField(AbstractField field)
visitAbstractSetterMethod
public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod)
visitAbstractResourceMethod
public void visitAbstractResourceMethod(AbstractResourceMethod method)
visitAbstractSubResourceMethod
public void visitAbstractSubResourceMethod(AbstractSubResourceMethod method)
visitAbstractSubResourceLocator
public void visitAbstractSubResourceLocator(AbstractSubResourceLocator locator)
Copyright © 2014 Oracle Corporation. All Rights Reserved.