Package com.liferay.sharing.service
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateSharingEntry(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) Adds a new sharing entry in the database or updates an existing one.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) Adds a new sharing entry in the database.deleteSharingEntry(long sharingEntryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) deleteSharingEntry(SharingEntry sharingEntry) deleteSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) fetchSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) Returns the OSGi service identifier.getSharingEntries(long classNameId, long classPK, long groupId, int start, int end) getSharingEntry(long sharingEntryId) getSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) voidsetWrappedService(SharingEntryService sharingEntryService) updateSharingEntry(long sharingEntryId, Collection<SharingEntryAction> sharingEntryActions, boolean shareable, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the sharing entry in the database.
-
Constructor Details
-
SharingEntryServiceWrapper
public SharingEntryServiceWrapper() -
SharingEntryServiceWrapper
-
-
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:
addOrUpdateSharingEntryin interfaceSharingEntryService- Parameters:
toUserId- the ID of the user the resource is shared withclassNameId- the resource's class name IDclassPK- the primary key of the resourcegroupId- the primary key of the resource's groupshareable- whether the user specified bytoUserIdcan share the resourcesharingEntryActions- the sharing entry actionsexpirationDate- the date when the sharing entry expiresserviceContext- 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 containSharingEntryAction#VIEW, or contain anullvalue), if the to/from user IDs are the same, or if the expiration date is a past valuecom.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:
addSharingEntryin interfaceSharingEntryService- Parameters:
toUserId- the ID of the user the resource is shared withclassNameId- the resource's class name IDclassPK- the primary key of the resourcegroupId- the primary key of the resource's groupshareable- whether the user specified bytoUserIdcan share the resourcesharingEntryActions- the sharing entry actionsexpirationDate- the date when the sharing entry expiresserviceContext- 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 containSharingEntryAction#VIEW, or contain anullvalue), if the to/from user IDs are the same, or if the expiration date is a past valuecom.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:
deleteSharingEntryin interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteSharingEntry
public SharingEntry deleteSharingEntry(SharingEntry sharingEntry) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deleteSharingEntryin interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteSharingEntryByExternalReferenceCode
public SharingEntry deleteSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deleteSharingEntryByExternalReferenceCodein interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchSharingEntryByExternalReferenceCode
public SharingEntry fetchSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
fetchSharingEntryByExternalReferenceCodein interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifierin interfaceSharingEntryService- 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:
getSharingEntriesin interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSharingEntry
public SharingEntry getSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getSharingEntryin interfaceSharingEntryService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSharingEntryByExternalReferenceCode
public SharingEntry getSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getSharingEntryByExternalReferenceCodein interfaceSharingEntryService- 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:
updateSharingEntryin interfaceSharingEntryService- Parameters:
sharingEntryId- the primary key of the sharing entrysharingEntryActions- the sharing entry actionsshareable- whether the user the resource is shared with can also share itexpirationDate- the date when the sharing entry expiresserviceContext- 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 containSharingEntryAction#VIEW, or contain anullvalue), or if the expiration date is a past valuecom.liferay.portal.kernel.exception.PortalException
-
getWrappedService
- Specified by:
getWrappedServicein interfacecom.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>
-
setWrappedService
- Specified by:
setWrappedServicein interfacecom.liferay.portal.kernel.service.ServiceWrapper<SharingEntryService>
-