Class SharingEntryLocalServiceWrapper
- All Implemented Interfaces:
com.liferay.portal.kernel.service.BaseLocalService
,com.liferay.portal.kernel.service.PersistedModelLocalService
,com.liferay.portal.kernel.service.ServiceWrapper<SharingEntryLocalService>
,SharingEntryLocalService
SharingEntryLocalService
.- See Also:
- Generated:
-
Constructor Summary
ConstructorsConstructorDescriptionSharingEntryLocalServiceWrapper
(SharingEntryLocalService sharingEntryLocalService) -
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateSharingEntry
(String externalReferenceCode, long userId, 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
(SharingEntry sharingEntry) Adds the sharing entry to the database.addSharingEntry
(String externalReferenceCode, long userId, 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.com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) createSharingEntry
(long sharingEntryId) Creates a new sharing entry with the primary key.void
deleteCompanySharingEntries
(long companyId, long classNameId) void
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.deleteSharingEntry
(long sharingEntryId) Deletes the sharing entry with the primary key from the database.deleteSharingEntry
(long toUserId, long classNameId, long classPK) Deletes the sharing entry for the resource and users.deleteSharingEntry
(SharingEntry sharingEntry) Deletes the sharing entry from the database.deleteSharingEntryByExternalReferenceCode
(String externalReferenceCode, long groupId) 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
<T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> 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> 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.fetchSharingEntry
(long sharingEntryId) fetchSharingEntry
(long toUserId, long classNameId, long classPK) Returns the sharing entry for the resource shared with the user ornull
if there's none.fetchSharingEntryByExternalReferenceCode
(String externalReferenceCode, long groupId) fetchSharingEntryByUuidAndGroupId
(String uuid, long groupId) Returns the sharing entry matching the UUID and group.com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
com.liferay.portal.kernel.service.persistence.BasePersistence<?>
int
getCompanySharingEntriesCount
(long companyId, long classNameId) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
getExportActionableDynamicQuery
(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) 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.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
Returns the OSGi service identifier.com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) getSharingEntries
(int start, int end) Returns a range of all the sharing entries.getSharingEntries
(long classNameId, long classPK) Returns the resource's sharing entries.getSharingEntries
(long classNameId, long classPK, int start, int end) Returns the resource's sharing entries.getSharingEntriesByUuidAndCompanyId
(String uuid, long companyId) Returns all the sharing entries matching the UUID and company.getSharingEntriesByUuidAndCompanyId
(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
Returns the number of sharing entries.int
getSharingEntriesCount
(long classNameId, long classPK) Returns the resource's sharing entries count.getSharingEntry
(long sharingEntryId) Returns the sharing entry with the primary key.getSharingEntry
(long toUserId, long classNameId, long classPK) Returns the sharing entry for the resource shared with the user.getSharingEntryByExternalReferenceCode
(String externalReferenceCode, long groupId) getSharingEntryByUuidAndGroupId
(String uuid, long groupId) Returns the sharing entry matching the UUID and group.getToUserSharingEntries
(long toUserId) Returns the list of sharing entries for resources shared with the user.getToUserSharingEntries
(long toUserId, int start, int end) Returns the range of sharing entries for resources shared with the user.getToUserSharingEntries
(long toUserId, long classNameId) Returns the list of sharing entries for the type of resource shared with the user.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) Returnstrue
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) Returnstrue
if the resource with the sharing entry action has been shared with the user.void
setWrappedService
(SharingEntryLocalService sharingEntryLocalService) updateSharingEntry
(long userId, long sharingEntryId, Collection<SharingEntryAction> sharingEntryActions, boolean shareable, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the sharing entry in the database.updateSharingEntry
(long sharingEntryId, Collection<SharingEntryAction> sharingEntryActions, boolean shareable, Date expirationDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) Deprecated.updateSharingEntry
(SharingEntry sharingEntry) Updates the sharing entry in the database or adds it if it does not yet exist.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Constructor Details
-
SharingEntryLocalServiceWrapper
public SharingEntryLocalServiceWrapper() -
SharingEntryLocalServiceWrapper
-
-
Method Details
-
addOrUpdateSharingEntry
public SharingEntry addOrUpdateSharingEntry(String externalReferenceCode, long userId, 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 interfaceSharingEntryLocalService
- Parameters:
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 bytoUserId
can 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 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 valuecom.liferay.portal.kernel.exception.PortalException
-
addSharingEntry
Adds the sharing entry to the database. Also notifies the appropriate model listeners.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.
- Specified by:
addSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntry
- the sharing entry- Returns:
- the sharing entry that was added
-
addSharingEntry
public SharingEntry addSharingEntry(String externalReferenceCode, long userId, 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 interfaceSharingEntryLocalService
- Parameters:
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 bytoUserId
can share the resourcesharingEntryActions
- the sharing entry actionsexpirationDate
- the date when the sharing entry expiresserviceContext
- the service context- Returns:
- the sharing entry
- Throws:
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 containSharingEntryAction#VIEW
, or contain anull
value), if the to/from user IDs are the same, or if the expiration date is a past valuecom.liferay.portal.kernel.exception.PortalException
-
createPersistedModel
public com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
createPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Specified by:
createPersistedModel
in interfaceSharingEntryLocalService
- Throws:
PortalException
com.liferay.portal.kernel.exception.PortalException
-
createSharingEntry
Creates a new sharing entry with the primary key. Does not add the sharing entry to the database.- Specified by:
createSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntryId
- the primary key for the new sharing entry- Returns:
- the new sharing entry
-
deleteCompanySharingEntries
public void deleteCompanySharingEntries(long companyId, long classNameId) - Specified by:
deleteCompanySharingEntries
in interfaceSharingEntryLocalService
-
deleteExpiredEntries
public void deleteExpiredEntries()Deletes the sharing entries whose expiration date is before the current date.- Specified by:
deleteExpiredEntries
in interfaceSharingEntryLocalService
-
deleteGroupSharingEntries
public void deleteGroupSharingEntries(long groupId) Deletes the group's sharing entries.- Specified by:
deleteGroupSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
groupId
- the group's ID
-
deletePersistedModel
public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deletePersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Specified by:
deletePersistedModel
in interfaceSharingEntryLocalService
- Throws:
PortalException
com.liferay.portal.kernel.exception.PortalException
-
deleteSharingEntries
public void deleteSharingEntries(long classNameId, long classPK) Deletes the resource's sharing entries. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
deleteSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource
-
deleteSharingEntry
public SharingEntry deleteSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException Deletes the sharing entry with the primary key from the database. Also notifies the appropriate model listeners.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.
- Specified by:
deleteSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntryId
- the primary key of the sharing entry- Returns:
- the sharing entry that was removed
- Throws:
PortalException
- if a sharing entry with the primary key could not be foundcom.liferay.portal.kernel.exception.PortalException
-
deleteSharingEntry
public SharingEntry deleteSharingEntry(long toUserId, long classNameId, long classPK) throws com.liferay.portal.kernel.exception.PortalException Deletes the sharing entry for the resource and users. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
deleteSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the ID of the user the resource is shared withclassNameId
- the resource's class name IDclassPK
- the class primary key of the resource- Returns:
- the deleted sharing entry
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteSharingEntry
Deletes the sharing entry from the database. Also notifies the appropriate model listeners.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.
- Specified by:
deleteSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntry
- the sharing entry- Returns:
- the sharing entry that was removed
-
deleteSharingEntryByExternalReferenceCode
public SharingEntry deleteSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deleteSharingEntryByExternalReferenceCode
in interfaceSharingEntryLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteToUserSharingEntries
public void deleteToUserSharingEntries(long toUserId) Deletes the sharing entries for resources shared with the user.- Specified by:
deleteToUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's ID
-
dslQuery
public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Specified by:
dslQuery
in interfaceSharingEntryLocalService
-
dslQueryCount
public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Specified by:
dslQueryCount
in interfaceSharingEntryLocalService
-
dynamicQuery
public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()- Specified by:
dynamicQuery
in interfaceSharingEntryLocalService
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Specified by:
dynamicQuery
in interfaceSharingEntryLocalService
- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
public <T> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.sharing.model.impl.SharingEntryModelImpl
.- Specified by:
dynamicQuery
in interfaceSharingEntryLocalService
- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public <T> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.sharing.model.impl.SharingEntryModelImpl
.- Specified by:
dynamicQuery
in interfaceSharingEntryLocalService
- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
public long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCount
in interfaceSharingEntryLocalService
- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
public 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.- Specified by:
dynamicQueryCount
in interfaceSharingEntryLocalService
- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchSharingEntry
- Specified by:
fetchSharingEntry
in interfaceSharingEntryLocalService
-
fetchSharingEntry
Returns the sharing entry for the resource shared with the user ornull
if there's none. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
fetchSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the resource- Returns:
- the sharing entry or
null
if none
-
fetchSharingEntryByExternalReferenceCode
public SharingEntry fetchSharingEntryByExternalReferenceCode(String externalReferenceCode, long groupId) - Specified by:
fetchSharingEntryByExternalReferenceCode
in interfaceSharingEntryLocalService
-
fetchSharingEntryByUuidAndGroupId
Returns the sharing entry matching the UUID and group.- Specified by:
fetchSharingEntryByUuidAndGroupId
in interfaceSharingEntryLocalService
- Parameters:
uuid
- the sharing entry's UUIDgroupId
- the primary key of the group- Returns:
- the matching sharing entry, or
null
if a matching sharing entry could not be found
-
getActionableDynamicQuery
public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()- Specified by:
getActionableDynamicQuery
in interfaceSharingEntryLocalService
-
getCompanySharingEntriesCount
public int getCompanySharingEntriesCount(long companyId, long classNameId) - Specified by:
getCompanySharingEntriesCount
in interfaceSharingEntryLocalService
-
getExportActionableDynamicQuery
public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) - Specified by:
getExportActionableDynamicQuery
in interfaceSharingEntryLocalService
-
getFromUserSharingEntries
public 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. The class name ID identifies the resource type.- Specified by:
getFromUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
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- Returns:
- the ordered range of sharing entries
-
getFromUserSharingEntriesCount
public int getFromUserSharingEntriesCount(long fromUserId, long classNameId) Returns the number of sharing entries for the type of resource shared by the user. The class name ID identifies the resource type.- Specified by:
getFromUserSharingEntriesCount
in interfaceSharingEntryLocalService
- Parameters:
fromUserId
- the user's IDclassNameId
- the class name ID of the resources- Returns:
- the number of sharing entries
-
getGroupSharingEntries
Returns the the group's sharing entries.- Specified by:
getGroupSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
groupId
- the primary key of the group- Returns:
- the sharing entries
-
getGroupSharingEntriesCount
public int getGroupSharingEntriesCount(long groupId) Returns the the group's sharing entries count.- Specified by:
getGroupSharingEntriesCount
in interfaceSharingEntryLocalService
- Parameters:
groupId
- the primary key of the group- Returns:
- the sharing entries count
-
getIndexableActionableDynamicQuery
public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()- Specified by:
getIndexableActionableDynamicQuery
in interfaceSharingEntryLocalService
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifier
in interfaceSharingEntryLocalService
- Returns:
- the OSGi service identifier
-
getPersistedModel
public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getPersistedModel
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
- Specified by:
getPersistedModel
in interfaceSharingEntryLocalService
- Throws:
PortalException
com.liferay.portal.kernel.exception.PortalException
-
getSharingEntries
Returns a range of all the sharing entries.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.sharing.model.impl.SharingEntryModelImpl
.- Specified by:
getSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
start
- the lower bound of the range of sharing entriesend
- the upper bound of the range of sharing entries (not inclusive)- Returns:
- the range of sharing entries
-
getSharingEntries
Returns the resource's sharing entries. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
getSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource- Returns:
- the sharing entries
-
getSharingEntries
Returns the resource's sharing entries. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
getSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
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)- Returns:
- the sharing entries
-
getSharingEntriesByUuidAndCompanyId
Returns all the sharing entries matching the UUID and company.- Specified by:
getSharingEntriesByUuidAndCompanyId
in interfaceSharingEntryLocalService
- Parameters:
uuid
- the UUID of the sharing entriescompanyId
- the primary key of the company- Returns:
- the matching sharing entries, or an empty list if no matches were found
-
getSharingEntriesByUuidAndCompanyId
public List<SharingEntry> getSharingEntriesByUuidAndCompanyId(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.- Specified by:
getSharingEntriesByUuidAndCompanyId
in interfaceSharingEntryLocalService
- Parameters:
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 (optionallynull
)- Returns:
- the range of matching sharing entries, or an empty list if no matches were found
-
getSharingEntriesCount
public int getSharingEntriesCount()Returns the number of sharing entries.- Specified by:
getSharingEntriesCount
in interfaceSharingEntryLocalService
- Returns:
- the number of sharing entries
-
getSharingEntriesCount
public int getSharingEntriesCount(long classNameId, long classPK) Returns the resource's sharing entries count. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
getSharingEntriesCount
in interfaceSharingEntryLocalService
- Parameters:
classNameId
- the resource's class name IDclassPK
- the class primary key of the resource- Returns:
- the sharing entries count
-
getSharingEntry
public SharingEntry getSharingEntry(long sharingEntryId) throws com.liferay.portal.kernel.exception.PortalException Returns the sharing entry with the primary key.- Specified by:
getSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntryId
- the primary key of the sharing entry- Returns:
- the sharing entry
- Throws:
PortalException
- if a sharing entry with the primary key could not be foundcom.liferay.portal.kernel.exception.PortalException
-
getSharingEntry
public SharingEntry getSharingEntry(long toUserId, long classNameId, long classPK) throws com.liferay.portal.kernel.exception.PortalException Returns the sharing entry for the resource shared with the user. The class name ID and class primary key identify the resource's type and instance, respectively.- Specified by:
getSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the resource- Returns:
- the sharing entry
- 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 interfaceSharingEntryLocalService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSharingEntryByUuidAndGroupId
public SharingEntry getSharingEntryByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException Returns the sharing entry matching the UUID and group.- Specified by:
getSharingEntryByUuidAndGroupId
in interfaceSharingEntryLocalService
- Parameters:
uuid
- the sharing entry's UUIDgroupId
- the primary key of the group- Returns:
- the matching sharing entry
- Throws:
PortalException
- if a matching sharing entry could not be foundcom.liferay.portal.kernel.exception.PortalException
-
getToUserSharingEntries
Returns the list of sharing entries for resources shared with the user.- Specified by:
getToUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's ID- Returns:
- the list of sharing entries
-
getToUserSharingEntries
Returns the range of sharing entries for resources shared with the user.- Specified by:
getToUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDstart
- the range's lower boundend
- the range's upper bound (not inclusive)- Returns:
- the range of sharing entries
-
getToUserSharingEntries
Returns the list of sharing entries for the type of resource shared with the user. The class name ID identifies the resource type.- Specified by:
getToUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDclassNameId
- the class name ID of the resources- Returns:
- the list of sharing entries
-
getToUserSharingEntries
public 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. The class name ID identifies the resource type.- Specified by:
getToUserSharingEntries
in interfaceSharingEntryLocalService
- Parameters:
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- Returns:
- the ordered range of sharing entries
-
getToUserSharingEntriesCount
public int getToUserSharingEntriesCount(long toUserId) Returns the number of sharing entries for resources shared with the user.- Specified by:
getToUserSharingEntriesCount
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's ID- Returns:
- the number of sharing entries
-
getToUserSharingEntriesCount
public int getToUserSharingEntriesCount(long toUserId, long classNameId) Returns the number of sharing entries for the type of resource shared with the user. The class name ID identifies the resource type.- Specified by:
getToUserSharingEntriesCount
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDclassNameId
- the class name ID of the resources- Returns:
- the number of sharing entries
-
hasSharingPermission
public boolean hasSharingPermission(long toUserId, long classNameId, long classPK, SharingEntryAction sharingEntryAction) Returnstrue
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.- Specified by:
hasSharingPermission
in interfaceSharingEntryLocalService
- Parameters:
toUserId
- the user's IDclassNameId
- the resource's class name IDclassPK
- the class primary key of the shared resourcesharingEntryAction
- the sharing entry action- Returns:
true
if the resource with the sharing entry action has been shared with the user;false
otherwise
-
updateSharingEntry
@Deprecated 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 Deprecated.As of Mueller (7.2.x), replaced bySharingEntryLocalService.updateSharingEntry(long, long, Collection, boolean, Date, ServiceContext)
Updates the sharing entry in the database.- Specified by:
updateSharingEntry
in interfaceSharingEntryLocalService
- 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 anull
value), or if the expiration date is a past valuecom.liferay.portal.kernel.exception.PortalException
-
updateSharingEntry
public SharingEntry updateSharingEntry(long userId, 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 interfaceSharingEntryLocalService
- Parameters:
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 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 anull
value), or if the expiration date is a past valuecom.liferay.portal.kernel.exception.PortalException
-
updateSharingEntry
Updates the sharing entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.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.
- Specified by:
updateSharingEntry
in interfaceSharingEntryLocalService
- Parameters:
sharingEntry
- the sharing entry- Returns:
- the sharing entry that was updated
-
getBasePersistence
public com.liferay.portal.kernel.service.persistence.BasePersistence<?> getBasePersistence()- Specified by:
getBasePersistence
in interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
getWrappedService
- Specified by:
getWrappedService
in interfacecom.liferay.portal.kernel.service.ServiceWrapper<SharingEntryLocalService>
-
setWrappedService
- Specified by:
setWrappedService
in interfacecom.liferay.portal.kernel.service.ServiceWrapper<SharingEntryLocalService>
-
SharingEntryLocalService.updateSharingEntry(long, long, Collection, boolean, Date, ServiceContext)