1
22
23 package com.liferay.portlet.shopping.service;
24
25
26
53 public class ShoppingCategoryLocalServiceUtil {
54 public static com.liferay.portlet.shopping.model.ShoppingCategory addShoppingCategory(
55 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
56 throws com.liferay.portal.SystemException {
57 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
58
59 return shoppingCategoryLocalService.addShoppingCategory(shoppingCategory);
60 }
61
62 public static void deleteShoppingCategory(long categoryId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
66
67 shoppingCategoryLocalService.deleteShoppingCategory(categoryId);
68 }
69
70 public static void deleteShoppingCategory(
71 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
72 throws com.liferay.portal.SystemException {
73 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
74
75 shoppingCategoryLocalService.deleteShoppingCategory(shoppingCategory);
76 }
77
78 public static java.util.List<Object> dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80 throws com.liferay.portal.SystemException {
81 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
82
83 return shoppingCategoryLocalService.dynamicQuery(dynamicQuery);
84 }
85
86 public static java.util.List<Object> dynamicQuery(
87 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88 int end) throws com.liferay.portal.SystemException {
89 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
90
91 return shoppingCategoryLocalService.dynamicQuery(dynamicQuery, start,
92 end);
93 }
94
95 public static com.liferay.portlet.shopping.model.ShoppingCategory getShoppingCategory(
96 long categoryId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
100
101 return shoppingCategoryLocalService.getShoppingCategory(categoryId);
102 }
103
104 public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
105 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
106 throws com.liferay.portal.SystemException {
107 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
108
109 return shoppingCategoryLocalService.updateShoppingCategory(shoppingCategory);
110 }
111
112 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
113 long userId, long plid, long parentCategoryId, java.lang.String name,
114 java.lang.String description, boolean addCommunityPermissions,
115 boolean addGuestPermissions)
116 throws com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException {
118 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
119
120 return shoppingCategoryLocalService.addCategory(userId, plid,
121 parentCategoryId, name, description, addCommunityPermissions,
122 addGuestPermissions);
123 }
124
125 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
126 long userId, long plid, long parentCategoryId, java.lang.String name,
127 java.lang.String description, java.lang.String[] communityPermissions,
128 java.lang.String[] guestPermissions)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
132
133 return shoppingCategoryLocalService.addCategory(userId, plid,
134 parentCategoryId, name, description, communityPermissions,
135 guestPermissions);
136 }
137
138 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
139 long userId, long plid, long parentCategoryId, java.lang.String name,
140 java.lang.String description,
141 java.lang.Boolean addCommunityPermissions,
142 java.lang.Boolean addGuestPermissions,
143 java.lang.String[] communityPermissions,
144 java.lang.String[] guestPermissions)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
148
149 return shoppingCategoryLocalService.addCategory(userId, plid,
150 parentCategoryId, name, description, addCommunityPermissions,
151 addGuestPermissions, communityPermissions, guestPermissions);
152 }
153
154 public static void addCategoryResources(long categoryId,
155 boolean addCommunityPermissions, boolean addGuestPermissions)
156 throws com.liferay.portal.PortalException,
157 com.liferay.portal.SystemException {
158 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
159
160 shoppingCategoryLocalService.addCategoryResources(categoryId,
161 addCommunityPermissions, addGuestPermissions);
162 }
163
164 public static void addCategoryResources(
165 com.liferay.portlet.shopping.model.ShoppingCategory category,
166 boolean addCommunityPermissions, boolean addGuestPermissions)
167 throws com.liferay.portal.PortalException,
168 com.liferay.portal.SystemException {
169 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
170
171 shoppingCategoryLocalService.addCategoryResources(category,
172 addCommunityPermissions, addGuestPermissions);
173 }
174
175 public static void addCategoryResources(long categoryId,
176 java.lang.String[] communityPermissions,
177 java.lang.String[] guestPermissions)
178 throws com.liferay.portal.PortalException,
179 com.liferay.portal.SystemException {
180 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
181
182 shoppingCategoryLocalService.addCategoryResources(categoryId,
183 communityPermissions, guestPermissions);
184 }
185
186 public static void addCategoryResources(
187 com.liferay.portlet.shopping.model.ShoppingCategory category,
188 java.lang.String[] communityPermissions,
189 java.lang.String[] guestPermissions)
190 throws com.liferay.portal.PortalException,
191 com.liferay.portal.SystemException {
192 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
193
194 shoppingCategoryLocalService.addCategoryResources(category,
195 communityPermissions, guestPermissions);
196 }
197
198 public static void deleteCategories(long groupId)
199 throws com.liferay.portal.PortalException,
200 com.liferay.portal.SystemException {
201 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
202
203 shoppingCategoryLocalService.deleteCategories(groupId);
204 }
205
206 public static void deleteCategory(long categoryId)
207 throws com.liferay.portal.PortalException,
208 com.liferay.portal.SystemException {
209 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
210
211 shoppingCategoryLocalService.deleteCategory(categoryId);
212 }
213
214 public static void deleteCategory(
215 com.liferay.portlet.shopping.model.ShoppingCategory category)
216 throws com.liferay.portal.PortalException,
217 com.liferay.portal.SystemException {
218 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
219
220 shoppingCategoryLocalService.deleteCategory(category);
221 }
222
223 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
224 long groupId) throws com.liferay.portal.SystemException {
225 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
226
227 return shoppingCategoryLocalService.getCategories(groupId);
228 }
229
230 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
231 long groupId, long parentCategoryId, int start, int end)
232 throws com.liferay.portal.SystemException {
233 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
234
235 return shoppingCategoryLocalService.getCategories(groupId,
236 parentCategoryId, start, end);
237 }
238
239 public static int getCategoriesCount(long groupId, long parentCategoryId)
240 throws com.liferay.portal.SystemException {
241 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
242
243 return shoppingCategoryLocalService.getCategoriesCount(groupId,
244 parentCategoryId);
245 }
246
247 public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
248 long categoryId)
249 throws com.liferay.portal.PortalException,
250 com.liferay.portal.SystemException {
251 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
252
253 return shoppingCategoryLocalService.getCategory(categoryId);
254 }
255
256 public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
257 com.liferay.portlet.shopping.model.ShoppingCategory category)
258 throws com.liferay.portal.PortalException,
259 com.liferay.portal.SystemException {
260 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
261
262 return shoppingCategoryLocalService.getParentCategory(category);
263 }
264
265 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
266 long categoryId)
267 throws com.liferay.portal.PortalException,
268 com.liferay.portal.SystemException {
269 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
270
271 return shoppingCategoryLocalService.getParentCategories(categoryId);
272 }
273
274 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
275 com.liferay.portlet.shopping.model.ShoppingCategory category)
276 throws com.liferay.portal.PortalException,
277 com.liferay.portal.SystemException {
278 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
279
280 return shoppingCategoryLocalService.getParentCategories(category);
281 }
282
283 public static void getSubcategoryIds(java.util.List<Long> categoryIds,
284 long groupId, long categoryId)
285 throws com.liferay.portal.SystemException {
286 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
287
288 shoppingCategoryLocalService.getSubcategoryIds(categoryIds, groupId,
289 categoryId);
290 }
291
292 public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
293 long categoryId, long parentCategoryId, java.lang.String name,
294 java.lang.String description, boolean mergeWithParentCategory)
295 throws com.liferay.portal.PortalException,
296 com.liferay.portal.SystemException {
297 ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory.getService();
298
299 return shoppingCategoryLocalService.updateCategory(categoryId,
300 parentCategoryId, name, description, mergeWithParentCategory);
301 }
302 }