1
22
23 package com.liferay.portlet.journal.service.http;
24
25 import com.liferay.portal.kernel.json.JSONObject;
26
27 import com.liferay.portlet.journal.service.JournalStructureServiceUtil;
28
29
75 public class JournalStructureServiceJSON {
76 public static JSONObject addStructure(long groupId,
77 java.lang.String structureId, boolean autoStructureId,
78 java.lang.String parentStructureId, java.lang.String name,
79 java.lang.String description, java.lang.String xsd,
80 boolean addCommunityPermissions, boolean addGuestPermissions)
81 throws com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.addStructure(groupId,
84 structureId, autoStructureId, parentStructureId, name,
85 description, xsd, addCommunityPermissions, addGuestPermissions);
86
87 return JournalStructureJSONSerializer.toJSONObject(returnValue);
88 }
89
90 public static JSONObject addStructure(long groupId,
91 java.lang.String structureId, boolean autoStructureId,
92 java.lang.String parentStructureId, java.lang.String name,
93 java.lang.String description, java.lang.String xsd,
94 java.lang.String[] communityPermissions,
95 java.lang.String[] guestPermissions)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.addStructure(groupId,
99 structureId, autoStructureId, parentStructureId, name,
100 description, xsd, communityPermissions, guestPermissions);
101
102 return JournalStructureJSONSerializer.toJSONObject(returnValue);
103 }
104
105 public static JSONObject copyStructure(long groupId,
106 java.lang.String oldStructureId, java.lang.String newStructureId,
107 boolean autoStructureId)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.copyStructure(groupId,
111 oldStructureId, newStructureId, autoStructureId);
112
113 return JournalStructureJSONSerializer.toJSONObject(returnValue);
114 }
115
116 public static void deleteStructure(long groupId,
117 java.lang.String structureId)
118 throws com.liferay.portal.PortalException,
119 com.liferay.portal.SystemException {
120 JournalStructureServiceUtil.deleteStructure(groupId, structureId);
121 }
122
123 public static JSONObject getStructure(long groupId,
124 java.lang.String structureId)
125 throws com.liferay.portal.PortalException,
126 com.liferay.portal.SystemException {
127 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.getStructure(groupId,
128 structureId);
129
130 return JournalStructureJSONSerializer.toJSONObject(returnValue);
131 }
132
133 public static JSONObject updateStructure(long groupId,
134 java.lang.String structureId, java.lang.String parentStructureId,
135 java.lang.String name, java.lang.String description,
136 java.lang.String xsd)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException {
139 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.updateStructure(groupId,
140 structureId, parentStructureId, name, description, xsd);
141
142 return JournalStructureJSONSerializer.toJSONObject(returnValue);
143 }
144 }