com.liferay.portal.lar
Class PortletDataContextImpl

java.lang.Object
  extended by com.liferay.portal.lar.PortletDataContextImpl
All Implemented Interfaces:
com.liferay.portal.kernel.lar.PortletDataContext, java.io.Serializable

public class PortletDataContextImpl
extends java.lang.Object
implements com.liferay.portal.kernel.lar.PortletDataContext

View Source

Holds context information that is used during exporting adn importing portlet data.

Author:
Brian Wing Shun Chan, Raymond Augé, Bruno Farache
See Also:
Serialized Form

Constructor Summary
PortletDataContextImpl(long companyId, long groupId, java.util.Map parameterMap, java.util.Set primaryKeys, com.liferay.portal.kernel.lar.UserIdStrategy userIdStrategy, com.liferay.portal.kernel.zip.ZipReader zipReader)
           
PortletDataContextImpl(long companyId, long groupId, java.util.Map parameterMap, java.util.Set primaryKeys, com.liferay.portal.kernel.zip.ZipWriter zipWriter)
           
 
Method Summary
 void addComments(java.lang.Class classObj, java.lang.Object primaryKey)
           
 void addComments(java.lang.String className, java.lang.Object primaryKey, java.util.List messages)
           
 boolean addPrimaryKey(java.lang.Class classObj, java.lang.Object primaryKey)
           
 void addRatingsEntries(java.lang.Class classObj, java.lang.Object primaryKey)
           
 void addRatingsEntries(java.lang.String className, java.lang.Object primaryKey, java.util.List entries)
           
 void addTagsEntries(java.lang.Class classObj, java.lang.Object classPK)
           
 void addTagsEntries(java.lang.String className, java.lang.Object classPK, java.lang.String[] values)
           
 boolean getBooleanParameter(java.lang.String namespace, java.lang.String name)
           
 java.util.Map getComments()
           
 long getCompanyId()
           
 java.lang.String getDataStrategy()
           
 long getGroupId()
           
 java.util.Map getNewPrimaryKeysMap(java.lang.Class classObj)
           
 java.util.Map getParameterMap()
           
 long getPlid()
           
 java.util.Set getPrimaryKeys()
           
protected  java.lang.String getPrimaryKeyString(java.lang.Class classObj, java.lang.Object primaryKey)
           
protected  java.lang.String getPrimaryKeyString(java.lang.String className, java.lang.Object primaryKey)
           
 java.util.Map getRatingsEntries()
           
 java.util.Map getTagsEntries()
           
 java.lang.String[] getTagsEntries(java.lang.Class classObj, java.lang.Object primaryKey)
           
 java.lang.String[] getTagsEntries(java.lang.String className, java.lang.Object primaryKey)
           
 long getUserId(java.lang.String userUuid)
           
 com.liferay.portal.kernel.lar.UserIdStrategy getUserIdStrategy()
           
 com.liferay.portal.kernel.zip.ZipReader getZipReader()
           
 com.liferay.portal.kernel.zip.ZipWriter getZipWriter()
           
 boolean hasPrimaryKey(java.lang.Class classObj, java.lang.Object primaryKey)
           
 void importComments(java.lang.Class classObj, java.lang.Object primaryKey, java.lang.Object newPrimaryKey, long groupId)
           
 void importRatingsEntries(java.lang.Class classObj, java.lang.Object primaryKey, java.lang.Object newPrimaryKey)
           
 void setPlid(long plid)
           
 
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,
                              java.util.Map parameterMap,
                              java.util.Set primaryKeys,
                              com.liferay.portal.kernel.lar.UserIdStrategy userIdStrategy,
                              com.liferay.portal.kernel.zip.ZipReader zipReader)

PortletDataContextImpl

public PortletDataContextImpl(long companyId,
                              long groupId,
                              java.util.Map parameterMap,
                              java.util.Set primaryKeys,
                              com.liferay.portal.kernel.zip.ZipWriter zipWriter)
Method Detail

getCompanyId

public long getCompanyId()
Specified by:
getCompanyId in interface com.liferay.portal.kernel.lar.PortletDataContext

getGroupId

public long getGroupId()
Specified by:
getGroupId in interface com.liferay.portal.kernel.lar.PortletDataContext

getPlid

public long getPlid()
Specified by:
getPlid in interface com.liferay.portal.kernel.lar.PortletDataContext

setPlid

public void setPlid(long plid)
Specified by:
setPlid in interface com.liferay.portal.kernel.lar.PortletDataContext

