View Javadoc
1   /**
2    * Copyright By Grandsoft Company Limited.  
3    * 2012-2-16 下午03:34:12
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   * @author zhangxj-a
15   * @since jdk1.6
16   * @date 2013-5-21
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  }