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