Hi everybody,
I am working on a portlet with permissions and I used ServiceBuilder for the service layer. I found the information, that every implementation class has the method getPermissionChecker. But my implementation class does not have this method.
This is my implementation class with an add() method:
1public class PRProductLocalServiceImpl extends PRProductLocalServiceBaseImpl {
2 /**
3 * Adds a new product to the database.
4 *
5 * @param productName
6 * @param productSerial
7 * @return
8 * @throws com.liferay.portal.kernel.exception.SystemException
9 */
10 public PRProduct addProduct(PRProduct newProduct, long userId)
11 throws SystemException, PortalException {
12
13
14 PRProduct product =
15 prProductPersistence.create(
16 counterLocalService.increment(PRProduct.class.getName()));
17
18 product.setProductName(newProduct.getProductName());
19 product.setSerialNumber(newProduct.getSerialNumber());
20 product.setCompanyId(newProduct.getCompanyId());
21 product.setGroupId(newProduct.getGroupId());
22
23 resourceLocalService.addResources(
24 newProduct.getCompanyId(), newProduct.getGroupId(), userId,
25 PRProduct.class.getName(), product.getPrimaryKey(), false,
26 true, true);
27
28 return prProductPersistence.update(product, false);
29 }
30}
If I understand it correctly, I am able to call getPermissionChecker() in my add() method. Or do I do somethong wrong?
Thank you,
Christopher
Please sign in to flag this as inappropriate.