Package com.liferay.sharing.service
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 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) updateSharingEntry
(long sharingEntryId, Collection<SharingEntryAction> sharingEntryActions, boolean shareable, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the sharing entry in the database.
-
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 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 bytoUserId
can share the resourcesharingEntryActions
- the sharing entry actionsexpirationDate
- the date when the sharing entry expiresserviceContext
- 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 containSharingEntryAction#VIEW
, or contain anull
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 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 bytoUserId
can share the resourcesharingEntryActions
- the sharing entry actionsexpirationDate
- the date when the sharing entry expiresserviceContext
- 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 containSharingEntryAction#VIEW
, or contain anull
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 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:
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 containSharingEntryAction#VIEW
, or contain anull
value), or if the expiration date is a past value
-