public abstract class CruxRestProxyCreator extends AbstractInterfaceWrapperProxyCreator
AbstractProxyCreator.SourcePrinter| Modifier and Type | Field and Description |
|---|---|
protected org.cruxframework.crux.core.rebind.rest.BodyParameterHandler |
bodyParameterHandler |
protected com.google.gwt.core.ext.typeinfo.JClassType |
callbackType |
protected com.google.gwt.core.ext.typeinfo.JClassType |
javascriptObjectType |
protected String |
jsonPCallbackParam |
protected String |
jsonPFailureCallbackParam |
protected JsonPRestCreatorHelper |
jsonPRestCreatorHelper |
protected boolean |
mustGenerateStateControlMethods |
protected org.cruxframework.crux.core.rebind.rest.QueryParameterHandler |
queryParameterHandler |
protected Set<String> |
readMethods |
protected Set<org.cruxframework.crux.core.rebind.rest.RestMethodInfo> |
restMethods |
protected com.google.gwt.core.ext.typeinfo.JClassType |
restProxyType |
protected String |
serviceBasePath |
protected Set<String> |
updateMethods |
protected boolean |
useJsonP |
baseIntfcacheable, cacheableVersionFound, context, logger| Constructor and Description |
|---|
CruxRestProxyCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
com.google.gwt.core.ext.typeinfo.JClassType baseIntf) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateAJAXInvocation(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JParameter callbackParameter,
String callbackResultTypeName,
String callbackParameterName,
String restURIParam) |
protected void |
generateExceptionCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
String callbackParameterName,
String responseVariable) |
protected abstract void |
generateHostPathInitialization(AbstractProxyCreator.SourcePrinter srcWriter) |
protected void |
generateProxyContructor(AbstractProxyCreator.SourcePrinter srcWriter)
Generate the proxy constructor and delegate to the superclass constructor
using the default address for the
RemoteService. |
protected void |
generateProxyFields(AbstractProxyCreator.SourcePrinter srcWriter)
Generate any fields required by the proxy.
|
protected void |
generateProxyMethods(AbstractProxyCreator.SourcePrinter srcWriter) |
protected void |
generateSaveStateBlock(AbstractProxyCreator.SourcePrinter srcWriter,
boolean isReadMethod,
String responseVar,
String uriVar,
String uri) |
protected void |
generateSetEndpointMethod(AbstractProxyCreator.SourcePrinter srcWriter) |
protected void |
generateStateControlMethods(AbstractProxyCreator.SourcePrinter srcWriter) |
protected void |
generateSuccessCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JParameter callbackParameter,
String callbackResultTypeName,
String callbackParameterName,
String restURIParam) |
protected void |
generateValidateStateBlock(AbstractProxyCreator.SourcePrinter srcWriter,
StateValidationModel validationModel,
String builderVar,
String uriVar,
String uri,
String callbackParameterName) |
protected void |
generateViewBindableMethods(AbstractProxyCreator.SourcePrinter sourceWriter) |
protected void |
generateWrapperMethod(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter) |
protected void |
generateXSRFHeaderProtectionForWrites(String httpMethod,
String builderVar,
AbstractProxyCreator.SourcePrinter srcWriter) |
protected String |
getCallbackResultTypeName(com.google.gwt.core.ext.typeinfo.JClassType callbackParameter) |
protected String[] |
getImports() |
protected abstract org.cruxframework.crux.core.rebind.rest.RestMethodInfo |
getRestMethodInfo(com.google.gwt.core.ext.typeinfo.JMethod method) |
protected String |
getRestURI(com.google.gwt.core.ext.typeinfo.JMethod method,
Annotation[][] parameterAnnotations,
Path path) |
protected abstract String |
getServiceBasePath(com.google.gwt.core.ext.GeneratorContext context) |
protected void |
initializeRestMethods() |
protected String |
paths(String basePath,
String... segments) |
protected void |
setLocaleInfo(AbstractProxyCreator.SourcePrinter srcWriter,
String builderVariable) |
protected void |
validateProxyMethod(com.google.gwt.core.ext.typeinfo.JMethod method) |
findCacheableImplementationAndMarkForReuseIfAvailable, getDeviceFeatures, getModule, getProxyQualifiedName, getProxySimpleName, getScreens, getSourcePrinter, getUserAgent, getViewscacheableVersionFound, create, findCacheableImplementationAndMarkForReuseIfAvailable, generateLoggerField, generateMethodParameters, generateMethodTrhowsClause, generateProxyWrapperMethodDeclaration, generateSubTypes, getJsniSimpleSignature, isAlreadyGenerated, isCacheable, isCrux2OldInterfacesCompatibilityEnabled, logDebugMessageprotected com.google.gwt.core.ext.typeinfo.JClassType callbackType
protected com.google.gwt.core.ext.typeinfo.JClassType javascriptObjectType
protected String serviceBasePath
protected Set<org.cruxframework.crux.core.rebind.rest.RestMethodInfo> restMethods
protected boolean mustGenerateStateControlMethods
protected org.cruxframework.crux.core.rebind.rest.QueryParameterHandler queryParameterHandler
protected org.cruxframework.crux.core.rebind.rest.BodyParameterHandler bodyParameterHandler
protected com.google.gwt.core.ext.typeinfo.JClassType restProxyType
protected boolean useJsonP
protected String jsonPCallbackParam
protected String jsonPFailureCallbackParam
protected JsonPRestCreatorHelper jsonPRestCreatorHelper
public CruxRestProxyCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
com.google.gwt.core.ext.typeinfo.JClassType baseIntf)
protected abstract String getServiceBasePath(com.google.gwt.core.ext.GeneratorContext context)
protected abstract void generateHostPathInitialization(AbstractProxyCreator.SourcePrinter srcWriter)
protected abstract org.cruxframework.crux.core.rebind.rest.RestMethodInfo getRestMethodInfo(com.google.gwt.core.ext.typeinfo.JMethod method)
throws InvalidRestMethod
InvalidRestMethodprotected void generateProxyContructor(AbstractProxyCreator.SourcePrinter srcWriter) throws CruxGeneratorException
AbstractProxyCreatorRemoteService.generateProxyContructor in class AbstractProxyCreatorCruxGeneratorExceptionprotected void generateProxyFields(AbstractProxyCreator.SourcePrinter srcWriter) throws CruxGeneratorException
AbstractProxyCreatorgenerateProxyFields in class AbstractProxyCreatorCruxGeneratorExceptionprotected void generateProxyMethods(AbstractProxyCreator.SourcePrinter srcWriter) throws CruxGeneratorException
generateProxyMethods in class AbstractProxyCreatorCruxGeneratorExceptionprotected void generateViewBindableMethods(AbstractProxyCreator.SourcePrinter sourceWriter)
protected void generateSetEndpointMethod(AbstractProxyCreator.SourcePrinter srcWriter)
protected void generateStateControlMethods(AbstractProxyCreator.SourcePrinter srcWriter)
protected void initializeRestMethods()
protected void generateWrapperMethod(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter)
protected void generateAJAXInvocation(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JParameter callbackParameter,
String callbackResultTypeName,
String callbackParameterName,
String restURIParam)
protected void generateExceptionCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
String callbackParameterName,
String responseVariable)
protected void generateSuccessCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JParameter callbackParameter,
String callbackResultTypeName,
String callbackParameterName,
String restURIParam)
protected void setLocaleInfo(AbstractProxyCreator.SourcePrinter srcWriter, String builderVariable)
protected void generateXSRFHeaderProtectionForWrites(String httpMethod, String builderVar, AbstractProxyCreator.SourcePrinter srcWriter)
protected void generateSaveStateBlock(AbstractProxyCreator.SourcePrinter srcWriter, boolean isReadMethod, String responseVar, String uriVar, String uri)
protected void generateValidateStateBlock(AbstractProxyCreator.SourcePrinter srcWriter, StateValidationModel validationModel, String builderVar, String uriVar, String uri, String callbackParameterName)
protected String getCallbackResultTypeName(com.google.gwt.core.ext.typeinfo.JClassType callbackParameter)
protected String getRestURI(com.google.gwt.core.ext.typeinfo.JMethod method, Annotation[][] parameterAnnotations, Path path)
protected String[] getImports()
getImports in class AbstractInterfaceWrapperProxyCreatorprotected void validateProxyMethod(com.google.gwt.core.ext.typeinfo.JMethod method)
Copyright © 2014. All rights reserved.