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