001
014
015 package com.liferay.portlet.exportimport.lar;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.xml.Element;
019 import com.liferay.portal.model.StagedModel;
020
021 import java.util.List;
022 import java.util.Map;
023
024
029 public interface StagedModelDataHandler<T extends StagedModel> {
030
031 public void deleteStagedModel(
032 String uuid, long groupId, String className, String extraData)
033 throws PortalException;
034
035 public void deleteStagedModel(T stagedModel) throws PortalException;
036
037 public void exportStagedModel(
038 PortletDataContext portletDataContext, T stagedModel)
039 throws PortletDataException;
040
041 public T fetchMissingReference(String uuid, long groupId);
042
043 public T fetchStagedModelByUuidAndGroupId(String uuid, long groupId);
044
045 public List<T> fetchStagedModelsByUuidAndCompanyId(
046 String uuid, long companyId);
047
048 public String[] getClassNames();
049
050 public String getDisplayName(T stagedModel);
051
052 public int[] getExportableStatuses();
053
054 public Map<String, String> getReferenceAttributes(
055 PortletDataContext portletDataContext, T stagedModel);
056
057
061 @Deprecated
062 public void importCompanyStagedModel(
063 PortletDataContext portletDataContext, Element element)
064 throws PortletDataException;
065
066
071 @Deprecated
072 public void importCompanyStagedModel(
073 PortletDataContext portletDataContext, String uuid, long classPK)
074 throws PortletDataException;
075
076 public void importMissingReference(
077 PortletDataContext portletDataContext, Element referenceElement)
078 throws PortletDataException;
079
080 public void importMissingReference(
081 PortletDataContext portletDataContext, String uuid, long groupId,
082 long classPK)
083 throws PortletDataException;
084
085 public void importStagedModel(
086 PortletDataContext portletDataContext, T stagedModel)
087 throws PortletDataException;
088
089 public void restoreStagedModel(
090 PortletDataContext portletDataContext, T stagedModel)
091 throws PortletDataException;
092
093 public boolean validateReference(
094 PortletDataContext portletDataContext, Element referenceElement);
095
096 }