File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
java/src/org/labkey/remoteapi/domain Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ public Domain(JSONObject json)
4848 }
4949
5050 public JSONObject toJSONObject ()
51+ {
52+ return toJSONObject (false );
53+ }
54+
55+ public JSONObject toJSONObject (boolean forProtocol )
5156 {
5257 JSONObject result = new JSONObject ();
5358
@@ -63,7 +68,7 @@ public JSONObject toJSONObject()
6368 result .put ("fields" , fields );
6469 for (PropertyDescriptor field : _fields )
6570 {
66- fields .add (field .toJSONObject ());
71+ fields .add (field .toJSONObject (forProtocol ));
6772 }
6873 return result ;
6974 }
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ public PropertyDescriptor(JSONObject json)
7878 }
7979
8080 public JSONObject toJSONObject ()
81+ {
82+ return toJSONObject (false );
83+ }
84+
85+ public JSONObject toJSONObject (boolean forProtocol )
8186 {
8287 JSONObject result = new JSONObject ();
8388
@@ -104,6 +109,15 @@ public JSONObject toJSONObject()
104109 result .put ("lookupQuery" , _lookupQuery );
105110 result .put ("lookupContainer" , _lookupContainer );
106111 }
112+
113+ if (forProtocol )
114+ {
115+ result .put ("url" , result .get ("URL" ));
116+ result .remove ("URL" );
117+ result .put ("phi" , result .get ("PHI" ));
118+ result .remove ("PHI" );
119+ }
120+
107121 return result ;
108122 }
109123
You can’t perform that action at this time.
0 commit comments