@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
SharingEntryServiceUtil| Modifier and Type | Method and Description |
|---|---|
SharingEntry |
addOrUpdateSharingEntry(long toUserId,
long classNameId,
long classPK,
long groupId,
boolean shareable,
java.util.Collection<SharingEntryAction> sharingEntryActions,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a new sharing entry in the database or updates an existing one.
|
SharingEntry |
addSharingEntry(long toUserId,
long classNameId,
long classPK,
long groupId,
boolean shareable,
java.util.Collection<SharingEntryAction> sharingEntryActions,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a new sharing entry in the database.
|
SharingEntry |
deleteSharingEntry(long sharingEntryId,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
SharingEntry |
updateSharingEntry(long sharingEntryId,
java.util.Collection<SharingEntryAction> sharingEntryActions,
boolean shareable,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the sharing entry in the database.
|
SharingEntry addOrUpdateSharingEntry(long toUserId, long classNameId, long classPK, long groupId, boolean shareable, java.util.Collection<SharingEntryAction> sharingEntryActions, java.util.Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
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 by toUserId can
share the resourcesharingEntryActions - the sharing entry actionsexpirationDate - the date when the sharing entry expiresserviceContext - the service contextcom.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 valueSharingEntry addSharingEntry(long toUserId, long classNameId, long classPK, long groupId, boolean shareable, java.util.Collection<SharingEntryAction> sharingEntryActions, java.util.Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
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 by toUserId can
share the resourcesharingEntryActions - the sharing entry actionsexpirationDate - the date when the sharing entry expiresserviceContext - the service contextcom.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 valueSharingEntry deleteSharingEntry(long sharingEntryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionjava.lang.String getOSGiServiceIdentifier()
SharingEntry updateSharingEntry(long sharingEntryId, java.util.Collection<SharingEntryAction> sharingEntryActions, boolean shareable, java.util.Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
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 contextcom.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