Liferay 6.0.5

com.liferay.portal.lar
Class PortletDataContextImpl

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface com.liferay.portal.kernel.lar.PortletDataContext
ROOT_PATH_GROUPS, ROOT_PATH_LAYOUTS, ROOT_PATH_PORTLETS
 
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<?> classObj, long classPK)
           
 void addAssetCategories(String className, long classPK, long[] assetCategoryIds)
           
 void addAssetTags(Class<?> classObj, long classPK)
           
 void addAssetTags(String className, long classPK, String[] assetTagNames)
           
 void addComments(Class<?> classObj, long classPK)
           
 void addComments(String className, long classPK, List<MBMessage> messages)
           
 void addLocks(Class<?> classObj, String key)
           
 void addLocks(String className, String key, Lock lock)
           
 void addPermissions(Class<?> classObj, long classPK)
           
 void addPermissions(String resourceName, long resourcePK)
           
 void addPermissions(String resourceName, long resourcePK, List<KeyValuePair> permissions)
           
 boolean addPrimaryKey(Class<?> classObj, String primaryKey)
           
 void addRatingsEntries(Class<?> classObj, 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)
           
 Object fromXML(byte[] bytes)
           
 Object fromXML(String xml)
           
protected  String getActionIds(Role role, String className, String primKey)
           
 long[] getAssetCategoryIds(Class<?> classObj, long classPK)
           
 Map<String,long[]> getAssetCategoryIdsMap()
           
 Map<String,String[]> getAssetCategoryUuidsMap()
           
 String[] getAssetTagNames(Class<?> classObj, long classPK)
           
 String[] getAssetTagNames(String className, long classPK)
           
 Map<String,String[]> getAssetTagNamesMap()
           
 boolean getBooleanParameter(String namespace, String name)
           
 ClassLoader getClassLoader()
           
 Map<String,List<MBMessage>> getComments()
           
 long getCompanyId()
           
 String getDataStrategy()
           
 Date getEndDate()
           
 long getGroupId()
           
 String getLayoutPath(long layoutId)
           
 Map<String,Lock> getLocks()
           
 Map<?,?> getNewPrimaryKeysMap(Class<?> classObj)
           
 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<?> classObj, long classPK)
           
protected  String getPrimaryKeyString(Class<?> classObj, 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()
           
 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(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<?> classObj, String primaryKey)
           
 void importComments(Class<?> classObj, long classPK, long newClassPK, long groupId)
           
 void importLocks(Class<?> classObj, String key, String newKey)
           
 void importPermissions(Class<?> classObj, long classPK, long newClassPK)
           
 void importPermissions(String resourceName, long resourcePK, long newResourcePK)
           
 void importRatingsEntries(Class<?> classObj, long classPK, long newClassPK)
           
protected  void initXStream()
           
 boolean isDataStrategyMirror()
           
 boolean isPathNotProcessed(String path)
           
 boolean isPrivateLayout()
           
 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 setSourceGroupId(long sourceGroupId)
           
 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
 

Constructor Detail

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)
Method Detail

addAssetCategories

public void addAssetCategories(Class<?> classObj,
                               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

addAssetTags

public void addAssetTags(Class<?> classObj,
                         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

addComments

public void addComments(Class<?> classObj,
                        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

addLocks

public void addLocks(Class<?> classObj,
                     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<?> classObj,
                           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<?> classObj,
                             String primaryKey)
Specified by:
addPrimaryKey in interface PortletDataContext

addRatingsEntries

public void addRatingsEntries(Class<?> classObj,
                              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

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<?> classObj,
                                  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

getAssetTagNames

public String[] getAssetTagNames(Class<?> classObj,
                                 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

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<?> classObj)
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

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)
               throws SystemException
Specified by:
getUserId in interface PortletDataContext
Throws:
SystemException

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(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<?> classObj,
                             String primaryKey)
Specified by:
hasPrimaryKey in interface PortletDataContext

importComments

public void importComments(Class<?> classObj,
                           long classPK,
                           long newClassPK,
                           long groupId)
                    throws PortalException,
                           SystemException
Specified by:
importComments in interface PortletDataContext
Throws:
PortalException
SystemException

importLocks

public void importLocks(Class<?> classObj,
                        String key,
                        String newKey)
                 throws PortalException,
                        SystemException
Specified by:
importLocks in interface PortletDataContext
Throws:
PortalException
SystemException

importPermissions

public void importPermissions(Class<?> classObj,
                              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<?> classObj,
                                 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

isPathNotProcessed

public boolean isPathNotProcessed(String path)
Specified by:
isPathNotProcessed 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

setSourceGroupId

public void setSourceGroupId(long sourceGroupId)
Specified by:
setSourceGroupId in interface PortletDataContext

toXML

public String toXML(Object object)
Specified by:
toXML in interface PortletDataContext

getActionIds

protected String getActionIds(Role role,
                              String className,
                              String primKey)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

getPrimaryKeyString

protected String getPrimaryKeyString(Class<?> classObj,
                                     long classPK)

getPrimaryKeyString

protected String getPrimaryKeyString(Class<?> classObj,
                                     String primaryKey)

getPrimaryKeyString

protected String getPrimaryKeyString(String className,
                                     long classPK)

getPrimaryKeyString

protected String getPrimaryKeyString(String className,
                                     String primaryKey)

initXStream

protected void initXStream()

validateDateRange

protected void validateDateRange(Date startDate,
                                 Date endDate)
                          throws PortletDataException
Throws:
PortletDataException

Liferay 6.0.5