return array;
}
private static JsonValue createPageActionsArray(
SortedSet<PageActionArtifact> pageActions) {
final JsonArray pageActionArray = JsonArray.create();
for (PageActionArtifact pageAction : pageActions) {
final JsonObject pageActionObject = JsonObject.create();
pageActionObject.put("id", pageAction.getId());
pageActionObject.put("name", pageAction.getName());
final JsonArray iconsArray = JsonArray.create();
String[] icons = pageAction.getIcons();
for (String icon : icons) {
iconsArray.add(icon);
}
pageActionObject.put("icons", iconsArray);
pageActionArray.add(pageActionObject);
}
return pageActionArray;