Liferay 6.2-ce-ga5

com.liferay.portal.lar
Class ExportImportHelperImpl

java.lang.Object
  extended by com.liferay.portal.lar.ExportImportHelperImpl
All Implemented Interfaces:
ExportImportHelper

public class ExportImportHelperImpl
extends Object
implements ExportImportHelper


Field Summary
 
Fields inherited from interface com.liferay.portal.kernel.lar.ExportImportHelper
DATA_HANDLER_COMPANY_SECURE_URL, DATA_HANDLER_COMPANY_URL, DATA_HANDLER_GROUP_FRIENDLY_URL, DATA_HANDLER_PATH_CONTEXT, DATA_HANDLER_PRIVATE_GROUP_SERVLET_MAPPING, DATA_HANDLER_PRIVATE_LAYOUT_SET_SECURE_URL, DATA_HANDLER_PRIVATE_LAYOUT_SET_URL, DATA_HANDLER_PRIVATE_USER_SERVLET_MAPPING, DATA_HANDLER_PUBLIC_LAYOUT_SET_SECURE_URL, DATA_HANDLER_PUBLIC_LAYOUT_SET_URL, DATA_HANDLER_PUBLIC_SERVLET_MAPPING, TEMP_FOLDER_NAME
 
Constructor Summary
ExportImportHelperImpl()
           
 
Method Summary
protected  void deleteTimestampParameters(StringBuilder sb, int beginPos)
           
 Calendar getCalendar(PortletRequest portletRequest, String paramPrefix, boolean timeZoneSensitive)
           
 DateRange getDateRange(PortletRequest portletRequest, long groupId, boolean privateLayout, long plid, String portletId, String defaultRange)
           
protected  Map<String,String[]> getDLReferenceParameters(PortletDataContext portletDataContext, String content, int beginPos, int endPos)
           
 Layout getExportableLayout(ThemeDisplay themeDisplay)
           
 String getExportableRootPortletId(long companyId, String portletId)
           
protected  String getExportPortletPreferencesUuid(PortletDataContext portletDataContext, Portlet portlet, String className, Element rootElement, long primaryKeyLong)
           
protected  FileEntry getFileEntry(Map<String,String[]> map)
           
protected  Long getImportPortletPreferencesNewPrimaryKey(PortletDataContext portletDataContext, Class<?> clazz, long companyGroupId, Map<Long,Long> primaryKeys, String uuid)
           
 Map<Long,Boolean> getLayoutIdMap(PortletRequest portletRequest)
           
 long[] getLayoutIds(List<Layout> layouts)
           
 ZipWriter getLayoutSetZipWriter(long groupId)
           
 ManifestSummary getManifestSummary(long userId, long groupId, Map<String,String[]> parameterMap, File file)
           
 ManifestSummary getManifestSummary(long userId, long groupId, Map<String,String[]> parameterMap, FileEntry fileEntry)
           
 long getModelDeletionCount(PortletDataContext portletDataContext, StagedModelType stagedModelType)
           
 ZipWriter getPortletZipWriter(String portletId)
           
 String getSelectedLayoutsJSON(long groupId, boolean privateLayout, String selectedNodes)
           
 FileEntry getTempFileEntry(long groupId, long userId, String folderName)
           
protected  UserIdStrategy getUserIdStrategy(long userId, String userIdStrategy)
           
protected  ZipWriter getZipWriter(String fileName)
           
protected  boolean populateLayoutsJSON(JSONArray layoutsJSONArray, Layout layout, long[] selectedLayoutIds)
           
 void reindex(PortletDataContext portletDataContext, long userId)
           
 String replaceExportContentReferences(PortletDataContext portletDataContext, StagedModel entityStagedModel, Element entityElement, String content, boolean exportReferencedContent)
           
 String replaceExportDLReferences(PortletDataContext portletDataContext, StagedModel entityStagedModel, Element entityElement, String content, boolean exportReferencedContent)
           
protected  String replaceExportHostname(PortletDataContext portletDataContext, String url, StringBundler urlSB)
           
 String replaceExportLayoutReferences(PortletDataContext portletDataContext, String content, boolean exportReferencedContent)
           
 String replaceExportLinksToLayouts(PortletDataContext portletDataContext, StagedModel entityStagedModel, Element entityElement, String content, boolean exportReferencedContent)
           
 String replaceImportContentReferences(PortletDataContext portletDataContext, Element entityElement, String content, boolean importReferencedContent)
           
 String replaceImportDLReferences(PortletDataContext portletDataContext, Element entityElement, String content, boolean importReferencedContent)
           
 String replaceImportLayoutReferences(PortletDataContext portletDataContext, String content, boolean importReferencedContent)
           
 String replaceImportLinksToLayouts(PortletDataContext portletDataContext, String content, boolean importReferencedContent)
           
 void updateExportPortletPreferencesClassPKs(PortletDataContext portletDataContext, Portlet portlet, PortletPreferences portletPreferences, String key, String className, Element rootElement)
           
 void updateImportPortletPreferencesClassPKs(PortletDataContext portletDataContext, PortletPreferences portletPreferences, String key, Class<?> clazz, long companyGroupId)
           
