com.liferay.portal.lar
Class PortletExporter

java.lang.Object
  extended by com.liferay.portal.lar.PortletExporter

public class PortletExporter
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan, Joel Kozikowski, Charles May, Raymond Augé, Jorge Ferrer, Bruno Farache

Constructor Summary
PortletExporter()
           
 
Method Summary
protected  void exportComments(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element parentEl)
           
protected  org.dom4j.Element exportGroupPermissions(long companyId, long groupId, java.lang.String resourceName, java.lang.String resourcePrimKey, org.dom4j.Element parentEl, java.lang.String elName)
           
protected  void exportGroupRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String entityName, org.dom4j.Element parentEl)
           
protected  void exportInheritedPermissions(LayoutCache layoutCache, long companyId, java.lang.String resourceName, java.lang.String resourcePrimKey, org.dom4j.Element parentEl, java.lang.String entityName)
           
protected  void exportInheritedRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String entityName, org.dom4j.Element parentEl)
           
protected  void exportPortlet(com.liferay.portal.kernel.lar.PortletDataContext context, LayoutCache layoutCache, java.lang.String portletId, com.liferay.portal.model.Layout layout, org.dom4j.Element parentEl, long defaultUserId, boolean exportPortletData, boolean exportPortletSetup, boolean exportPortletArchivedSetups, boolean exportPortletUserPreferences, boolean exportPermissions, boolean exportUserPermissions)
           
protected  void exportPortletData(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portal.model.Portlet portlet, javax.portlet.PortletPreferences portletPreferences, org.dom4j.Element parentEl)
           
 byte[] exportPortletInfo(long plid, java.lang.String portletId, java.util.Map<java.lang.String,java.lang.String[]> parameterMap, java.util.Date startDate, java.util.Date endDate)
           
protected  void exportPortletPermissions(LayoutCache layoutCache, long companyId, long groupId, com.liferay.portal.model.Group guestGroup, long plid, java.lang.String portletId, org.dom4j.Element permissionsEl, boolean exportUserPermissions)
           
protected  void exportPortletPreference(com.liferay.portal.kernel.lar.PortletDataContext context, long ownerId, int ownerType, boolean defaultUser, com.liferay.portal.model.PortletPreferences portletPreferences, java.lang.String portletId, long plid, org.dom4j.Element parentEl)
           
protected  void exportPortletPreferences(com.liferay.portal.kernel.lar.PortletDataContext context, long ownerId, int ownerType, boolean defaultUser, com.liferay.portal.model.Layout layout, java.lang.String portletId, org.dom4j.Element parentEl)
           
protected  void exportPortletRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String portletId, org.dom4j.Element rolesEl)
           
protected  void exportRatings(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element parentEl)
           
protected  org.dom4j.Element exportRoles(long companyId, java.lang.String resourceName, int scope, java.lang.String resourcePrimKey, org.dom4j.Element parentEl, java.lang.String elName, java.util.List<com.liferay.portal.model.Role> roles)
           
protected  void exportTags(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element parentEl)
           
protected  void exportUserPermissions(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String resourcePrimKey, org.dom4j.Element parentEl)
           
protected  void exportUserRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, org.dom4j.Element parentEl)
           
protected  java.lang.String getCommentPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK)
           
protected  java.lang.String getCommentPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK, com.liferay.portlet.messageboards.model.MBMessage message)
           
protected  java.lang.String getPortletDataPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId)
           
protected  java.lang.String getPortletPreferencesPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, long ownerId, int ownerType, long plid)
           
protected  java.lang.String getRatingPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK)
           
protected  java.lang.String getRatingPath(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK, com.liferay.portlet.ratings.model.RatingsEntry rating)
           
