com.liferay.portal.lar
Class PortletDataContextImpl
java.lang.Object
com.liferay.portal.lar.PortletDataContextImpl
- All Implemented Interfaces:
- com.liferay.portal.lar.PortletDataContext, java.io.Serializable
public class PortletDataContextImpl
- extends java.lang.Object
- implements com.liferay.portal.lar.PortletDataContext
View Source
Holds context information that is used during exporting and importing portlet
data.
- Author:
- Brian Wing Shun Chan, Raymond Augé, Bruno Farache, Alex Chow
- See Also:
- Serialized Form
Fields inherited from interface com.liferay.portal.lar.PortletDataContext |
ROOT_PATH_GROUPS, ROOT_PATH_LAYOUTS, ROOT_PATH_PORTLETS |
Constructor Summary |
PortletDataContextImpl(long companyId,
long groupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Set<java.lang.String> primaryKeys,
java.util.Date startDate,
java.util.Date endDate,
com.liferay.portal.kernel.zip.ZipWriter zipWriter)
|
PortletDataContextImpl(long companyId,
long groupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Set<java.lang.String> primaryKeys,
com.liferay.portal.lar.UserIdStrategy userIdStrategy,
com.liferay.portal.kernel.zip.ZipReader zipReader)
|
Method Summary |
void |
addComments(java.lang.Class<?> classObj,
long classPK)
|
void |
addComments(java.lang.String className,
long classPK,
java.util.List<com.liferay.portlet.messageboards.model.MBMessage> messages)
|
boolean |
addPrimaryKey(java.lang.Class<?> classObj,
java.lang.String primaryKey)
|
void |
addRatingsEntries(java.lang.Class<?> classObj,
long classPK)
|
void |
addRatingsEntries(java.lang.String className,
long classPK,
java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries)
|
void |
addTagsCategories(java.lang.Class<?> classObj,
long classPK)
|
void |
addTagsCategories(java.lang.String className,
long classPK,
java.lang.String[] tagsCategories)
|
void |
addTagsEntries(java.lang.Class<?> classObj,
long classPK)
|
void |
addTagsEntries(java.lang.String className,
long classPK,
java.lang.String[] tagsEntries)
|
void |
addZipEntry(java.lang.String path,
byte[] bytes)
|
void |
addZipEntry(java.lang.String path,
java.io.InputStream is)
|
void |
addZipEntry(java.lang.String path,
java.lang.Object object)
|
void |
addZipEntry(java.lang.String path,
java.lang.String s)
|
void |
addZipEntry(java.lang.String path,
java.lang.StringBuilder sb)
|
java.lang.Object |
fromXML(byte[] bytes)
|
java.lang.Object |
fromXML(java.lang.String xml)
|
boolean |
getBooleanParameter(java.lang.String namespace,
java.lang.String name)
|
java.lang.ClassLoader |
getClassLoader()
|
java.util.Map<java.lang.String,java.util.List<com.liferay.portlet.messageboards.model.MBMessage>> |
getComments()
|
long |
getCompanyId()
|
java.lang.String |
getDataStrategy()
|
java.util.Date |
getEndDate()
|
long |
getGroupId()
|
java.lang.String |
getLayoutPath(long layoutId)
|
java.util.Map<?,?> |
getNewPrimaryKeysMap(java.lang.Class<?> classObj)
|
long |
getOldPlid()
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
|
long |
getPlid()
|
java.lang.String |
getPortletPath(java.lang.String portletId)
|
java.util.Set<java.lang.String> |
getPrimaryKeys()
|
protected java.lang.String |
getPrimaryKeyString(java.lang.Class<?> classObj,
long classPK)
|
protected java.lang.String |
getPrimaryKeyString(java.lang.Class<?> classObj,
java.lang.String primaryKey)
|
protected java.lang.String |
getPrimaryKeyString(java.lang.String className,
long classPK)
|
protected java.lang.String |
getPrimaryKeyString(java.lang.String className,
java.lang.String primaryKey)
|
java.util.Map<java.lang.String,java.util.List<com.liferay.portlet.ratings.model.RatingsEntry>> |
getRatingsEntries()
|
java.lang.String |
getRootPath()
|
long |
getScopeGroupId()
|
long |
getScopeLayoutId()
|
long |
getSourceGroupId()
|
java.lang.String |
getSourceLayoutPath(long layoutId)
|
java.lang.String |
getSourcePortletPath(java.lang.String portletId)
|
java.lang.String |
getSourceRootPath()
|
java.util.Date |
getStartDate()
|
java.util.Map<java.lang.String,java.lang.String[]> |
getTagsCategories()
|
java.lang.String[] |
getTagsCategories(java.lang.Class<?> classObj,
long classPK)
|
java.util.Map<java.lang.String,java.lang.String[]> |
getTagsEntries()
|
java.lang.String[] |
getTagsEntries(java.lang.Class<?> classObj,
long classPK)
|
java.lang.String[] |
getTagsEntries(java.lang.String className,
long classPK)
|
long |
getUserId(java.lang.String userUuid)
|
com.liferay.portal.lar.UserIdStrategy |
getUserIdStrategy()
|
java.util.Map<java.lang.String,byte[]> |
getZipEntries()
|
byte[] |
getZipEntryAsByteArray(java.lang.String path)
|
java.lang.Object |
getZipEntryAsObject(java.lang.String path)
|
java.lang.String |
getZipEntryAsString(java.lang.String path)
|
java.util.Map<java.lang.String,java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,byte[]>>> |
getZipFolderEntries()
|
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,byte[]>> |
getZipFolderEntries(java.lang.String path)
|
com.liferay.portal.kernel.zip.ZipReader |
getZipReader()
|
com.liferay.portal.kernel.zip.ZipWriter |
getZipWriter()
|
boolean |
hasDateRange()
|
boolean |
hasNotUniquePerLayout(java.lang.String dataKey)
|
boolean |
hasPrimaryKey(java.lang.Class<?> classObj,
java.lang.String primaryKey)
|
void |
importComments(java.lang.Class<?> classObj,
long classPK,
long newClassPK,
long groupId)
|
void |
importRatingsEntries(java.lang.Class<?> classObj,
long classPK,
long newClassPK)
|
protected void |
initXStream()
|
boolean |
isPathNotProcessed(java.lang.String path)
|
boolean |
isPrivateLayout()
|
boolean |
isWithinDateRange(java.util.Date modifiedDate)
|
void |
putNotUniquePerLayout(java.lang.String dataKey)
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
|
void |
setGroupId(long groupId)
|
void |
setOldPlid(long oldPlid)
|
void |
setPlid(long plid)
|
void |
setPrivateLayout(boolean privateLayout)
|
void |
setScopeGroupId(long scopeGroupId)
|
void |
setScopeLayoutId(long scopeLayoutId)
|
void |
setSourceGroupId(long sourceGroupId)
|
java.lang.String |
toXML(java.lang.Object object)
|
protected void |
validateDateRange(java.util.Date startDate,
java.util.Date endDate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortletDataContextImpl
public PortletDataContextImpl(long companyId,
long groupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Set<java.lang.String> primaryKeys,
com.liferay.portal.lar.UserIdStrategy userIdStrategy,
com.liferay.portal.kernel.zip.ZipReader zipReader)
PortletDataContextImpl
public PortletDataContextImpl(long companyId,
long groupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Set<java.lang.String> primaryKeys,
java.util.Date startDate,
java.util.Date endDate,
com.liferay.portal.kernel.zip.ZipWriter zipWriter)
throws com.liferay.portal.lar.PortletDataException
- Throws:
com.liferay.portal.lar.PortletDataException
addComments
public void addComments(java.lang.Class<?> classObj,
long classPK)
throws com.liferay.portal.SystemException
- Specified by:
addComments
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addComments
public void addComments(java.lang.String className,
long classPK,
java.util.List<com.liferay.portlet.messageboards.model.MBMessage> messages)
- Specified by:
addComments
in interface com.liferay.portal.lar.PortletDataContext
addPrimaryKey
public boolean addPrimaryKey(java.lang.Class<?> classObj,
java.lang.String primaryKey)
- Specified by:
addPrimaryKey
in interface com.liferay.portal.lar.PortletDataContext
addRatingsEntries
public void addRatingsEntries(java.lang.Class<?> classObj,
long classPK)
throws com.liferay.portal.SystemException
- Specified by:
addRatingsEntries
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addRatingsEntries
public void addRatingsEntries(java.lang.String className,
long classPK,
java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries)
- Specified by:
addRatingsEntries
in interface com.liferay.portal.lar.PortletDataContext
addTagsCategories
public void addTagsCategories(java.lang.Class<?> classObj,
long classPK)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
addTagsCategories
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
addTagsCategories
public void addTagsCategories(java.lang.String className,
long classPK,
java.lang.String[] tagsCategories)
- Specified by:
addTagsCategories
in interface com.liferay.portal.lar.PortletDataContext
addTagsEntries
public void addTagsEntries(java.lang.Class<?> classObj,
long classPK)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
addTagsEntries
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
addTagsEntries
public void addTagsEntries(java.lang.String className,
long classPK,
java.lang.String[] tagsEntries)
- Specified by:
addTagsEntries
in interface com.liferay.portal.lar.PortletDataContext
addZipEntry
public void addZipEntry(java.lang.String path,
byte[] bytes)
throws com.liferay.portal.SystemException
- Specified by:
addZipEntry
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addZipEntry
public void addZipEntry(java.lang.String path,
java.io.InputStream is)
throws com.liferay.portal.SystemException
- Specified by:
addZipEntry
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addZipEntry
public void addZipEntry(java.lang.String path,
java.lang.Object object)
throws com.liferay.portal.SystemException
- Specified by:
addZipEntry
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addZipEntry
public void addZipEntry(java.lang.String path,
java.lang.String s)
throws com.liferay.portal.SystemException
- Specified by:
addZipEntry
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
addZipEntry
public void addZipEntry(java.lang.String path,
java.lang.StringBuilder sb)
throws com.liferay.portal.SystemException
- Specified by:
addZipEntry
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
fromXML
public java.lang.Object fromXML(byte[] bytes)
- Specified by:
fromXML
in interface com.liferay.portal.lar.PortletDataContext
fromXML
public java.lang.Object fromXML(java.lang.String xml)
- Specified by:
fromXML
in interface com.liferay.portal.lar.PortletDataContext
getBooleanParameter
public boolean getBooleanParameter(java.lang.String namespace,
java.lang.String name)
- Specified by:
getBooleanParameter
in interface com.liferay.portal.lar.PortletDataContext
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interface com.liferay.portal.lar.PortletDataContext
getComments
public java.util.Map<java.lang.String,java.util.List<com.liferay.portlet.messageboards.model.MBMessage>> getComments()
- Specified by:
getComments
in interface com.liferay.portal.lar.PortletDataContext
getCompanyId
public long getCompanyId()
- Specified by:
getCompanyId
in interface com.liferay.portal.lar.PortletDataContext
getDataStrategy
public java.lang.String getDataStrategy()
- Specified by:
getDataStrategy
in interface com.liferay.portal.lar.PortletDataContext
getEndDate
public java.util.Date getEndDate()
- Specified by:
getEndDate
in interface com.liferay.portal.lar.PortletDataContext
getGroupId
public long getGroupId()
- Specified by:
getGroupId
in interface com.liferay.portal.lar.PortletDataContext
getLayoutPath
public java.lang.String getLayoutPath(long layoutId)
- Specified by:
getLayoutPath
in interface com.liferay.portal.lar.PortletDataContext
getNewPrimaryKeysMap
public java.util.Map<?,?> getNewPrimaryKeysMap(java.lang.Class<?> classObj)
- Specified by:
getNewPrimaryKeysMap
in interface com.liferay.portal.lar.PortletDataContext
getOldPlid
public long getOldPlid()
- Specified by:
getOldPlid
in interface com.liferay.portal.lar.PortletDataContext
getParameterMap
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
- Specified by:
getParameterMap
in interface com.liferay.portal.lar.PortletDataContext
getPlid
public long getPlid()
- Specified by:
getPlid
in interface com.liferay.portal.lar.PortletDataContext
getPortletPath
public java.lang.String getPortletPath(java.lang.String portletId)
- Specified by:
getPortletPath
in interface com.liferay.portal.lar.PortletDataContext
getPrimaryKeys
public java.util.Set<java.lang.String> getPrimaryKeys()
- Specified by:
getPrimaryKeys
in interface com.liferay.portal.lar.PortletDataContext
getRatingsEntries
public java.util.Map<java.lang.String,java.util.List<com.liferay.portlet.ratings.model.RatingsEntry>> getRatingsEntries()
- Specified by:
getRatingsEntries
in interface com.liferay.portal.lar.PortletDataContext
getRootPath
public java.lang.String getRootPath()
- Specified by:
getRootPath
in interface com.liferay.portal.lar.PortletDataContext
getScopeGroupId
public long getScopeGroupId()
- Specified by:
getScopeGroupId
in interface com.liferay.portal.lar.PortletDataContext
getScopeLayoutId
public long getScopeLayoutId()
- Specified by:
getScopeLayoutId
in interface com.liferay.portal.lar.PortletDataContext
getSourceGroupId
public long getSourceGroupId()
- Specified by:
getSourceGroupId
in interface com.liferay.portal.lar.PortletDataContext
getSourceLayoutPath
public java.lang.String getSourceLayoutPath(long layoutId)
- Specified by:
getSourceLayoutPath
in interface com.liferay.portal.lar.PortletDataContext
getSourcePortletPath
public java.lang.String getSourcePortletPath(java.lang.String portletId)
- Specified by:
getSourcePortletPath
in interface com.liferay.portal.lar.PortletDataContext
getSourceRootPath
public java.lang.String getSourceRootPath()
- Specified by:
getSourceRootPath
in interface com.liferay.portal.lar.PortletDataContext
getStartDate
public java.util.Date getStartDate()
- Specified by:
getStartDate
in interface com.liferay.portal.lar.PortletDataContext
getTagsCategories
public java.util.Map<java.lang.String,java.lang.String[]> getTagsCategories()
- Specified by:
getTagsCategories
in interface com.liferay.portal.lar.PortletDataContext
getTagsCategories
public java.lang.String[] getTagsCategories(java.lang.Class<?> classObj,
long classPK)
- Specified by:
getTagsCategories
in interface com.liferay.portal.lar.PortletDataContext
getTagsEntries
public java.util.Map<java.lang.String,java.lang.String[]> getTagsEntries()
- Specified by:
getTagsEntries
in interface com.liferay.portal.lar.PortletDataContext
getTagsEntries
public java.lang.String[] getTagsEntries(java.lang.Class<?> classObj,
long classPK)
- Specified by:
getTagsEntries
in interface com.liferay.portal.lar.PortletDataContext
getTagsEntries
public java.lang.String[] getTagsEntries(java.lang.String className,
long classPK)
- Specified by:
getTagsEntries
in interface com.liferay.portal.lar.PortletDataContext
getUserId
public long getUserId(java.lang.String userUuid)
throws com.liferay.portal.SystemException
- Specified by:
getUserId
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.SystemException
getUserIdStrategy
public com.liferay.portal.lar.UserIdStrategy getUserIdStrategy()
- Specified by:
getUserIdStrategy
in interface com.liferay.portal.lar.PortletDataContext
getZipEntries
public java.util.Map<java.lang.String,byte[]> getZipEntries()
- Specified by:
getZipEntries
in interface com.liferay.portal.lar.PortletDataContext
getZipEntryAsByteArray
public byte[] getZipEntryAsByteArray(java.lang.String path)
- Specified by:
getZipEntryAsByteArray
in interface com.liferay.portal.lar.PortletDataContext
getZipEntryAsObject
public java.lang.Object getZipEntryAsObject(java.lang.String path)
- Specified by:
getZipEntryAsObject
in interface com.liferay.portal.lar.PortletDataContext
getZipEntryAsString
public java.lang.String getZipEntryAsString(java.lang.String path)
- Specified by:
getZipEntryAsString
in interface com.liferay.portal.lar.PortletDataContext
getZipFolderEntries
public java.util.Map<java.lang.String,java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,byte[]>>> getZipFolderEntries()
- Specified by:
getZipFolderEntries
in interface com.liferay.portal.lar.PortletDataContext
getZipFolderEntries
public java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,byte[]>> getZipFolderEntries(java.lang.String path)
- Specified by:
getZipFolderEntries
in interface com.liferay.portal.lar.PortletDataContext
getZipReader
public com.liferay.portal.kernel.zip.ZipReader getZipReader()
- Specified by:
getZipReader
in interface com.liferay.portal.lar.PortletDataContext
getZipWriter
public com.liferay.portal.kernel.zip.ZipWriter getZipWriter()
- Specified by:
getZipWriter
in interface com.liferay.portal.lar.PortletDataContext
hasDateRange
public boolean hasDateRange()
- Specified by:
hasDateRange
in interface com.liferay.portal.lar.PortletDataContext
hasNotUniquePerLayout
public boolean hasNotUniquePerLayout(java.lang.String dataKey)
- Specified by:
hasNotUniquePerLayout
in interface com.liferay.portal.lar.PortletDataContext
hasPrimaryKey
public boolean hasPrimaryKey(java.lang.Class<?> classObj,
java.lang.String primaryKey)
- Specified by:
hasPrimaryKey
in interface com.liferay.portal.lar.PortletDataContext
importComments
public void importComments(java.lang.Class<?> classObj,
long classPK,
long newClassPK,
long groupId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
importComments
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
importRatingsEntries
public void importRatingsEntries(java.lang.Class<?> classObj,
long classPK,
long newClassPK)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Specified by:
importRatingsEntries
in interface com.liferay.portal.lar.PortletDataContext
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
isPathNotProcessed
public boolean isPathNotProcessed(java.lang.String path)
- Specified by:
isPathNotProcessed
in interface com.liferay.portal.lar.PortletDataContext
isPrivateLayout
public boolean isPrivateLayout()
- Specified by:
isPrivateLayout
in interface com.liferay.portal.lar.PortletDataContext
isWithinDateRange
public boolean isWithinDateRange(java.util.Date modifiedDate)
- Specified by:
isWithinDateRange
in interface com.liferay.portal.lar.PortletDataContext
putNotUniquePerLayout
public void putNotUniquePerLayout(java.lang.String dataKey)
- Specified by:
putNotUniquePerLayout
in interface com.liferay.portal.lar.PortletDataContext
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setClassLoader
in interface com.liferay.portal.lar.PortletDataContext
setGroupId
public void setGroupId(long groupId)
- Specified by:
setGroupId
in interface com.liferay.portal.lar.PortletDataContext
setOldPlid
public void setOldPlid(long oldPlid)
- Specified by:
setOldPlid
in interface com.liferay.portal.lar.PortletDataContext
setPlid
public void setPlid(long plid)
- Specified by:
setPlid
in interface com.liferay.portal.lar.PortletDataContext
setPrivateLayout
public void setPrivateLayout(boolean privateLayout)
- Specified by:
setPrivateLayout
in interface com.liferay.portal.lar.PortletDataContext
setScopeGroupId
public void setScopeGroupId(long scopeGroupId)
- Specified by:
setScopeGroupId
in interface com.liferay.portal.lar.PortletDataContext
setScopeLayoutId
public void setScopeLayoutId(long scopeLayoutId)
- Specified by:
setScopeLayoutId
in interface com.liferay.portal.lar.PortletDataContext
setSourceGroupId
public void setSourceGroupId(long sourceGroupId)
- Specified by:
setSourceGroupId
in interface com.liferay.portal.lar.PortletDataContext
toXML
public java.lang.String toXML(java.lang.Object object)
- Specified by:
toXML
in interface com.liferay.portal.lar.PortletDataContext
getPrimaryKeyString
protected java.lang.String getPrimaryKeyString(java.lang.Class<?> classObj,
long classPK)
getPrimaryKeyString
protected java.lang.String getPrimaryKeyString(java.lang.String className,
long classPK)
getPrimaryKeyString
protected java.lang.String getPrimaryKeyString(java.lang.Class<?> classObj,
java.lang.String primaryKey)
getPrimaryKeyString
protected java.lang.String getPrimaryKeyString(java.lang.String className,
java.lang.String primaryKey)
initXStream
protected void initXStream()
validateDateRange
protected void validateDateRange(java.util.Date startDate,
java.util.Date endDate)
throws com.liferay.portal.lar.PortletDataException
- Throws:
com.liferay.portal.lar.PortletDataException