protected  MissingReference validateMissingReference(PortletDataContext portletDataContext, Element element)
           
 MissingReferences validateMissingReferences(long userId, long groupId, Map<String,String[]> parameterMap, File file)
           
 void writeManifestSummary(Document document, ManifestSummary manifestSummary)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportImportHelperImpl

public ExportImportHelperImpl()
Method Detail

reindex

public void reindex(PortletDataContext portletDataContext,
                    long userId)
             throws PortalException,
                    SystemException
Specified by:
reindex in interface ExportImportHelper
Throws:
PortalException
SystemException

getCalendar

public Calendar getCalendar(PortletRequest portletRequest,
                            String paramPrefix,
                            boolean timeZoneSensitive)
Specified by:
getCalendar in interface ExportImportHelper

getDateRange

public DateRange getDateRange(PortletRequest portletRequest,
                              long groupId,
                              boolean privateLayout,
                              long plid,
                              String portletId,
                              String defaultRange)
                       throws Exception
Specified by:
getDateRange in interface ExportImportHelper
Throws:
Exception

getExportableLayout

public Layout getExportableLayout(ThemeDisplay themeDisplay)
                           throws PortalException,
                                  SystemException
Specified by:
getExportableLayout in interface ExportImportHelper
Throws:
PortalException
SystemException

getExportableRootPortletId

public String getExportableRootPortletId(long companyId,
                                         String portletId)
                                  throws Exception
Specified by:
getExportableRootPortletId in interface ExportImportHelper
Throws:
Exception

getLayoutIdMap

public Map<Long,Boolean> getLayoutIdMap(PortletRequest portletRequest)
                                 throws Exception
Specified by:
getLayoutIdMap in interface ExportImportHelper
Throws:
Exception

getLayoutIds

public long[] getLayoutIds(List<Layout> layouts)
Specified by:
getLayoutIds in interface ExportImportHelper

getLayoutSetZipWriter

public ZipWriter getLayoutSetZipWriter(long groupId)
Specified by:
getLayoutSetZipWriter in interface ExportImportHelper

getManifestSummary

public ManifestSummary getManifestSummary(long userId,
                                          long groupId,
                                          Map<String,String[]> parameterMap,
                                          File file)
                                   throws Exception
Specified by:
getManifestSummary in interface ExportImportHelper
Throws:
Exception

getManifestSummary

public ManifestSummary getManifestSummary(long userId,
                                          long groupId,
                                          Map<String,String[]> parameterMap,
                                          FileEntry fileEntry)
                                   throws Exception
Specified by:
getManifestSummary in interface ExportImportHelper
Throws:
Exception

getModelDeletionCount

public long getModelDeletionCount(PortletDataContext portletDataContext,
                                  StagedModelType stagedModelType)
                           throws PortalException,
                                  SystemException
Specified by:
getModelDeletionCount in interface ExportImportHelper
Throws:
PortalException
SystemException

getPortletZipWriter

public ZipWriter getPortletZipWriter(String portletId)
Specified by:
getPortletZipWriter in interface ExportImportHelper

getSelectedLayoutsJSON

public String getSelectedLayoutsJSON(long groupId,
                                     boolean privateLayout,
                                     String selectedNodes)
                              throws SystemException
Specified by:
getSelectedLayoutsJSON in interface ExportImportHelper
Throws:
SystemException

getTempFileEntry

public FileEntry getTempFileEntry(long groupId,
                                  long userId,
                                  String folderName)
                           throws PortalException,
                                  SystemException
Specified by:
getTempFileEntry in interface ExportImportHelper
Throws:
PortalException
SystemException

replaceExportContentReferences

public String replaceExportContentReferences(PortletDataContext portletDataContext,
                                             StagedModel entityStagedModel,
                                             Element entityElement,
                                             String content,
                                             boolean exportReferencedContent)
                                      throws Exception
Specified by:
replaceExportContentReferences in interface ExportImportHelper
Throws:
Exception

replaceExportDLReferences

public String replaceExportDLReferences(PortletDataContext portletDataContext,
                                        StagedModel entityStagedModel,
                                        Element entityElement,
                                        String content,
                                        boolean exportReferencedContent)
                                 throws Exception
Specified by:
replaceExportDLReferences in interface ExportImportHelper
Throws:
Exception

replaceExportLayoutReferences