protected  boolean hasRole(java.util.List<com.liferay.portal.model.Role> roles, java.lang.String roleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletExporter

public PortletExporter()
Method Detail

exportPortletInfo

public byte[] exportPortletInfo(long plid,
                                java.lang.String portletId,
                                java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
                                java.util.Date startDate,
                                java.util.Date endDate)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportComments

protected void exportComments(com.liferay.portal.kernel.lar.PortletDataContext context,
                              org.dom4j.Element parentEl)
                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportGroupPermissions

protected org.dom4j.Element exportGroupPermissions(long companyId,
                                                   long groupId,
                                                   java.lang.String resourceName,
                                                   java.lang.String resourcePrimKey,
                                                   org.dom4j.Element parentEl,
                                                   java.lang.String elName)
                                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportGroupRoles

protected void exportGroupRoles(LayoutCache layoutCache,
                                long companyId,
                                long groupId,
                                java.lang.String resourceName,
                                java.lang.String entityName,
                                org.dom4j.Element parentEl)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportInheritedPermissions

protected void exportInheritedPermissions(LayoutCache layoutCache,
                                          long companyId,
                                          java.lang.String resourceName,
                                          java.lang.String resourcePrimKey,
                                          org.dom4j.Element parentEl,
                                          java.lang.String entityName)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportInheritedRoles

protected void exportInheritedRoles(LayoutCache layoutCache,
                                    long companyId,
                                    long groupId,
                                    java.lang.String resourceName,
                                    java.lang.String entityName,
                                    org.dom4j.Element parentEl)
                             throws com.liferay.portal.PortalException,
                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportPortlet

protected void exportPortlet(com.liferay.portal.kernel.lar.PortletDataContext context,
                             LayoutCache layoutCache,
                             java.lang.String portletId,
                             com.liferay.portal.model.Layout layout,
                             org.dom4j.Element parentEl,
                             long defaultUserId,
                             boolean exportPortletData,
                             boolean exportPortletSetup,
                             boolean exportPortletArchivedSetups,
                             boolean exportPortletUserPreferences,
                             boolean exportPermissions,
                             boolean exportUserPermissions)
                      throws com.liferay.portal.PortalException,
                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportPortletData

protected void exportPortletData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                 com.liferay.portal.model.Portlet portlet,
                                 javax.portlet.PortletPreferences portletPreferences,
                                 org.dom4j.Element parentEl)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportPortletPermissions

protected void exportPortletPermissions(LayoutCache layoutCache,
                                        long companyId,
                                        long groupId,
                                        com.liferay.portal.model.Group guestGroup,
                                        long plid,
                                        java.lang.String portletId,
                                        org.dom4j.Element permissionsEl,
                                        boolean exportUserPermissions)
                                 throws com.liferay.portal.PortalException,
                                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportPortletPreference

protected void exportPortletPreference(com.liferay.portal.kernel.lar.PortletDataContext context,
                                       long ownerId,
                                       int ownerType,
                                       boolean defaultUser,
                                       com.liferay.portal.model.PortletPreferences portletPreferences,
                                       java.lang.String portletId,
                                       long plid,
                                       org.dom4j.Element parentEl)
                                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportPortletPreferences

protected void exportPortletPreferences(com.liferay.portal.kernel.lar.PortletDataContext context,
                                        long ownerId,
                                        int ownerType,
                                        boolean defaultUser,
                                        com.liferay.portal.model.Layout layout,
                                        java.lang.String portletId,
                                        org.dom4j.Element parentEl)
                                 throws com.liferay.portal.PortalException,
                                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportPortletRoles

protected void exportPortletRoles(LayoutCache layoutCache,
                                  long companyId,
                                  long groupId,
                                  java.lang.String portletId,
                                  org.dom4j.Element rolesEl)
                           throws com.liferay.portal.PortalException,
                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportRatings

protected void exportRatings(com.liferay.portal.kernel.lar.PortletDataContext context,
                             org.dom4j.Element parentEl)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportRoles

protected org.dom4j.Element exportRoles(long companyId,
                                        java.lang.String resourceName,
                                        int scope,
                                        java.lang.String resourcePrimKey,
                                        org.dom4j.Element parentEl,
                                        java.lang.String elName,
                                        java.util.List<com.liferay.portal.model.Role> roles)
                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportTags

protected void exportTags(com.liferay.portal.kernel.lar.PortletDataContext context,
                          org.dom4j.Element parentEl)
                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportUserPermissions

protected void exportUserPermissions(LayoutCache layoutCache,
                                     long companyId,
                                     long groupId,
                                     java.lang.String resourceName,
                                     java.lang.String resourcePrimKey,
                                     org.dom4j.Element parentEl)
                              throws com.liferay.portal.PortalException,
                                     com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportUserRoles

protected void exportUserRoles(LayoutCache layoutCache,
                               long companyId,
                               long groupId,
                               java.lang.String resourceName,
                               org.dom4j.Element parentEl)
                        throws com.liferay.portal.PortalException,
                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getCommentPath

protected java.lang.String getCommentPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                          java.lang.String className,
                                          java.lang.String classPK)

getCommentPath

protected java.lang.String getCommentPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                          java.lang.String className,
                                          java.lang.String classPK,
                                          com.liferay.portlet.messageboards.model.MBMessage message)

getRatingPath

protected java.lang.String getRatingPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                         java.lang.String className,
                                         java.lang.String classPK)

getRatingPath

protected java.lang.String getRatingPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                         java.lang.String className,
                                         java.lang.String classPK,
                                         com.liferay.portlet.ratings.model.RatingsEntry rating)

getPortletDataPath

protected java.lang.String getPortletDataPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                              java.lang.String portletId)

getPortletPreferencesPath

protected java.lang.String getPortletPreferencesPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                     java.lang.String portletId,
                                                     long ownerId,
                                                     int ownerType,
                                                     long plid)

hasRole

protected boolean hasRole(java.util.List<com.liferay.portal.model.Role> roles,
                          java.lang.String roleName)