@ProviderType
@Transactional(isolation=PORTAL,
rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class})
public interface SharingEntryLocalService
extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService
SharingEntryLocalServiceUtil
Modifier and Type | Method and Description |
---|---|
SharingEntry |
addOrUpdateSharingEntry(long userId,
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 userId,
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 |
addSharingEntry(SharingEntry sharingEntry)
Adds the sharing entry to the database.
|
com.liferay.portal.kernel.model.PersistedModel |
createPersistedModel(java.io.Serializable primaryKeyObj) |
SharingEntry |
createSharingEntry(long sharingEntryId)
Creates a new sharing entry with the primary key.
|
void |
deleteExpiredEntries()
Deletes the sharing entries whose expiration date is before the current
date.
|
void |
deleteGroupSharingEntries(long groupId)
Deletes the group's sharing entries.
|
com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
void |
deleteSharingEntries(long classNameId,
long classPK)
Deletes the resource's sharing entries.
|
SharingEntry |
deleteSharingEntry(long sharingEntryId)
Deletes the sharing entry with the primary key from the database.
|
SharingEntry |
deleteSharingEntry(long toUserId,
long classNameId,
long classPK)
Deletes the sharing entry for the resource and users.
|
SharingEntry |
deleteSharingEntry(SharingEntry sharingEntry)
Deletes the sharing entry from the database.
|
void |
deleteToUserSharingEntries(long toUserId)
Deletes the sharing entries for resources shared with the user.
|
<T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
com.liferay.portal.kernel.dao.orm.DynamicQuery |
dynamicQuery() |
<T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
<T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
<T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
com.liferay.portal.kernel.dao.orm.Projection projection)
Returns the number of rows matching the dynamic query.
|
SharingEntry |
fetchSharingEntry(long sharingEntryId) |
SharingEntry |
fetchSharingEntry(long toUserId,
long classNameId,
long classPK)
Returns the sharing entry for the resource shared with the user or
null if there's none. |
SharingEntry |
fetchSharingEntryByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the sharing entry matching the UUID and group.
|
com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery |
getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) |
java.util.List<SharingEntry> |
getFromUserSharingEntries(long fromUserId,
long classNameId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
Returns the ordered range of sharing entries for the type of resource
shared by the user.
|
int |
getFromUserSharingEntriesCount(long fromUserId,
long classNameId)
Returns the number of sharing entries for the type of resource shared by
the user.
|
java.util.List<SharingEntry> |
getGroupSharingEntries(long groupId)
Returns the the group's sharing entries.
|
int |
getGroupSharingEntriesCount(long groupId)
Returns the the group's sharing entries count.
|
com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
com.liferay.portal.kernel.model.PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
java.util.List<SharingEntry> |
getSharingEntries(int start,
int end)
Returns a range of all the sharing entries.
|
java.util.List<SharingEntry> |
getSharingEntries(long classNameId,
long classPK)
Returns the resource's sharing entries.
|
java.util.List<SharingEntry> |
getSharingEntries(long classNameId,
long classPK,
int start,
int end)
Returns the resource's sharing entries.
|
java.util.List<SharingEntry> |
getSharingEntriesByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns all the sharing entries matching the UUID and company.
|
java.util.List<SharingEntry> |
getSharingEntriesByUuidAndCompanyId(java.lang.String uuid,
long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
Returns a range of sharing entries matching the UUID and company.
|
int |
getSharingEntriesCount()
Returns the number of sharing entries.
|
int |
getSharingEntriesCount(long classNameId,
long classPK)
Returns the resource's sharing entries count.
|
SharingEntry |
getSharingEntry(long sharingEntryId)
Returns the sharing entry with the primary key.
|
SharingEntry |
getSharingEntry(long toUserId,
long classNameId,
long classPK)
Returns the sharing entry for the resource shared with the user.
|
SharingEntry |
getSharingEntryByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the sharing entry matching the UUID and group.
|
java.util.List<SharingEntry> |
getToUserSharingEntries(long toUserId)
Returns the list of sharing entries for resources shared with the user.
|
java.util.List<SharingEntry> |
getToUserSharingEntries(long toUserId,
int start,
int end)
Returns the range of sharing entries for resources shared with the user.
|
java.util.List<SharingEntry> |
getToUserSharingEntries(long toUserId,
long classNameId)
Returns the list of sharing entries for the type of resource shared with
the user.
|
java.util.List<SharingEntry> |
getToUserSharingEntries(long toUserId,
long classNameId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
Returns the ordered range of sharing entries for the type of resource
shared with the user.
|
int |
getToUserSharingEntriesCount(long toUserId)
Returns the number of sharing entries for resources shared with the user.
|
int |
getToUserSharingEntriesCount(long toUserId,
long classNameId)
Returns the number of sharing entries for the type of resource shared
with the user.
|
boolean |
hasShareableSharingPermission(long toUserId,
long classNameId,
long classPK,
SharingEntryAction sharingEntryAction)
Returns
true if the resource with the sharing entry action has
been shared with a user who can also share that resource. |
boolean |
hasSharingPermission(long toUserId,
long classNameId,
long classPK,
SharingEntryAction sharingEntryAction)
Returns
true if the resource with the sharing entry action has
been shared with the user. |
SharingEntry |
updateSharingEntry(long sharingEntryId,
java.util.Collection<SharingEntryAction> sharingEntryActions,
boolean shareable,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deprecated.
As of Mueller (7.2.x), replaced by
updateSharingEntry(
long, long, Collection, boolean, Date, ServiceContext) |
SharingEntry |
updateSharingEntry(long userId,
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 |
updateSharingEntry(SharingEntry sharingEntry)
Updates the sharing entry in the database or adds it if it does not yet exist.
|
SharingEntry addOrUpdateSharingEntry(long userId, 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
userId
- the ID of the user sharing the resourcetoUserId
- the ID of the user the resource is shared withclassNameId
- the resource's class name IDclassPK
- the class 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 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 userId, 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
userId
- the ID of the user sharing the resourcetoUserId
- the ID of the user the resource is shared withclassNameId
- the resource's class name IDclassPK
- the class 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 a sharing entry already exists for the to/from
user IDs, 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@Indexable(type=REINDEX) SharingEntry addSharingEntry(SharingEntry sharingEntry)
Important: Inspect SharingEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
sharingEntry
- the sharing entrycom.liferay.portal.kernel.model.PersistedModel createPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
createPersistedModel
in interface com.liferay.portal.kernel.service.PersistedModelLocalService
com.liferay.portal.kernel.exception.PortalException
@Transactional(enabled=false) SharingEntry createSharingEntry(long sharingEntryId)
sharingEntryId
- the primary key for the new sharing entryvoid deleteExpiredEntries()
void deleteGroupSharingEntries(long groupId)
groupId
- the group's IDcom.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
deletePersistedModel
in interface com.liferay.portal.kernel.service.PersistedModelLocalService
com.liferay.portal.kernel.exception.PortalException
void deleteSharingEntries(long classNameId, long classPK)
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource@Indexable(type=DELETE) SharingEntry deleteSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException
Important: Inspect SharingEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
sharingEntryId
- the primary key of the sharing entrycom.liferay.portal.kernel.exception.PortalException
- if a sharing entry with the primary key could not be foundSharingEntry deleteSharingEntry(long toUserId, long classNameId, long classPK) 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 class primary key of the resourcecom.liferay.portal.kernel.exception.PortalException
@Indexable(type=DELETE) @SystemEvent(type=1) SharingEntry deleteSharingEntry(SharingEntry sharingEntry)
Important: Inspect SharingEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
sharingEntry
- the sharing entryvoid deleteToUserSharingEntries(long toUserId)
toUserId
- the user's ID@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
dslQuery
in interface com.liferay.portal.kernel.service.PersistedModelLocalService
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
dslQueryCount
in interface com.liferay.portal.kernel.service.PersistedModelLocalService
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
@Transactional(propagation=SUPPORTS, readOnly=true) <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic query@Transactional(propagation=SUPPORTS, readOnly=true) <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.sharing.model.impl.SharingEntryModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.sharing.model.impl.SharingEntryModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic query@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry fetchSharingEntry(long sharingEntryId)
@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry fetchSharingEntry(long toUserId, long classNameId, long classPK)
null
if there's none. The class name ID and class primary
key identify the resource's type and instance, respectively.toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the resourcenull
if none@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry fetchSharingEntryByUuidAndGroupId(java.lang.String uuid, long groupId)
uuid
- the sharing entry's UUIDgroupId
- the primary key of the groupnull
if a matching sharing entry could not be found@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getFromUserSharingEntries(long fromUserId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
fromUserId
- the user's IDclassNameId
- the class name ID of the resourcesstart
- the ordered range's lower boundend
- the ordered range's upper bound (not inclusive)orderByComparator
- the comparator that orders the sharing entries@Transactional(propagation=SUPPORTS, readOnly=true) int getFromUserSharingEntriesCount(long fromUserId, long classNameId)
fromUserId
- the user's IDclassNameId
- the class name ID of the resources@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getGroupSharingEntries(long groupId)
groupId
- the primary key of the group@Transactional(propagation=SUPPORTS, readOnly=true) int getGroupSharingEntriesCount(long groupId)
groupId
- the primary key of the group@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
java.lang.String getOSGiServiceIdentifier()
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
getPersistedModel
in interface com.liferay.portal.kernel.service.PersistedModelLocalService
com.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getSharingEntries(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.sharing.model.impl.SharingEntryModelImpl
.
start
- the lower bound of the range of sharing entriesend
- the upper bound of the range of sharing entries (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getSharingEntries(long classNameId, long classPK)
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getSharingEntries(long classNameId, long classPK, int start, int end)
classNameId
- the resource's class name IDclassPK
- the class primary key of the resourcestart
- the range's lower boundend
- the range's upper bound (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getSharingEntriesByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid
- the UUID of the sharing entriescompanyId
- the primary key of the company@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getSharingEntriesByUuidAndCompanyId(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
uuid
- the UUID of the sharing entriescompanyId
- the primary key of the companystart
- the lower bound of the range of sharing entriesend
- the upper bound of the range of sharing entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)@Transactional(propagation=SUPPORTS, readOnly=true) int getSharingEntriesCount()
@Transactional(propagation=SUPPORTS, readOnly=true) int getSharingEntriesCount(long classNameId, long classPK)
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry getSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException
sharingEntryId
- the primary key of the sharing entrycom.liferay.portal.kernel.exception.PortalException
- if a sharing entry with the primary key could not be found@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry getSharingEntry(long toUserId, long classNameId, long classPK) throws com.liferay.portal.kernel.exception.PortalException
toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the resourcecom.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) SharingEntry getSharingEntryByUuidAndGroupId(java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
uuid
- the sharing entry's UUIDgroupId
- the primary key of the groupcom.liferay.portal.kernel.exception.PortalException
- if a matching sharing entry could not be found@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getToUserSharingEntries(long toUserId)
toUserId
- the user's ID@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getToUserSharingEntries(long toUserId, int start, int end)
toUserId
- the user's IDstart
- the range's lower boundend
- the range's upper bound (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getToUserSharingEntries(long toUserId, long classNameId)
toUserId
- the user's IDclassNameId
- the class name ID of the resources@Transactional(propagation=SUPPORTS, readOnly=true) java.util.List<SharingEntry> getToUserSharingEntries(long toUserId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharingEntry> orderByComparator)
toUserId
- the user's IDclassNameId
- the class name ID of the resourcesstart
- the ordered range's lower boundend
- the ordered range's upper bound (not inclusive)orderByComparator
- the comparator that orders the sharing entries@Transactional(propagation=SUPPORTS, readOnly=true) int getToUserSharingEntriesCount(long toUserId)
toUserId
- the user's ID@Transactional(propagation=SUPPORTS, readOnly=true) int getToUserSharingEntriesCount(long toUserId, long classNameId)
toUserId
- the user's IDclassNameId
- the class name ID of the resources@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasShareableSharingPermission(long toUserId, long classNameId, long classPK, SharingEntryAction sharingEntryAction)
true
if the resource with the sharing entry action has
been shared with a user who can also share that resource. The class name
ID and class primary key identify the resource's type and instance,
respectively.toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the shared resourcesharingEntryAction
- the sharing entry actiontrue
if the resource with the sharing entry action has
been shared with a user who can also share that resource; false
otherwise@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasSharingPermission(long toUserId, long classNameId, long classPK, SharingEntryAction sharingEntryAction)
true
if the resource with the sharing entry action has
been shared with the user. The class name ID and class primary key
identify the resource's type and instance, respectively.toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the shared resourcesharingEntryAction
- the sharing entry actiontrue
if the resource with the sharing entry action has
been shared with the user; false
otherwise@Deprecated 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
updateSharingEntry(
long, long, Collection, boolean, Date, ServiceContext)
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 valueSharingEntry updateSharingEntry(long userId, 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
userId
- the primary key of the user updating the sharing entrysharingEntryId
- 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@Indexable(type=REINDEX) SharingEntry updateSharingEntry(SharingEntry sharingEntry)
Important: Inspect SharingEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
sharingEntry
- the sharing entry