public String replaceExportLayoutReferences(PortletDataContext portletDataContext,
                                            String content,
                                            boolean exportReferencedContent)
                                     throws Exception
Specified by:
replaceExportLayoutReferences in interface ExportImportHelper
Throws:
Exception

replaceExportLinksToLayouts

public String replaceExportLinksToLayouts(PortletDataContext portletDataContext,
                                          StagedModel entityStagedModel,
                                          Element entityElement,
                                          String content,
                                          boolean exportReferencedContent)
                                   throws Exception
Specified by:
replaceExportLinksToLayouts in interface ExportImportHelper
Throws:
Exception

replaceImportContentReferences

public String replaceImportContentReferences(PortletDataContext portletDataContext,
                                             Element entityElement,
                                             String content,
                                             boolean importReferencedContent)
                                      throws Exception
Specified by:
replaceImportContentReferences in interface ExportImportHelper
Throws:
Exception

replaceImportDLReferences

public String replaceImportDLReferences(PortletDataContext portletDataContext,
                                        Element entityElement,
                                        String content,
                                        boolean importReferencedContent)
                                 throws Exception
Specified by:
replaceImportDLReferences in interface ExportImportHelper
Throws:
Exception

replaceImportLayoutReferences

public String replaceImportLayoutReferences(PortletDataContext portletDataContext,
                                            String content,
                                            boolean importReferencedContent)
                                     throws Exception
Specified by:
replaceImportLayoutReferences in interface ExportImportHelper
Throws:
Exception

replaceImportLinksToLayouts

public String replaceImportLinksToLayouts(PortletDataContext portletDataContext,
                                          String content,
                                          boolean importReferencedContent)
                                   throws Exception
Specified by:
replaceImportLinksToLayouts in interface ExportImportHelper
Throws:
Exception

updateExportPortletPreferencesClassPKs

public void updateExportPortletPreferencesClassPKs(PortletDataContext portletDataContext,
                                                   Portlet portlet,
                                                   PortletPreferences portletPreferences,
                                                   String key,
                                                   String className,
                                                   Element rootElement)
                                            throws Exception
Specified by:
updateExportPortletPreferencesClassPKs in interface ExportImportHelper
Throws:
Exception

updateImportPortletPreferencesClassPKs

public void updateImportPortletPreferencesClassPKs(PortletDataContext portletDataContext,
                                                   PortletPreferences portletPreferences,
                                                   String key,
                                                   Class<?> clazz,
                                                   long companyGroupId)
                                            throws Exception
Specified by:
updateImportPortletPreferencesClassPKs in interface ExportImportHelper
Throws:
Exception

validateMissingReferences

public MissingReferences validateMissingReferences(long userId,
                                                   long groupId,
                                                   Map<String,String[]> parameterMap,
                                                   File file)
                                            throws Exception
Specified by:
validateMissingReferences in interface ExportImportHelper
Throws:
Exception

writeManifestSummary

public void writeManifestSummary(Document document,
                                 ManifestSummary manifestSummary)
Specified by:
writeManifestSummary in interface ExportImportHelper

deleteTimestampParameters

protected void deleteTimestampParameters(StringBuilder sb,
                                         int beginPos)

getDLReferenceParameters

protected Map<String,String[]> getDLReferenceParameters(PortletDataContext portletDataContext,
                                                        String content,
                                                        int beginPos,
                                                        int endPos)

getExportPortletPreferencesUuid

protected String getExportPortletPreferencesUuid(PortletDataContext portletDataContext,
                                                 Portlet portlet,
                                                 String className,
                                                 Element rootElement,
                                                 long primaryKeyLong)
                                          throws Exception
Throws:
Exception

getFileEntry

protected FileEntry getFileEntry(Map<String,String[]> map)

getImportPortletPreferencesNewPrimaryKey

protected Long getImportPortletPreferencesNewPrimaryKey(PortletDataContext portletDataContext,
                                                        Class<?> clazz,
                                                        long companyGroupId,
                                                        Map<Long,Long> primaryKeys,
                                                        String uuid)
                                                 throws Exception
Throws:
Exception

getUserIdStrategy

protected UserIdStrategy getUserIdStrategy(long userId,
                                           String userIdStrategy)
                                    throws Exception
Throws:
Exception

getZipWriter

protected ZipWriter getZipWriter(String fileName)

populateLayoutsJSON

protected boolean populateLayoutsJSON(JSONArray layoutsJSONArray,
                                      Layout layout,
                                      long[] selectedLayoutIds)
                               throws SystemException
Throws:
SystemException

replaceExportHostname

protected String replaceExportHostname(PortletDataContext portletDataContext,
                                       String url,
                                       StringBundler urlSB)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

validateMissingReference

protected MissingReference validateMissingReference(PortletDataContext portletDataContext,
                                                    Element element)

Liferay 6.2-ce-ga5