Skip to content

Commit eac3439

Browse files
committed
AG Grid Updates
1 parent ace5d15 commit eac3439

2 files changed

Lines changed: 79 additions & 2 deletions

File tree

src/main/java/com/jwebmp/core/base/ajax/AjaxResponse.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@SuppressWarnings("MissingClassJavaDoc")
3636
@CallScope
3737
public class AjaxResponse<J extends AjaxResponse<J>>
38-
extends JavaScriptPart<J>
38+
extends JavaScriptPart<J> implements IAjaxResponse<J>
3939
{
4040
/**
4141
* Whether or not the response is a success or not
@@ -68,6 +68,7 @@ public class AjaxResponse<J extends AjaxResponse<J>>
6868

6969
private Map<String, String> properties = new HashMap<>();
7070

71+
@Override
7172
public Map<String, String> getProperties()
7273
{
7374
return properties;
@@ -76,18 +77,21 @@ public Map<String, String> getProperties()
7677
@JsonProperty("data")
7778
private Map<String, Object> dataReturns = new HashMap<>();
7879

80+
@Override
7981
public J addDataResponse(String listener, IJsonRepresentation<?> json)
8082
{
8183
dataReturns.put(listener, json);
8284
return (J) this;
8385
}
8486

87+
@Override
8588
public J addDataResponse(String listener, Map json) throws Exception
8689
{
8790
dataReturns.put(listener, json);
8891
return (J) this;
8992
}
9093

94+
@Override
9195
public J addDataResponse(String listener, String result)
9296
{
9397
dataReturns.put(listener, result);
@@ -121,7 +125,7 @@ protected Set<String> getFeatureQueries()
121125
{
122126
feature.toString();
123127
list.add(feature.renderJavascript()
124-
.toString());
128+
.toString());
125129
});
126130
return list;
127131
}
@@ -155,6 +159,7 @@ public void setFeatures(Set<IFeature<?, ?>> features)
155159
*
156160
* @return
157161
*/
162+
@Override
158163
public boolean isSuccess()
159164
{
160165
return success;
@@ -165,6 +170,7 @@ public boolean isSuccess()
165170
*
166171
* @param success
167172
*/
173+
@Override
168174
public void setSuccess(boolean success)
169175
{
170176
this.success = success;
@@ -215,6 +221,7 @@ public Set<AjaxResponseReaction<?>> getReactions()
215221
*
216222
* @return
217223
*/
224+
@Override
218225
public Map<String, String> getLocalStorage()
219226
{
220227
if (localStorage == null)
@@ -229,6 +236,7 @@ public Map<String, String> getLocalStorage()
229236
*
230237
* @param localStorage
231238
*/
239+
@Override
232240
public void setLocalStorage(Map<String, String> localStorage)
233241
{
234242
this.localStorage = localStorage;
@@ -239,6 +247,7 @@ public void setLocalStorage(Map<String, String> localStorage)
239247
*
240248
* @return
241249
*/
250+
@Override
242251
public Map<String, String> getSessionStorage()
243252
{
244253
if (sessionStorage == null)
@@ -253,6 +262,7 @@ public Map<String, String> getSessionStorage()
253262
*
254263
* @param sessionStorage
255264
*/
265+
@Override
256266
public void setSessionStorage(Map<String, String> sessionStorage)
257267
{
258268
this.sessionStorage = sessionStorage;
@@ -263,6 +273,7 @@ public void setSessionStorage(Map<String, String> sessionStorage)
263273
*
264274
* @return
265275
*/
276+
@Override
266277
public Map<String, Object> getDataReturns()
267278
{
268279
if (dataReturns == null)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package com.jwebmp.core.base.ajax;
2+
3+
import com.guicedee.services.jsonrepresentation.IJsonRepresentation;
4+
5+
import java.io.Serializable;
6+
import java.util.Map;
7+
8+
public interface IAjaxResponse<J extends AjaxResponse<J>> extends Serializable, IJsonRepresentation<J>
9+
{
10+
Map<String, String> getProperties();
11+
12+
J addDataResponse(String listener, IJsonRepresentation<?> json);
13+
14+
J addDataResponse(String listener, Map json) throws Exception;
15+
16+
J addDataResponse(String listener, String result);
17+
18+
/**
19+
* If the server action was a success
20+
*
21+
* @return
22+
*/
23+
boolean isSuccess();
24+
25+
/**
26+
* If the server action was a success, default is no
27+
*
28+
* @param success
29+
*/
30+
void setSuccess(boolean success);
31+
32+
/**
33+
* Returns the map going back for the local storage
34+
*
35+
* @return
36+
*/
37+
Map<String, String> getLocalStorage();
38+
39+
/**
40+
* Sets the map for the local storage going back
41+
*
42+
* @param localStorage
43+
*/
44+
void setLocalStorage(Map<String, String> localStorage);
45+
46+
/**
47+
* Gets the local session going back
48+
*
49+
* @return
50+
*/
51+
Map<String, String> getSessionStorage();
52+
53+
/**
54+
* The session storage going back
55+
*
56+
* @param sessionStorage
57+
*/
58+
void setSessionStorage(Map<String, String> sessionStorage);
59+
60+
/**
61+
* List of all data sending objects to pop out
62+
*
63+
* @return
64+
*/
65+
Map<String, Object> getDataReturns();
66+
}

0 commit comments

Comments
 (0)