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