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(java.lang.String structureId,
77 boolean autoStructureId, long plid, java.lang.String name,
78 java.lang.String description, java.lang.String xsd,
79 boolean addCommunityPermissions, boolean addGuestPermissions)
80 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
81 com.liferay.portal.SystemException {
82 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.addStructure(structureId,
83 autoStructureId, plid, name, description, xsd,
84 addCommunityPermissions, addGuestPermissions);
85
86 return JournalStructureJSONSerializer.toJSONObject(returnValue);
87 }
88
89 public static JSONObject addStructure(java.lang.String structureId,
90 boolean autoStructureId, long plid, java.lang.String name,
91 java.lang.String description, java.lang.String xsd,
92 java.lang.String[] communityPermissions,
93 java.lang.String[] guestPermissions)
94 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.addStructure(structureId,
97 autoStructureId, plid, name, description, xsd,
98 communityPermissions, guestPermissions);
99
100 return JournalStructureJSONSerializer.toJSONObject(returnValue);
101 }
102
103 public static JSONObject copyStructure(long groupId,
104 java.lang.String oldStructureId, java.lang.String newStructureId,
105 boolean autoStructureId)
106 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.copyStructure(groupId,
109 oldStructureId, newStructureId, autoStructureId);
110
111 return JournalStructureJSONSerializer.toJSONObject(returnValue);
112 }
113
114 public static void deleteStructure(long groupId,
115 java.lang.String structureId)
116 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException {
118 JournalStructureServiceUtil.deleteStructure(groupId, structureId);
119 }
120
121 public static JSONObject getStructure(long groupId,
122 java.lang.String structureId)
123 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException {
125 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.getStructure(groupId,
126 structureId);
127
128 return JournalStructureJSONSerializer.toJSONObject(returnValue);
129 }
130
131 public static JSONObject updateStructure(long groupId,
132 java.lang.String structureId, java.lang.String name,
133 java.lang.String description, java.lang.String xsd)
134 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
135 com.liferay.portal.SystemException {
136 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.updateStructure(groupId,
137 structureId, name, description, xsd);
138
139 return JournalStructureJSONSerializer.toJSONObject(returnValue);
140 }
141 }