Interface SharingEntryService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseService
All Known Implementing Classes:
SharingEntryServiceWrapper

@AccessControlled @JSONWebService @ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface SharingEntryService extends com.liferay.portal.kernel.service.BaseService
Provides the remote service interface for SharingEntry. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
See Also:
Generated:
  • Method Details

    • addOrUpdateSharingEntry

      SharingEntry addOrUpdateSharingEntry(String externalReferenceCode, long toUserGroupId, long toUserId, long classNameId, long classPK, long groupId, boolean shareable, Collection<SharingEntryAction> sharingEntryActions, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a new sharing entry in the database or updates an existing one.
      Parameters:
      toUserId - the ID of the user the resource is shared with
      classNameId - the resource's class name ID
      classPK - the primary key of the resource
      groupId - the primary key of the resource's group
      shareable - whether the user specified by toUserId can share the resource
      sharingEntryActions - the sharing entry actions
      expirationDate - the date when the sharing entry expires
      serviceContext - the service context
      Returns:
      the sharing entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if the user does not have permission to share the resource, if the sharing entry actions are invalid (e.g., empty don't contain SharingEntryAction#VIEW, or contain a null value), if the to/from user IDs are the same, or if the expiration date is a past value
    • addSharingEntry

      SharingEntry addSharingEntry(String externalReferenceCode, long toUserGroupId, long toUserId, long classNameId, long classPK, long groupId, boolean shareable, Collection<SharingEntryAction> sharingEntryActions, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a new sharing entry in the database.
      Parameters:
      toUserId - the ID of the user the resource is shared with
      classNameId - the resource's class name ID
      classPK - the primary key of the resource
      groupId - the primary key of the resource's group
      shareable - whether the user specified by toUserId can share the resource
      sharingEntryActions - the sharing entry actions
      expirationDate - the date when the sharing entry expires
      serviceContext - the service context
      Returns:
      the sharing entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if the user does not have permission to share the resource, if a sharing entry already exists for the to/from user IDs, if the sharing entry actions are invalid (e.g., empty, do not contain SharingEntryAction#VIEW, or contain a null value), if the to/from user IDs are the same, or if the expiration date is a past value
    • deleteSharingEntry

      SharingEntry deleteSharingEntry(long sharingEntryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSharingEntry

      SharingEntry deleteSharingEntry(SharingEntry sharingEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSharingEntryByExternalReferenceCode

      SharingEntry deleteSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchSharingEntryByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry fetchSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getSharingEntries

      @Transactional(propagation=SUPPORTS, readOnly=true) List<SharingEntry> getSharingEntries(long classNameId, long classPK, long groupId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSharingEntry

      @Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry getSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSharingEntryByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry getSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateSharingEntry

      SharingEntry updateSharingEntry(long sharingEntryId, Collection<SharingEntryAction> sharingEntryActions, boolean shareable, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the sharing entry in the database.
      Parameters:
      sharingEntryId - the primary key of the sharing entry
      sharingEntryActions - the sharing entry actions
      shareable - whether the user the resource is shared with can also share it
      expirationDate - the date when the sharing entry expires
      serviceContext - the service context
      Returns:
      the sharing entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if the sharing entry does not exist, if the sharing entry actions are invalid (e.g., empty, don't contain SharingEntryAction#VIEW, or contain a null value), or if the expiration date is a past value