T - the staged model type on which this staged model repository
operatespublic interface StagedModelRepository<T extends com.liferay.portal.kernel.model.StagedModel>
The staged model parameter can be either
| Modifier and Type | Method and Description |
|---|---|
T |
addStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
T stagedModel)
Persists a new staged model.
|
void |
deleteStagedModel(java.lang.String uuid,
long groupId,
java.lang.String className,
java.lang.String extraData) |
void |
deleteStagedModel(T stagedModel) |
void |
deleteStagedModels(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
Deletes all the staged models this repository handles.
|
default T |
fetchMissingReference(java.lang.String uuid,
long groupId)
Fetches the model being handled by this repository as a missing
reference.
|
T |
fetchStagedModelByUuidAndGroupId(java.lang.String uuid,
long groupId) |
java.util.List<T> |
fetchStagedModelsByUuidAndCompanyId(java.lang.String uuid,
long companyId) |
com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery |
getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
Returns a dynamic query that queries the entities from the database based
on the parameters in the portlet data context.
|
default T |
getStagedModel(long classPK) |
default void |
restoreStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
T stagedModel)
Restores the staged model from the portal instance's trash.
|
T |
saveStagedModel(T stagedModel) |
T |
updateStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
T stagedModel)
Returns the updated staged model.
|
T addStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, T stagedModel) throws com.liferay.portal.kernel.exception.PortalException
_bookmarksEntryLocalService.addEntry(userId, bookmarksEntry.getGroupId(),
bookmarksEntry.getFolderId(), bookmarksEntry.getName(),
bookmarksEntry.getUrl(), bookmarksEntry.getDescription(),
serviceContext);
portletDataContext - the portlet data contextstagedModel - the old staged model being copiedcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredvoid deleteStagedModel(java.lang.String uuid,
long groupId,
java.lang.String className,
java.lang.String extraData)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionvoid deleteStagedModel(T stagedModel) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionvoid deleteStagedModels(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
throws com.liferay.portal.kernel.exception.PortalException
portletDataContext - the portlet data contextcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurreddefault T fetchMissingReference(java.lang.String uuid, long groupId)
StagedModelRepositoryHelper.fetchMissingReference(String, long,
StagedModelRepository) as the implementation. This method does not just
fetch a staged model matching the UUID and group ID; it also has a set of
rules defining where to find the missing reference. It searches sites in
the following order:
uuid - the universal unique IDgroupId - the importing group's IDnull if it is not
foundT fetchStagedModelByUuidAndGroupId(java.lang.String uuid, long groupId)
java.util.List<T> fetchStagedModelsByUuidAndCompanyId(java.lang.String uuid, long companyId)
com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
getExportActionableDynamicQuery(PortletDataContext) as the
implementation.
The ActionableDynamicQuery.getPerformActionMethod()
is an API call (uses StagedModelDataHandlerUtil.exportStagedModel(
PortletDataContext, StagedModel)) to export each entity that is
returned.
portletDataContext - the portlet data contextdefault T getStagedModel(long classPK) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptiondefault void restoreStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
T stagedModel)
throws com.liferay.exportimport.kernel.lar.PortletDataException
portletDataContext - the portlet data contextstagedModel - the old staged model restored from the trashcom.liferay.exportimport.kernel.lar.PortletDataException - if a portlet data exception occurredT saveStagedModel(T stagedModel) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionT updateStagedModel(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, T stagedModel) throws com.liferay.portal.kernel.exception.PortalException
portletDataContext - the portlet data contextstagedModel - the new staged model currently being called from the
portalcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurred