Skip to content

Commit

Permalink
Added the default survey response privacy states to config/read.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Jenkins committed Aug 11, 2011
1 parent 2f2e6f8 commit 415fe3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/ohmage/service/ConfigReadService.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
import java.util.Properties;

import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.ohmage.cache.CacheMissException;
import org.ohmage.cache.PreferenceCache;
import org.ohmage.cache.SurveyResponsePrivacyStateCache;
import org.ohmage.request.AwRequest;
import org.ohmage.request.ConfigReadRequest;
import org.ohmage.validator.AwRequestAnnotator;
Expand Down Expand Up @@ -98,6 +100,9 @@ public void execute(AwRequest awRequest) {
throw new ServiceException(e);
}

// Get the actual privacy states.
response.put("survey_response_privacy_states", new JSONArray(SurveyResponsePrivacyStateCache.instance().getKeys()));

awRequest.addToReturn(ConfigReadRequest.RESULT, response, true);
}
catch(JSONException e) {
Expand Down

0 comments on commit 415fe3b

Please sign in to comment.