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<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(RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JParameter callbackParameter,
String callbackResultTypeName,
String callbackParameterName,
String restURIParam) |
protected void |
generateExceptionCallHandlingCode(RestMethodInfo methodInfo,
AbstractProxyCreator.SourcePrinter srcWriter,
String callbackParameterName,
String responseVariable) |
protected abstract void |
generateHostPathInitialization(AbstractProxyCreator.SourcePrinter srcWriter) |
protected static void |
generateLogHandlingCode(AbstractProxyCreator.SourcePrinter srcWriter,
String logLevel,
String e) |
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(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(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 static String |
getNonConflictedVarName(String originalVar,
String possibleConflictedVar) |
protected String |
getRequestBuilderInitialization(RestMethodInfo methodInfo,
String restURIParam) |
protected abstract 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<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 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(RestMethodInfo methodInfo, AbstractProxyCreator.SourcePrinter srcWriter)
protected void generateAJAXInvocation(RestMethodInfo methodInfo, AbstractProxyCreator.SourcePrinter srcWriter, com.google.gwt.core.ext.typeinfo.JParameter callbackParameter, String callbackResultTypeName, String callbackParameterName, String restURIParam)
protected String getRequestBuilderInitialization(RestMethodInfo methodInfo, String restURIParam)
protected static void generateLogHandlingCode(AbstractProxyCreator.SourcePrinter srcWriter, String logLevel, String e)
protected void generateExceptionCallHandlingCode(RestMethodInfo methodInfo, AbstractProxyCreator.SourcePrinter srcWriter, String callbackParameterName, String responseVariable)
protected static String getNonConflictedVarName(String originalVar, String possibleConflictedVar)
protected void generateSuccessCallHandlingCode(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 © 2015. All rights reserved.