getParameterMap

public java.util.Map getParameterMap()
Specified by:
getParameterMap in interface com.liferay.portal.kernel.lar.PortletDataContext

getBooleanParameter

public boolean getBooleanParameter(java.lang.String namespace,
                                   java.lang.String name)
Specified by:
getBooleanParameter in interface com.liferay.portal.kernel.lar.PortletDataContext

getPrimaryKeys

public java.util.Set getPrimaryKeys()
Specified by:
getPrimaryKeys in interface com.liferay.portal.kernel.lar.PortletDataContext

addPrimaryKey

public boolean addPrimaryKey(java.lang.Class classObj,
                             java.lang.Object primaryKey)
Specified by:
addPrimaryKey in interface com.liferay.portal.kernel.lar.PortletDataContext

hasPrimaryKey

public boolean hasPrimaryKey(java.lang.Class classObj,
                             java.lang.Object primaryKey)
Specified by:
hasPrimaryKey in interface com.liferay.portal.kernel.lar.PortletDataContext

getNewPrimaryKeysMap

public java.util.Map getNewPrimaryKeysMap(java.lang.Class classObj)
Specified by:
getNewPrimaryKeysMap in interface com.liferay.portal.kernel.lar.PortletDataContext

getComments

public java.util.Map getComments()
Specified by:
getComments in interface com.liferay.portal.kernel.lar.PortletDataContext

addComments

public void addComments(java.lang.Class classObj,
                        java.lang.Object primaryKey)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Specified by:
addComments in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addComments

public void addComments(java.lang.String className,
                        java.lang.Object primaryKey,
                        java.util.List messages)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Specified by:
addComments in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

importComments

public void importComments(java.lang.Class classObj,
                           java.lang.Object primaryKey,
                           java.lang.Object newPrimaryKey,
                           long groupId)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Specified by:
importComments in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getRatingsEntries

public java.util.Map getRatingsEntries()
Specified by:
getRatingsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext

addRatingsEntries

public void addRatingsEntries(java.lang.Class classObj,
                              java.lang.Object primaryKey)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Specified by:
addRatingsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addRatingsEntries

public void addRatingsEntries(java.lang.String className,
                              java.lang.Object primaryKey,
                              java.util.List entries)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Specified by:
addRatingsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

importRatingsEntries

public void importRatingsEntries(java.lang.Class classObj,
                                 java.lang.Object primaryKey,
                                 java.lang.Object newPrimaryKey)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException
Specified by:
importRatingsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getTagsEntries

public java.lang.String[] getTagsEntries(java.lang.Class classObj,
                                         java.lang.Object primaryKey)
Specified by:
getTagsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext

getTagsEntries

public java.lang.String[] getTagsEntries(java.lang.String className,
                                         java.lang.Object primaryKey)
Specified by:
getTagsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext

getTagsEntries

public java.util.Map getTagsEntries()
Specified by:
getTagsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext

addTagsEntries

public void addTagsEntries(java.lang.Class classObj,
                           java.lang.Object classPK)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Specified by:
addTagsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addTagsEntries

public void addTagsEntries(java.lang.String className,
                           java.lang.Object classPK,
                           java.lang.String[] values)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Specified by:
addTagsEntries in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getDataStrategy

public java.lang.String getDataStrategy()
Specified by:
getDataStrategy in interface com.liferay.portal.kernel.lar.PortletDataContext

getUserIdStrategy

public com.liferay.portal.kernel.lar.UserIdStrategy getUserIdStrategy()
Specified by:
getUserIdStrategy in interface com.liferay.portal.kernel.lar.PortletDataContext

getUserId

public long getUserId(java.lang.String userUuid)
               throws com.liferay.portal.SystemException
Specified by:
getUserId in interface com.liferay.portal.kernel.lar.PortletDataContext
Throws:
com.liferay.portal.SystemException

getZipReader

public com.liferay.portal.kernel.zip.ZipReader getZipReader()
Specified by:
getZipReader in interface com.liferay.portal.kernel.lar.PortletDataContext

getZipWriter

public com.liferay.portal.kernel.zip.ZipWriter getZipWriter()
Specified by:
getZipWriter in interface com.liferay.portal.kernel.lar.PortletDataContext

getPrimaryKeyString

protected java.lang.String getPrimaryKeyString(java.lang.Class classObj,
                                               java.lang.Object primaryKey)

getPrimaryKeyString

protected java.lang.String getPrimaryKeyString(java.lang.String className,
                                               java.lang.Object primaryKey)