com.liferay.portal.lar
Class PortletDataContextImpl
java.lang.Object
com.liferay.portal.lar.PortletDataContextImpl
- All Implemented Interfaces:
- PortletDataContext, Serializable
public class PortletDataContextImpl
- extends Object
- implements PortletDataContext
Holds context information that is used during exporting and importing portlet
data.
- See Also:
- Serialized Form
|
Constructor Summary |
PortletDataContextImpl(long companyId,
long groupId,
Map<String,String[]> parameterMap,
Set<String> primaryKeys,
Date startDate,
Date endDate,
ZipWriter zipWriter)
|
PortletDataContextImpl(long companyId,
long groupId,
Map<String,String[]> parameterMap,
Set<String> primaryKeys,
UserIdStrategy userIdStrategy,
ZipReader zipReader)
|
|
Method Summary |
void |
addAssetCategories(Class<?> clazz,
long classPK)
|
void |
addAssetCategories(String className,
long classPK,
long[] assetCategoryIds)
|
void |
addAssetLinks(Class<?> clazz,
long classPK)
|
void |
addAssetTags(Class<?> clazz,
long classPK)
|
void |
addAssetTags(String className,
long classPK,
String[] assetTagNames)
|
void |
addClassedModel(Element element,
String path,
ClassedModel classedModel,
String namespace)
|
void |
addComments(Class<?> clazz,
long classPK)
|
void |
addComments(String className,
long classPK,
List<MBMessage> messages)
|
void |
addExpando(Element element,
String path,
ClassedModel classedModel)
|
void |
addLocks(Class<?> clazz,
String key)
|
void |
addLocks(String className,
String key,
Lock lock)
|
void |
addPermissions(Class<?> clazz,
long classPK)
|
void |
addPermissions(String resourceName,
long resourcePK)
|
void |
addPermissions(String resourceName,
long resourcePK,
List<KeyValuePair> permissions)
|
boolean |
addPrimaryKey(Class<?> clazz,
String primaryKey)
|
void |
addRatingsEntries(Class<?> clazz,
long classPK)
|
void |
addRatingsEntries(String className,
long classPK,
List<RatingsEntry> ratingsEntries)
|
void |
addZipEntry(String path,
byte[] bytes)
|
void |
addZipEntry(String path,
InputStream is)
|
void |
addZipEntry(String path,
Object object)
|
void |
addZipEntry(String path,
String s)
|
void |
addZipEntry(String path,
StringBuilder sb)
|
ServiceContext |
createServiceContext(Element element,
ClassedModel classedModel,
String namespace)
|
protected ServiceContext |
createServiceContext(Element element,
String path,
ClassedModel classedModel,
String namespace)
|
ServiceContext |
createServiceContext(String path,
ClassedModel classedModel,
String namespace)
|
Object |
fromXML(byte[] bytes)
|
Object |
fromXML(String xml)
|
protected Map<Long,Set<String>> |
getActionIds(long companyId,
long[] roleIds,
String className,
long primKey,
List<String> actionIds)
|
long[] |
getAssetCategoryIds(Class<?> clazz,
long classPK)
|
Map<String,long[]> |
getAssetCategoryIdsMap()
|
Map<String,String[]> |
getAssetCategoryUuidsMap()
|
Map<String,String[]> |
getAssetLinkUuidsMap()
|
String[] |
getAssetTagNames(Class<?> clazz,
long classPK)
|
String[] |
getAssetTagNames(String className,
long classPK)
|
Map<String,String[]> |
getAssetTagNamesMap()
|
boolean |
getBooleanParameter(String namespace,
String name)
|
ClassLoader |
getClassLoader()
|
protected long |
getClassPK(ClassedModel classedModel)
|
Map<String,List<MBMessage>> |
getComments()
|
long |
getCompanyId()
|
String |
getDataStrategy()
|
Date |
getEndDate()
|
Map<String,List<ExpandoColumn>> |
getExpandoColumns()
|
protected String |
getExpandoPath(String path)
|
long |
getGroupId()
|
String |
getLayoutPath(long layoutId)
|
Map<String,Lock> |
getLocks()
|
Map<?,?> |
getNewPrimaryKeysMap(Class<?> clazz)
|
Map<?,?> |
getNewPrimaryKeysMap(String className)
|
long |
getOldPlid()
|
Map<String,String[]> |
getParameterMap()
|
Map<String,List<KeyValuePair>> |
getPermissions()
|
long |
getPlid()
|
String |
getPortletPath(String portletId)
|
Set<String> |
getPrimaryKeys()
|
protected String |
getPrimaryKeyString(Class<?> clazz,
long classPK)
|
protected String |
getPrimaryKeyString(Class<?> clazz,
String primaryKey)
|
protected String |
getPrimaryKeyString(String className,
long classPK)
|
protected String |
getPrimaryKeyString(String className,
String primaryKey)
|
Map<String,List<RatingsEntry>> |
getRatingsEntries()
|
String |
getRootPath()
|
long |
getScopeGroupId()
|
String |
getScopeLayoutUuid()
|
String |
getScopeType()
|
long |
getSourceGroupId()
|
String |
getSourceLayoutPath(long layoutId)
|
String |
getSourcePortletPath(String portletId)
|
String |
getSourceRootPath()
|
Date |
getStartDate()
|
long |
getUserId(String userUuid)
|
UserIdStrategy |
getUserIdStrategy()
|
List<String> |
getZipEntries()
|
byte[] |
getZipEntryAsByteArray(String path)
|
InputStream |
getZipEntryAsInputStream(String path)
|
Object |
getZipEntryAsObject(Element element,
String path)
|
Object |
getZipEntryAsObject(String path)
|
String |
getZipEntryAsString(String path)
|
List<String> |
getZipFolderEntries()
|
List<String> |
getZipFolderEntries(String path)
|
ZipReader |
getZipReader()
|
ZipWriter |
getZipWriter()
|
boolean |
hasDateRange()
|
boolean |
hasNotUniquePerLayout(String dataKey)
|
boolean |
hasPrimaryKey(Class<?> clazz,
String primaryKey)
|
void |
importClassedModel(ClassedModel classedModel,
ClassedModel newClassedModel,
String namespace)
|
void |
importComments(Class<?> clazz,
long classPK,
long newClassPK,
long groupId)
|
void |
importLocks(Class<?> clazz,
String key,
String newKey)
|
void |
importPermissions(Class<?> clazz,
long classPK,
long newClassPK)
|
void |
importPermissions(String resourceName,
long resourcePK,
long newResourcePK)
|
void |
importRatingsEntries(Class<?> clazz,
long classPK,
long newClassPK)
|
protected void |
initXStream()
|
boolean |
isDataStrategyMirror()
|
boolean |
isDataStrategyMirrorWithOverwriting()
|
boolean |
isPathNotProcessed(String path)
|
boolean |
isPerformDirectBinaryImport()
|
boolean |
isPrivateLayout()
|
protected boolean |
isResourceMain(ClassedModel classedModel)
|
boolean |
isWithinDateRange(Date modifiedDate)
|
void |
putNotUniquePerLayout(String dataKey)
|
void |
setClassLoader(ClassLoader classLoader)
|
void |
setGroupId(long groupId)
|
void |
setOldPlid(long oldPlid)
|
void |
setPlid(long plid)
|
void |
setPortetDataContextListener(PortletDataContextListener portletDataContextListener)
|
void |
setPrivateLayout(boolean privateLayout)
|
void |
setScopeGroupId(long scopeGroupId)
|
void |
setScopeLayoutUuid(String scopeLayoutUuid)
|
void |
setScopeType(String scopeType)
|
void |
setSourceGroupId(long sourceGroupId)
|
void |
setStartDate(Date startDate)
|
String |
toXML(Object object)
|
protected void |
validateDateRange(Date startDate,
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,
Map<String,String[]> parameterMap,
Set<String> primaryKeys,
Date startDate,
Date endDate,
ZipWriter zipWriter)
throws PortletDataException
- Throws:
PortletDataException
PortletDataContextImpl
public PortletDataContextImpl(long companyId,
long groupId,
Map<String,String[]> parameterMap,
Set<String> primaryKeys,
UserIdStrategy userIdStrategy,
ZipReader zipReader)
addAssetCategories
public void addAssetCategories(Class<?> clazz,
long classPK)
throws SystemException
- Specified by:
addAssetCategories in interface PortletDataContext
- Throws:
SystemException
addAssetCategories
public void addAssetCategories(String className,
long classPK,
long[] assetCategoryIds)
- Specified by:
addAssetCategories in interface PortletDataContext
addAssetLinks
public void addAssetLinks(Class<?> clazz,
long classPK)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
addAssetTags
public void addAssetTags(Class<?> clazz,
long classPK)
throws SystemException
- Specified by:
addAssetTags in interface PortletDataContext
- Throws:
SystemException
addAssetTags
public void addAssetTags(String className,
long classPK,
String[] assetTagNames)
- Specified by:
addAssetTags in interface PortletDataContext
addClassedModel
public void addClassedModel(Element element,
String path,
ClassedModel classedModel,
String namespace)
throws PortalException,
SystemException
- Specified by:
addClassedModel in interface PortletDataContext
- Throws:
PortalException
SystemException
addComments
public void addComments(Class<?> clazz,
long classPK)
throws SystemException
- Specified by:
addComments in interface PortletDataContext
- Throws:
SystemException
addComments
public void addComments(String className,
long classPK,
List<MBMessage> messages)
- Specified by:
addComments in interface PortletDataContext
addExpando
public void addExpando(Element element,
String path,
ClassedModel classedModel)
throws PortalException,
SystemException
- Specified by:
addExpando in interface PortletDataContext
- Throws:
PortalException
SystemException
addLocks
public void addLocks(Class<?> clazz,
String key)
throws PortalException,
SystemException
- Specified by:
addLocks in interface PortletDataContext
- Throws:
PortalException
SystemException
addLocks
public void addLocks(String className,
String key,
Lock lock)
- Specified by:
addLocks in interface PortletDataContext
addPermissions
public void addPermissions(Class<?> clazz,
long classPK)
throws PortalException,
SystemException
- Specified by:
addPermissions in interface PortletDataContext
- Throws:
PortalException
SystemException
addPermissions
public void addPermissions(String resourceName,
long resourcePK)
throws PortalException,
SystemException
- Specified by:
addPermissions in interface PortletDataContext
- Throws:
PortalException
SystemException
addPermissions
public void addPermissions(String resourceName,
long resourcePK,
List<KeyValuePair> permissions)
- Specified by:
addPermissions in interface PortletDataContext
addPrimaryKey
public boolean addPrimaryKey(Class<?> clazz,
String primaryKey)
- Specified by:
addPrimaryKey in interface PortletDataContext
addRatingsEntries
public void addRatingsEntries(Class<?> clazz,
long classPK)
throws SystemException
- Specified by:
addRatingsEntries in interface PortletDataContext
- Throws:
SystemException
addRatingsEntries
public void addRatingsEntries(String className,
long classPK,
List<RatingsEntry> ratingsEntries)
- Specified by:
addRatingsEntries in interface PortletDataContext
addZipEntry
public void addZipEntry(String path,
byte[] bytes)
throws SystemException
- Specified by:
addZipEntry in interface PortletDataContext
- Throws:
SystemException
addZipEntry
public void addZipEntry(String path,
InputStream is)
throws SystemException
- Specified by:
addZipEntry in interface PortletDataContext
- Throws:
SystemException
addZipEntry
public void addZipEntry(String path,
Object object)
throws SystemException
- Specified by:
addZipEntry in interface PortletDataContext
- Throws:
SystemException
addZipEntry
public void addZipEntry(String path,
String s)
throws SystemException
- Specified by:
addZipEntry in interface PortletDataContext
- Throws:
SystemException
addZipEntry
public void addZipEntry(String path,
StringBuilder sb)
throws SystemException
- Specified by:
addZipEntry in interface PortletDataContext
- Throws:
SystemException
createServiceContext
public ServiceContext createServiceContext(Element element,
ClassedModel classedModel,
String namespace)
- Specified by:
createServiceContext in interface PortletDataContext
createServiceContext
public ServiceContext createServiceContext(String path,
ClassedModel classedModel,
String namespace)
- Specified by:
createServiceContext in interface PortletDataContext
fromXML
public Object fromXML(byte[] bytes)
- Specified by:
fromXML in interface PortletDataContext
fromXML
public Object fromXML(String xml)
- Specified by:
fromXML in interface PortletDataContext
getAssetCategoryIds
public long[] getAssetCategoryIds(Class<?> clazz,
long classPK)
- Specified by:
getAssetCategoryIds in interface PortletDataContext
getAssetCategoryIdsMap
public Map<String,long[]> getAssetCategoryIdsMap()
- Specified by:
getAssetCategoryIdsMap in interface PortletDataContext
getAssetCategoryUuidsMap
public Map<String,String[]> getAssetCategoryUuidsMap()
- Specified by:
getAssetCategoryUuidsMap in interface PortletDataContext
getAssetLinkUuidsMap
public Map<String,String[]> getAssetLinkUuidsMap()
- Specified by:
getAssetLinkUuidsMap in interface PortletDataContext
getAssetTagNames
public String[] getAssetTagNames(Class<?> clazz,
long classPK)
- Specified by:
getAssetTagNames in interface PortletDataContext
getAssetTagNames
public String[] getAssetTagNames(String className,
long classPK)
- Specified by:
getAssetTagNames in interface PortletDataContext
getAssetTagNamesMap
public Map<String,String[]> getAssetTagNamesMap()
- Specified by:
getAssetTagNamesMap in interface PortletDataContext
getBooleanParameter
public boolean getBooleanParameter(String namespace,
String name)
- Specified by:
getBooleanParameter in interface PortletDataContext
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader in interface PortletDataContext
getComments
public Map<String,List<MBMessage>> getComments()
- Specified by:
getComments in interface PortletDataContext
getCompanyId
public long getCompanyId()
- Specified by:
getCompanyId in interface PortletDataContext
getDataStrategy
public String getDataStrategy()
- Specified by:
getDataStrategy in interface PortletDataContext
getEndDate
public Date getEndDate()
- Specified by:
getEndDate in interface PortletDataContext
getExpandoColumns
public Map<String,List<ExpandoColumn>> getExpandoColumns()
- Specified by:
getExpandoColumns in interface PortletDataContext
getGroupId
public long getGroupId()
- Specified by:
getGroupId in interface PortletDataContext
getLayoutPath
public String getLayoutPath(long layoutId)
- Specified by:
getLayoutPath in interface PortletDataContext
getLocks
public Map<String,Lock> getLocks()
- Specified by:
getLocks in interface PortletDataContext
getNewPrimaryKeysMap
public Map<?,?> getNewPrimaryKeysMap(Class<?> clazz)
- Specified by:
getNewPrimaryKeysMap in interface PortletDataContext
getNewPrimaryKeysMap
public Map<?,?> getNewPrimaryKeysMap(String className)
- Specified by:
getNewPrimaryKeysMap in interface PortletDataContext
getOldPlid
public long getOldPlid()
- Specified by:
getOldPlid in interface PortletDataContext
getParameterMap
public Map<String,String[]> getParameterMap()
- Specified by:
getParameterMap in interface PortletDataContext
getPermissions
public Map<String,List<KeyValuePair>> getPermissions()
- Specified by:
getPermissions in interface PortletDataContext
getPlid
public long getPlid()
- Specified by:
getPlid in interface PortletDataContext
getPortletPath
public String getPortletPath(String portletId)
- Specified by:
getPortletPath in interface PortletDataContext
getPrimaryKeys
public Set<String> getPrimaryKeys()
- Specified by:
getPrimaryKeys in interface PortletDataContext
getRatingsEntries
public Map<String,List<RatingsEntry>> getRatingsEntries()
- Specified by:
getRatingsEntries in interface PortletDataContext
getRootPath
public String getRootPath()
- Specified by:
getRootPath in interface PortletDataContext
getScopeGroupId
public long getScopeGroupId()
- Specified by:
getScopeGroupId in interface PortletDataContext
getScopeLayoutUuid
public String getScopeLayoutUuid()
- Specified by:
getScopeLayoutUuid in interface PortletDataContext
getScopeType
public String getScopeType()
- Specified by:
getScopeType in interface PortletDataContext
getSourceGroupId
public long getSourceGroupId()
- Specified by:
getSourceGroupId in interface PortletDataContext
getSourceLayoutPath
public String getSourceLayoutPath(long layoutId)
- Specified by:
getSourceLayoutPath in interface PortletDataContext
getSourcePortletPath
public String getSourcePortletPath(String portletId)
- Specified by:
getSourcePortletPath in interface PortletDataContext
getSourceRootPath
public String getSourceRootPath()
- Specified by:
getSourceRootPath in interface PortletDataContext
getStartDate
public Date getStartDate()
- Specified by:
getStartDate in interface PortletDataContext
getUserId
public long getUserId(String userUuid)
- Specified by:
getUserId in interface PortletDataContext
getUserIdStrategy
public UserIdStrategy getUserIdStrategy()
- Specified by:
getUserIdStrategy in interface PortletDataContext
getZipEntries
public List<String> getZipEntries()
- Specified by:
getZipEntries in interface PortletDataContext
getZipEntryAsByteArray
public byte[] getZipEntryAsByteArray(String path)
- Specified by:
getZipEntryAsByteArray in interface PortletDataContext
getZipEntryAsInputStream
public InputStream getZipEntryAsInputStream(String path)
- Specified by:
getZipEntryAsInputStream in interface PortletDataContext
getZipEntryAsObject
public Object getZipEntryAsObject(Element element,
String path)
- Specified by:
getZipEntryAsObject in interface PortletDataContext
getZipEntryAsObject
public Object getZipEntryAsObject(String path)
- Specified by:
getZipEntryAsObject in interface PortletDataContext
getZipEntryAsString
public String getZipEntryAsString(String path)
- Specified by:
getZipEntryAsString in interface PortletDataContext
getZipFolderEntries
public List<String> getZipFolderEntries()
- Specified by:
getZipFolderEntries in interface PortletDataContext
getZipFolderEntries
public List<String> getZipFolderEntries(String path)
- Specified by:
getZipFolderEntries in interface PortletDataContext
getZipReader
public ZipReader getZipReader()
- Specified by:
getZipReader in interface PortletDataContext
getZipWriter
public ZipWriter getZipWriter()
- Specified by:
getZipWriter in interface PortletDataContext
hasDateRange
public boolean hasDateRange()
- Specified by:
hasDateRange in interface PortletDataContext
hasNotUniquePerLayout
public boolean hasNotUniquePerLayout(String dataKey)
- Specified by:
hasNotUniquePerLayout in interface PortletDataContext
hasPrimaryKey
public boolean hasPrimaryKey(Class<?> clazz,
String primaryKey)
- Specified by:
hasPrimaryKey in interface PortletDataContext
importClassedModel
public void importClassedModel(ClassedModel classedModel,
ClassedModel newClassedModel,
String namespace)
throws PortalException,
SystemException
- Specified by:
importClassedModel in interface PortletDataContext
- Throws:
PortalException
SystemException
importComments
public void importComments(Class<?> clazz,
long classPK,
long newClassPK,
long groupId)
throws PortalException,
SystemException
- Specified by:
importComments in interface PortletDataContext
- Throws:
PortalException
SystemException
importLocks
public void importLocks(Class<?> clazz,
String key,
String newKey)
throws PortalException,
SystemException
- Specified by:
importLocks in interface PortletDataContext
- Throws:
PortalException
SystemException
importPermissions
public void importPermissions(Class<?> clazz,
long classPK,
long newClassPK)
throws PortalException,
SystemException
- Specified by:
importPermissions in interface PortletDataContext
- Throws:
PortalException
SystemException
importPermissions
public void importPermissions(String resourceName,
long resourcePK,
long newResourcePK)
throws PortalException,
SystemException
- Specified by:
importPermissions in interface PortletDataContext
- Throws:
PortalException
SystemException
importRatingsEntries
public void importRatingsEntries(Class<?> clazz,
long classPK,
long newClassPK)
throws PortalException,
SystemException
- Specified by:
importRatingsEntries in interface PortletDataContext
- Throws:
PortalException
SystemException
isDataStrategyMirror
public boolean isDataStrategyMirror()
- Specified by:
isDataStrategyMirror in interface PortletDataContext
isDataStrategyMirrorWithOverwriting
public boolean isDataStrategyMirrorWithOverwriting()
- Specified by:
isDataStrategyMirrorWithOverwriting in interface PortletDataContext
isPathNotProcessed
public boolean isPathNotProcessed(String path)
- Specified by:
isPathNotProcessed in interface PortletDataContext
isPerformDirectBinaryImport
public boolean isPerformDirectBinaryImport()
- Specified by:
isPerformDirectBinaryImport in interface PortletDataContext
isPrivateLayout
public boolean isPrivateLayout()
- Specified by:
isPrivateLayout in interface PortletDataContext
isWithinDateRange
public boolean isWithinDateRange(Date modifiedDate)
- Specified by:
isWithinDateRange in interface PortletDataContext
putNotUniquePerLayout
public void putNotUniquePerLayout(String dataKey)
- Specified by:
putNotUniquePerLayout in interface PortletDataContext
setClassLoader
public void setClassLoader(ClassLoader classLoader)
- Specified by:
setClassLoader in interface PortletDataContext
setGroupId
public void setGroupId(long groupId)
- Specified by:
setGroupId in interface PortletDataContext
setOldPlid
public void setOldPlid(long oldPlid)
- Specified by:
setOldPlid in interface PortletDataContext
setPlid
public void setPlid(long plid)
- Specified by:
setPlid in interface PortletDataContext
setPortetDataContextListener
public void setPortetDataContextListener(PortletDataContextListener portletDataContextListener)
- Specified by:
setPortetDataContextListener in interface PortletDataContext
setPrivateLayout
public void setPrivateLayout(boolean privateLayout)
- Specified by:
setPrivateLayout in interface PortletDataContext
setScopeGroupId
public void setScopeGroupId(long scopeGroupId)
- Specified by:
setScopeGroupId in interface PortletDataContext
setScopeLayoutUuid
public void setScopeLayoutUuid(String scopeLayoutUuid)
- Specified by:
setScopeLayoutUuid in interface PortletDataContext
setScopeType
public void setScopeType(String scopeType)
- Specified by:
setScopeType in interface PortletDataContext
setSourceGroupId
public void setSourceGroupId(long sourceGroupId)
- Specified by:
setSourceGroupId in interface PortletDataContext
setStartDate
public void setStartDate(Date startDate)
- Specified by:
setStartDate in interface PortletDataContext
toXML
public String toXML(Object object)
- Specified by:
toXML in interface PortletDataContext
createServiceContext
protected ServiceContext createServiceContext(Element element,
String path,
ClassedModel classedModel,
String namespace)
getActionIds
protected Map<Long,Set<String>> getActionIds(long companyId,
long[] roleIds,
String className,
long primKey,
List<String> actionIds)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getClassPK
protected long getClassPK(ClassedModel classedModel)
getExpandoPath
protected String getExpandoPath(String path)
getPrimaryKeyString
protected String getPrimaryKeyString(Class<?> clazz,
long classPK)
getPrimaryKeyString
protected String getPrimaryKeyString(Class<?> clazz,
String primaryKey)
getPrimaryKeyString
protected String getPrimaryKeyString(String className,
long classPK)
getPrimaryKeyString
protected String getPrimaryKeyString(String className,
String primaryKey)
initXStream
protected void initXStream()
isResourceMain
protected boolean isResourceMain(ClassedModel classedModel)
validateDateRange
protected void validateDateRange(Date startDate,
Date endDate)
throws PortletDataException
- Throws:
PortletDataException