Example usage for com.liferay.portal.kernel.security.permission ActionKeys SUBSCRIBE

List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys SUBSCRIBE

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.security.permission ActionKeys SUBSCRIBE.

Prototype

String SUBSCRIBE

To view the source code for com.liferay.portal.kernel.security.permission ActionKeys SUBSCRIBE.

Click Source Link

Usage

From source file:ch.inofix.referencemanager.service.impl.BibliographyServiceImpl.java

License:Open Source License

/**
 * @param groupId/*  w w w  .j  a va2 s .c  o m*/
 * @since 1.0.0
 * @throws PortalException
 */
public void subscribe(long groupId) throws PortalException {

    BibliographyPermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    bibliographyLocalService.subscribe(getUserId(), groupId);
}

From source file:ch.inofix.referencemanager.service.impl.BibliographyServiceImpl.java

License:Open Source License

/**
 * @param groupId//  ww w  .j  a  v  a2s .  c  o m
 * @since 1.0.0
 * @throws PortalException
 */
public void unsubscribe(long groupId) throws PortalException {

    BibliographyPermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    bibliographyLocalService.unsubscribe(getUserId(), groupId);
}

From source file:ch.inofix.referencemanager.service.impl.ReferenceServiceImpl.java

License:Open Source License

/**
 * @param groupId/*from   w w  w  .j  a v  a  2  s .  com*/
 * @since 1.0.0
 * @throws PortalException
 */
public void subscribe(long groupId) throws PortalException {

    ReferencePermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    referenceLocalService.subscribe(getUserId(), groupId);
}

From source file:ch.inofix.referencemanager.service.impl.ReferenceServiceImpl.java

License:Open Source License

/**
 * @param groupId/*from ww w . ja v  a  2 s.c om*/
 * @since 1.0.0
 * @throws PortalException
 */
public void unsubscribe(long groupId) throws PortalException {

    ReferencePermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    referenceLocalService.unsubscribe(getUserId(), groupId);
}

From source file:com.liferay.asset.publisher.web.internal.util.AssetPublisherWebUtil.java

License:Open Source License

public void subscribe(PermissionChecker permissionChecker, long groupId, long plid, String portletId)
        throws PortalException {

    Layout layout = _layoutLocalService.fetchLayout(plid);

    PortletPermissionUtil.check(permissionChecker, 0, layout, portletId, ActionKeys.SUBSCRIBE, false, false);

    _subscriptionLocalService.addSubscription(permissionChecker.getUserId(), groupId,
            com.liferay.portal.kernel.model.PortletPreferences.class.getName(),
            getSubscriptionClassPK(plid, portletId));
}

From source file:com.liferay.asset.publisher.web.internal.util.AssetPublisherWebUtil.java

License:Open Source License

public void unsubscribe(PermissionChecker permissionChecker, long plid, String portletId)
        throws PortalException {

    Layout layout = _layoutLocalService.fetchLayout(plid);

    PortletPermissionUtil.check(permissionChecker, 0, layout, portletId, ActionKeys.SUBSCRIBE, false, false);

    _subscriptionLocalService.deleteSubscription(permissionChecker.getUserId(),
            com.liferay.portal.kernel.model.PortletPreferences.class.getName(),
            getSubscriptionClassPK(plid, portletId));
}

From source file:com.liferay.asset.publisher.web.util.AssetPublisherUtil.java

License:Open Source License

public static void subscribe(PermissionChecker permissionChecker, long groupId, long plid, String portletId)
        throws PortalException {

    Layout layout = _layoutLocalService.fetchLayout(plid);

    PortletPermissionUtil.check(permissionChecker, 0, layout, portletId, ActionKeys.SUBSCRIBE, false, false);

    _subscriptionLocalService.addSubscription(permissionChecker.getUserId(), groupId,
            com.liferay.portal.kernel.model.PortletPreferences.class.getName(),
            getSubscriptionClassPK(plid, portletId));
}

From source file:com.liferay.asset.publisher.web.util.AssetPublisherUtil.java

License:Open Source License

public static void unsubscribe(PermissionChecker permissionChecker, long plid, String portletId)
        throws PortalException {

    Layout layout = _layoutLocalService.fetchLayout(plid);

    PortletPermissionUtil.check(permissionChecker, 0, layout, portletId, ActionKeys.SUBSCRIBE, false, false);

    _subscriptionLocalService.deleteSubscription(permissionChecker.getUserId(),
            com.liferay.portal.kernel.model.PortletPreferences.class.getName(),
            getSubscriptionClassPK(plid, portletId));
}

From source file:com.liferay.blogs.service.impl.BlogsEntryServiceImpl.java

License:Open Source License

@Override
public void subscribe(long groupId) throws PortalException {
    BlogsPermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    blogsEntryLocalService.subscribe(getUserId(), groupId);
}

From source file:com.liferay.blogs.service.impl.BlogsEntryServiceImpl.java

License:Open Source License

@Override
public void unsubscribe(long groupId) throws PortalException {
    BlogsPermission.check(getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE);

    blogsEntryLocalService.unsubscribe(getUserId(), groupId);
}