GWT 2.3.0

com.google.gwt.requestfactory.server
Class RequestFactoryInterfaceValidator

java.lang.Object
  extended by com.google.gwt.requestfactory.server.RequestFactoryInterfaceValidator

Deprecated.

@Deprecated
public class RequestFactoryInterfaceValidator
extends java.lang.Object

Encapsulates validation logic to determine if a RequestFactory interface, its RequestContext, and associated EntityProxy interfaces match their domain counterparts. This implementation examines the classfiles directly in order to avoid the need to load the types into the JVM.

This class is amenable to being used as a unit test:

 public void testRequestFactory() {
   Logger logger = Logger.getLogger("");
   RequestFactoryInterfaceValidator v = new RequestFactoryInterfaceValidator(
     logger, new ClassLoaderLoader(MyRequestContext.class.getClassLoader()));
   v.validateRequestContext(MyRequestContext.class.getName());
   assertFalse(v.isPoisoned());
 }
 
This class also has a main method and can be used as a build-time tool:
 java -cp gwt-servlet.jar:your-code.jar \
   com.google.gwt.requestfactory.server.RequestFactoryInterfaceValidator \
   com.example.MyRequestFactory
 

RequestFactory has moved to com.google.web.bindery.requestfactory. This package will be removed in a future version of GWT.


Nested Class Summary
static class RequestFactoryInterfaceValidator.ClassLoaderLoader
          Deprecated. 
static interface RequestFactoryInterfaceValidator.Loader
          Deprecated. 
 
Constructor Summary
RequestFactoryInterfaceValidator(java.util.logging.Logger logger, RequestFactoryInterfaceValidator.Loader loader)
          Deprecated.  
 
Method Summary
 void antidote()
          Deprecated. Reset the poisoned status of the validator so that it may be reused without destroying cached state.
 boolean isPoisoned()
          Deprecated. Returns true if validation failed.
static void main(java.lang.String[] args)
          Deprecated.  
 void validateEntityProxy(java.lang.String binaryName)
          Deprecated. This method checks an EntityProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the EntityProxy interface.
 void validateProxy(java.lang.String binaryName)
          Deprecated. Determine if the specified type implements a proxy interface and apply the appropriate validations.
 void validateRequestContext(java.lang.String binaryName)
          Deprecated. This method checks a RequestContext interface against its peer domain domain object to determine if the server code would be able to process a request using the the methods defined in the RequestContext interface.
 void validateRequestFactory(java.lang.String binaryName)
          Deprecated. This method checks a RequestFactory interface.
 void validateValueProxy(java.lang.String binaryName)
          Deprecated. This method checks a ValueProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the ValueProxy interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestFactoryInterfaceValidator

public RequestFactoryInterfaceValidator(java.util.logging.Logger logger,
                                        RequestFactoryInterfaceValidator.Loader loader)
Deprecated. 
Method Detail

main

public static void main(java.lang.String[] args)
Deprecated. 

antidote

public void antidote()
Deprecated. 
Reset the poisoned status of the validator so that it may be reused without destroying cached state.


isPoisoned

public boolean isPoisoned()
Deprecated. 
Returns true if validation failed.


validateEntityProxy

public void validateEntityProxy(java.lang.String binaryName)
Deprecated. 
This method checks an EntityProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the EntityProxy interface. It does not perform any checks as to whether or not the EntityProxy could actually be generated by the Generator.

This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.

Checks implemented:

Parameters:
binaryName - the binary name (e.g. Class.getName()) of the EntityProxy subtype

validateProxy

public void validateProxy(java.lang.String binaryName)
Deprecated. 
Determine if the specified type implements a proxy interface and apply the appropriate validations. This can be used as a general-purpose entry method when writing unit tests.

Parameters:
binaryName - the binary name (e.g. Class.getName()) of the EntityProxy or ValueProxy subtype

validateRequestContext

public void validateRequestContext(java.lang.String binaryName)
Deprecated. 
This method checks a RequestContext interface against its peer domain domain object to determine if the server code would be able to process a request using the the methods defined in the RequestContext interface. It does not perform any checks as to whether or not the RequestContext could actually be generated by the Generator.

This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.

Checks implemented:

Parameters:
binaryName - the binary name (e.g. Class.getName()) of the RequestContext subtype
See Also:
validateEntityProxy(String)

validateRequestFactory

public void validateRequestFactory(java.lang.String binaryName)
Deprecated. 
This method checks a RequestFactory interface.

This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs. It does not perform any checks as to whether or not the RequestContext could actually be generated by the Generator.

Checks implemented:

Parameters:
binaryName - the binary name (e.g. Class.getName()) of the RequestContext subtype
See Also:
validateRequestContext(String)

validateValueProxy

public void validateValueProxy(java.lang.String binaryName)
Deprecated. 
This method checks a ValueProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the ValueProxy interface. It does not perform any checks as to whether or not the ValueProxy could actually be generated by the Generator.

This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.

Checks implemented:

Parameters:
binaryName - the binary name (e.g. Class.getName()) of the EntityProxy subtype

GWT 2.3.0