Class ApiAssistant


  • public class ApiAssistant
    extends java.lang.Object
    Assists you in creating a great Rest API.
    Author:
    Gethin James
    • Constructor Detail

      • ApiAssistant

        public ApiAssistant()
    • Method Detail

      • determineApi

        public static Api determineApi​(java.util.Map<java.lang.String,​java.lang.String> templateVars)
        Determines the api being used from the templateVars
        Parameters:
        templateVars -
        Returns:
        Api
      • resolveException

        public ErrorResponse resolveException​(java.lang.Exception ex)
        Resolves an exception as a json error.
        Parameters:
        exception -
        Returns:
        ErrorResponse
      • setDefaultResolver

        public void setDefaultResolver​(ExceptionResolver<java.lang.Exception> defaultResolver)
      • setWebScriptExceptionResolver

        public void setWebScriptExceptionResolver​(ExceptionResolver<org.springframework.extensions.webscripts.WebScriptException> webScriptExceptionResolver)
      • setResolver

        public void setResolver​(ExceptionResolver<java.lang.Exception> resolver)
      • setJsonHelper

        public void setJsonHelper​(JacksonHelper jsonHelper)