com.droidlogix.dbflare.a2e.ApiCoreInterface Maven / Gradle / Ivy
package com.droidlogix.dbflare.a2e;
import com.dbflare.core.models.IEndpoint;
import com.droidlogix.dbflare.datahandler.PagingParameter;
import com.droidlogix.dbflare.exceptions.DbFlareGenericException;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/**
* @author John Pili
*/
public interface ApiCoreInterface
{
/**
* This will process URL query string parameters into named or positional Map. It will
* convert the necessary values to a corresponding type or List type.
* @param endpoint
* @param parameters
* @return
* @throws DbFlareGenericException
*/
Map, Object> processIncomingURLParameters(IEndpoint endpoint, Map parameters) throws DbFlareGenericException;
/**
* This will handle the conversion of placeholders located in the endpoint queryString.
* @param endpoint
* @param parameters
* @return
* @throws DbFlareGenericException
*/
String transposeQueryStringPlaceholders(IEndpoint endpoint, Map parameters) throws DbFlareGenericException;
/**
* This method handles the conversion of placeholders in the endpoint query string
* @param queryString
* @param endpoint
* @param parameters
* @return
* @throws DbFlareGenericException
*/
String transposeQueryStringSort(String queryString, IEndpoint endpoint, Map parameters) throws DbFlareGenericException;
/**
* This is used to convert HTTP REQUEST Body into an Object by using GSON
*
* @param clazz
* @param request
* @return
* @throws DbFlareGenericException
*/
Object processBindingFromRequest(Class clazz, HttpServletRequest request) throws DbFlareGenericException;
/**
* This is used to convert HTTP REQUEST Body into an List of Objects by using GSON
* @param className
* @param request
* @return
* @throws DbFlareGenericException
*/
List