1
2
3
4
5 package gboat2.base.core.web;
6
7 import net.sf.json.JSONArray;
8 import net.sf.json.JSONObject;
9
10
11
12
13
14
15
16
17
18
19 public class MetadataOthers extends SplitMetadataStrategy {
20
21 private static SplitMetadataStrategy instance = new MetadataOthers();
22
23 private MetadataOthers() {
24 super();
25 }
26
27 public JSONObject decorateMetadata(JSONObject returned, String invokeMethod, BaseActionSupport action){
28 JSONArray operations = (JSONArray) returned.get("operations");
29 if (operations == null) {
30 operations = new JSONArray();
31 }
32 operations = filtMetaOperas(operations, action);
33 returned.put("operations", operations);
34
35 return returned;
36 }
37
38 public static SplitMetadataStrategy getInstance() {
39 return instance;
40 }
41 }