io.github.hison.api.handler.ApiHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-link Show documentation
Show all versions of api-link Show documentation
API-Link is a novel solution for Spring projects, aimed at streamlining development by eliminating the need for individual controllers. It allows developers to use a single 'cmd' value to invoke service layer methods, simplifying workflow and boosting productivity.
The newest version!
package io.github.hison.api.handler;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.ResponseEntity;
import io.github.hison.api.exception.ApiException;
import io.github.hison.api.exception.ServiceRuntimeException;
import io.github.hison.data.model.DataModel;
import io.github.hison.data.wrapper.DataWrapper;
/**
* @author Hani son
* @version 1.0.0
*/
public interface ApiHandler {
DataModel beforeHandleRequest(DataWrapper dw, HttpServletRequest req);
DataModel handleAuthority(DataWrapper dw, HttpServletRequest req);
void handleLog(DataWrapper dw, HttpServletRequest req);
ResponseEntity handleApiException(ApiException e, DataWrapper dw, HttpServletRequest req);
ResponseEntity handleServiceRuntimeException(ServiceRuntimeException e, DataWrapper dw, HttpServletRequest req);
ResponseEntity handleException(Exception e, DataWrapper dw, HttpServletRequest req);
ResponseEntity handleThrowable(Throwable t, DataWrapper dw, HttpServletRequest req) ;
void afterHandleRequest(DataWrapper requestDw, DataWrapper responesDw, HttpServletRequest req);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy