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 exportCategories(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportComments(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  com.liferay.portal.kernel.xml.Element exportGroupPermissions(long companyId, long groupId, java.lang.String resourceName, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element parentEl, java.lang.String elName)
           
protected  void exportGroupRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String entityName, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportInheritedPermissions(LayoutCache layoutCache, long companyId, java.lang.String resourceName, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element parentEl, java.lang.String entityName)
           
protected  void exportInheritedRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String entityName, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportPermissions_5(LayoutCache layoutCache, long groupId, java.lang.String resourceName, long resourceId, com.liferay.portal.kernel.xml.Element permissionsEl)
           
protected  void exportPortlet(com.liferay.portal.lar.PortletDataContext context, LayoutCache layoutCache, java.lang.String portletId, com.liferay.portal.model.Layout layout, com.liferay.portal.kernel.xml.Element parentEl, long defaultUserId, boolean exportPermissions, boolean exportPortletArchivedSetups, boolean exportPortletData, boolean exportPortletSetup, boolean exportPortletUserPreferences, boolean exportUserPermissions)
           
protected  void exportPortletData(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.model.Portlet portlet, com.liferay.portal.model.Layout layout, javax.portlet.PortletPreferences portletPreferences, com.liferay.portal.kernel.xml.Element parentEl)
           
 byte[] exportPortletInfo(long plid, long groupId, java.lang.String portletId, java.util.Map<java.lang.String,java.lang.String[]> parameterMap, java.util.Date startDate, java.util.Date endDate)
           
 com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(long plid, long groupId, 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_4(LayoutCache layoutCache, long companyId, long groupId, com.liferay.portal.model.Group guestGroup, java.lang.String resourceName, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element permissionsEl, boolean exportUserPermissions)
           
protected  void exportPortletPermissions_5(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element permissionsEl)
           
protected  void exportPortletPreference(com.liferay.portal.lar.PortletDataContext context, long ownerId, int ownerType, boolean defaultUser, com.liferay.portal.model.PortletPreferences portletPreferences, java.lang.String portletId, long plid, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportPortletPreferences(com.liferay.portal.lar.PortletDataContext context, long ownerId, int ownerType, boolean defaultUser, com.liferay.portal.model.Layout layout, java.lang.String portletId, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportPortletRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String portletId, com.liferay.portal.kernel.xml.Element rolesEl)
           
protected  void exportRatings(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  com.liferay.portal.kernel.xml.Element exportRoles(long companyId, java.lang.String resourceName, int scope, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element parentEl, java.lang.String elName, java.util.List<com.liferay.portal.model.Role> roles)
           
protected  void exportTags(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportUserPermissions(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, java.lang.String resourcePrimKey, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  void exportUserRoles(LayoutCache layoutCache, long companyId, long groupId, java.lang.String resourceName, com.liferay.portal.kernel.xml.Element parentEl)
           
protected  java.lang.String getCommentsPath(com.liferay.portal.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK)
           
protected  java.lang.String getCommentsPath(com.liferay.portal.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.lar.PortletDataContext context, java.lang.String portletId)
           
protected  java.lang.String getPortletPreferencesPath(com.liferay.portal.lar.PortletDataContext context, java.lang.String portletId, long ownerId, int ownerType, long plid)
           
protected  java.lang.String getRatingsPath(com.liferay.portal.lar.PortletDataContext context, java.lang.String className, java.lang.String classPK)
           
protected  java.lang.String getRatingsPath(com.liferay.portal.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,
                                long groupId,
                                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

exportPortletInfoAsStream

public com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(long plid,
                                                                                    long groupId,
                                                                                    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

exportCategories

protected void exportCategories(com.liferay.portal.lar.PortletDataContext context,
                                com.liferay.portal.kernel.xml.Element parentEl)
                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportComments

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

exportGroupPermissions

protected com.liferay.portal.kernel.xml.Element exportGroupPermissions(long companyId,
                                                                       long groupId,
                                                                       java.lang.String resourceName,
                                                                       java.lang.String resourcePrimKey,
                                                                       com.liferay.portal.kernel.xml.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,
                                com.liferay.portal.kernel.xml.Element parentEl)
                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportInheritedPermissions

protected void exportInheritedPermissions(LayoutCache layoutCache,
                                          long companyId,
                                          java.lang.String resourceName,
                                          java.lang.String resourcePrimKey,
                                          com.liferay.portal.kernel.xml.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,
                                    com.liferay.portal.kernel.xml.Element parentEl)
                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportPermissions_5

protected void exportPermissions_5(LayoutCache layoutCache,
                                   long groupId,
                                   java.lang.String resourceName,
                                   long resourceId,
                                   com.liferay.portal.kernel.xml.Element permissionsEl)
                            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.lar.PortletDataContext context,
                             LayoutCache layoutCache,
                             java.lang.String portletId,
                             com.liferay.portal.model.Layout layout,
                             com.liferay.portal.kernel.xml.Element parentEl,
                             long defaultUserId,
                             boolean exportPermissions,
                             boolean exportPortletArchivedSetups,
                             boolean exportPortletData,
                             boolean exportPortletSetup,
                             boolean exportPortletUserPreferences,
                             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.lar.PortletDataContext context,
                                 com.liferay.portal.model.Portlet portlet,
                                 com.liferay.portal.model.Layout layout,
                                 javax.portlet.PortletPreferences portletPreferences,
                                 com.liferay.portal.kernel.xml.Element parentEl)
                          throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportPortletPermissions_4

protected void exportPortletPermissions_4(LayoutCache layoutCache,
                                          long companyId,
                                          long groupId,
                                          com.liferay.portal.model.Group guestGroup,
                                          java.lang.String resourceName,
                                          java.lang.String resourcePrimKey,
                                          com.liferay.portal.kernel.xml.Element permissionsEl,
                                          boolean exportUserPermissions)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportPortletPermissions_5

protected void exportPortletPermissions_5(LayoutCache layoutCache,
                                          long companyId,
                                          long groupId,
                                          java.lang.String resourceName,
                                          java.lang.String resourcePrimKey,
                                          com.liferay.portal.kernel.xml.Element permissionsEl)
                                   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.lar.PortletDataContext context,
                                       long ownerId,
                                       int ownerType,
                                       boolean defaultUser,
                                       com.liferay.portal.model.PortletPreferences portletPreferences,
                                       java.lang.String portletId,
                                       long plid,
                                       com.liferay.portal.kernel.xml.Element parentEl)
                                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportPortletPreferences

protected void exportPortletPreferences(com.liferay.portal.lar.PortletDataContext context,
                                        long ownerId,
                                        int ownerType,
                                        boolean defaultUser,
                                        com.liferay.portal.model.Layout layout,
                                        java.lang.String portletId,
                                        com.liferay.portal.kernel.xml.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,
                                  com.liferay.portal.kernel.xml.Element rolesEl)
                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportRatings

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

exportRoles

protected com.liferay.portal.kernel.xml.Element exportRoles(long companyId,
                                                            java.lang.String resourceName,
                                                            int scope,
                                                            java.lang.String resourcePrimKey,
                                                            com.liferay.portal.kernel.xml.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.lar.PortletDataContext context,
                          com.liferay.portal.kernel.xml.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,
                                     com.liferay.portal.kernel.xml.Element parentEl)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportUserRoles

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

getCommentsPath

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

getCommentsPath

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

getPortletDataPath

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

getPortletPreferencesPath

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

getRatingsPath

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

getRatingsPath

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

hasRole

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