List of usage examples for com.liferay.portal.json JSONObjectImpl JSONObjectImpl
public JSONObjectImpl()
From source file:com.liferay.content.targeting.rule.age.AgeRuleTest.java
License:Open Source License
private String _generateJSON(int olderThan, int youngerThan) { JSONObject jsonObj = new JSONObjectImpl(); jsonObj.put("olderThan", olderThan); jsonObj.put("youngerThan", youngerThan); return jsonObj.toString(); }
From source file:com.liferay.content.targeting.rule.facebook.FacebookAgeRuleTest.java
License:Open Source License
private String _generateJSON(int olderThan, int youngerThan) { JSONObject jsonObj = new JSONObjectImpl(); jsonObj.put("fbOlderThan", olderThan); jsonObj.put("fbYoungerThan", youngerThan); return jsonObj.toString(); }
From source file:com.liferay.content.targeting.rule.facebook.FacebookEducationRuleTest.java
License:Open Source License
private String _generateJSON(String educationLevel, String schoolName) { JSONObject jsonObj = new JSONObjectImpl(); jsonObj.put("educationLevel", educationLevel); jsonObj.put("schoolName", schoolName); return jsonObj.toString(); }
From source file:com.liferay.content.targeting.rule.facebook.FacebookFriendsRuleTest.java
License:Open Source License
private String _generateJSON(int numberOfFriends, String selector) { JSONObject jsonObj = new JSONObjectImpl(); jsonObj.put("numberOfFriends", numberOfFriends); jsonObj.put("selector", selector); return jsonObj.toString(); }
From source file:com.liferay.content.targeting.rule.time.TimeRuleTest.java
License:Open Source License
private String _generateJSON(Calendar startDate, Calendar endDate) { JSONObject jsonObj = new JSONObjectImpl(); jsonObj.put("endTimeHour", endDate.get(Calendar.HOUR)); jsonObj.put("endTimeMinute", endDate.get(Calendar.MINUTE)); jsonObj.put("endTimeAmPm", endDate.get(Calendar.AM_PM)); jsonObj.put("startTimeHour", startDate.get(Calendar.HOUR)); jsonObj.put("startTimeMinute", startDate.get(Calendar.MINUTE)); jsonObj.put("startTimeAmPm", startDate.get(Calendar.AM_PM)); return jsonObj.toString(); }