Class RestCallbackBuilder
java.lang.Object
de.knightsoftnet.gwtp.spring.client.rest.helper.RestCallbackBuilder
Async callback implementation with error handling.
- Author:
- Manfred Tremmel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> com.google.gwt.user.client.rpc.AsyncCallback<R> build(AsyncCallbackOnSuccess<R> callbackOnSuccess, AsyncCallbackOnFailure callbackOnFailure) create rest callback implementation.static <V extends HasShowMessage,R, H extends HttpMessages>
RestCallbackSimpleImpl<V, R, H> build(V view, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.static <V extends HasShowMessage,R, H extends HttpMessages>
RestCallbackSimpleImpl<V, R, H> build(V view, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess, H httpMessage) create rest callback implementation.static <P,D, V extends EditorWithErrorHandling<P, D>, R, H extends HttpMessages>
RestCallbackImpl<P, D, V, R, H> build(V view, D data, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.static <P,D, V extends EditorWithErrorHandling<P, D>, R, H extends HttpMessages>
RestCallbackImpl<P, D, V, R, H> build(V view, D data, Session session, H httpMessage, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.static <T extends User,V extends EditorWithErrorHandling<?, ?>, M extends LoginMessages, H extends HttpMessages>
LoginCallback<T, V, M, H> buildLoginCallback(V view, Session session) create login callback implementation.static <T extends User,V extends EditorWithErrorHandling<?, ?>, M extends LoginMessages, H extends HttpMessages>
LoginCallback<T, V, M, H> buildLoginCallback(V view, Session session, M loginErrorMessage) create login callback implementation.static <T extends User,V extends EditorWithErrorHandling<?, ?>, M extends LoginMessages, H extends HttpMessages>
LoginCallback<T, V, M, H> buildLoginCallback(V view, Session session, M loginErrorMessage, H httpMessage) create login callback implementation.
-
Constructor Details
-
RestCallbackBuilder
public RestCallbackBuilder()
-
-
Method Details
-
build
public static <R> com.google.gwt.user.client.rpc.AsyncCallback<R> build(AsyncCallbackOnSuccess<R> callbackOnSuccess, AsyncCallbackOnFailure callbackOnFailure) create rest callback implementation.- Type Parameters:
R- rest result type- Parameters:
callbackOnSuccess- on success callbackcallbackOnFailure- on failure callback- Returns:
- RestCallbackImpl
-
build
public static <V extends HasShowMessage,R, RestCallbackSimpleImpl<V,H extends HttpMessages> R, buildH> (V view, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.- Type Parameters:
V- view or widget which implements EditorWithErrorHandling interfaceR- rest result typeH- http messages- Parameters:
view- view of thesession- sessioncallbackOnSuccess- on success callback- Returns:
- RestCallbackImpl
-
build
public static <V extends HasShowMessage,R, RestCallbackSimpleImpl<V,H extends HttpMessages> R, buildH> (V view, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess, H httpMessage) create rest callback implementation.- Type Parameters:
V- view or widget which implements EditorWithErrorHandling interfaceR- rest result typeH- http messages- Parameters:
view- view of thesession- sessioncallbackOnSuccess- on success callbackhttpMessage- http code messages to show- Returns:
- RestCallbackImpl
-
build
public static <P,D, RestCallbackImpl<P,V extends EditorWithErrorHandling<P, D>, R, H extends HttpMessages> D, buildV, R, H> (V view, D data, Session session, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.- Type Parameters:
P- presenter typeD- data type given to the serverV- view or widget which implements EditorWithErrorHandling interfaceR- rest result typeH- http messages- Parameters:
view- view of thedata- data given from serversession- sessioncallbackOnSuccess- on success callback- Returns:
- RestCallbackImpl
-
build
public static <P,D, RestCallbackImpl<P,V extends EditorWithErrorHandling<P, D>, R, H extends HttpMessages> D, buildV, R, H> (V view, D data, Session session, H httpMessage, AsyncCallbackOnSuccess<R> callbackOnSuccess) create rest callback implementation.- Type Parameters:
P- presenter typeD- data type given to the serverV- view or widget which implements EditorWithErrorHandling interfaceR- rest result typeH- http messages- Parameters:
view- view of thedata- data given from serversession- sessionhttpMessage- http code messages to showcallbackOnSuccess- on success callback- Returns:
- RestCallbackImpl
-
buildLoginCallback
public static <T extends User,V extends EditorWithErrorHandling<?, LoginCallback<T,?>, M extends LoginMessages, H extends HttpMessages> V, buildLoginCallbackM, H> (V view, Session session) create login callback implementation.- Type Parameters:
T- user dataV- view or widget which implements EditorWithErrorHandling interfaceM- login messagesH- http messages- Parameters:
view- view of thesession- session- Returns:
- LoginCallback
-
buildLoginCallback
public static <T extends User,V extends EditorWithErrorHandling<?, LoginCallback<T,?>, M extends LoginMessages, H extends HttpMessages> V, buildLoginCallbackM, H> (V view, Session session, M loginErrorMessage) create login callback implementation.- Type Parameters:
T- user dataV- view or widget which implements EditorWithErrorHandling interfaceM- login messagesH- http messages- Parameters:
view- view of thesession- sessionloginErrorMessage- error message to show- Returns:
- LoginCallback
-
buildLoginCallback
public static <T extends User,V extends EditorWithErrorHandling<?, LoginCallback<T,?>, M extends LoginMessages, H extends HttpMessages> V, buildLoginCallbackM, H> (V view, Session session, M loginErrorMessage, H httpMessage) create login callback implementation.- Type Parameters:
T- user dataV- view or widget which implements EditorWithErrorHandling interfaceM- login messagesH- http messages- Parameters:
view- view of thesession- sessionloginErrorMessage- error message to showhttpMessage- http code messages to show- Returns:
- LoginCallback
-