Class SharingEntryServiceWrapper

java.lang.Object
com.liferay.sharing.service.SharingEntryServiceWrapper
All Implemented Interfaces:
com.liferay.portal.kernel.service.BaseService, com.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>, SharingEntryService

public class SharingEntryServiceWrapper extends Object implements com.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>, SharingEntryService
Provides a wrapper for SharingEntryService.
See Also:
Generated:
  • Constructor Details

    • SharingEntryServiceWrapper

      public SharingEntryServiceWrapper()
    • SharingEntryServiceWrapper

      public SharingEntryServiceWrapper(SharingEntryService sharingEntryService)
  • Method Details

    • addOrUpdateSharingEntry

      public 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.
      Specified by:
      addOrUpdateSharingEntry in interface SharingEntryService
      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:
      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
      com.liferay.portal.kernel.exception.PortalException
    • addSharingEntry

      public 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.
      Specified by:
      addSharingEntry in interface SharingEntryService
      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:
      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
      com.liferay.portal.kernel.exception.PortalException
    • deleteSharingEntry

      public SharingEntry deleteSharingEntry(long sharingEntryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteSharingEntry in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSharingEntry

      public SharingEntry deleteSharingEntry(SharingEntry sharingEntry) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteSharingEntry in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSharingEntryByExternalReferenceCode

      public SharingEntry deleteSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteSharingEntryByExternalReferenceCode in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchSharingEntryByExternalReferenceCode

      public SharingEntry fetchSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      fetchSharingEntryByExternalReferenceCode in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface SharingEntryService
      Returns:
      the OSGi service identifier
    • getSharingEntries

      public List<SharingEntry> getSharingEntries(long classNameId, long classPK, long groupId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getSharingEntries in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSharingEntry

      public SharingEntry getSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getSharingEntry in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSharingEntryByExternalReferenceCode

      public SharingEntry getSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getSharingEntryByExternalReferenceCode in interface SharingEntryService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateSharingEntry

      public 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.
      Specified by:
      updateSharingEntry in interface SharingEntryService
      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:
      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
      com.liferay.portal.kernel.exception.PortalException
    • getWrappedService

      public SharingEntryService getWrappedService()
      Specified by:
      getWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>
    • setWrappedService

      public void setWrappedService(SharingEntryService sharingEntryService)
      Specified by:
      setWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>