Class StagingUtil

Object
com.liferay.exportimport.kernel.staging.StagingUtil

public class StagingUtil extends Object
Author:
Raymond Augé
  • Constructor Details

    • StagingUtil

      public StagingUtil()
  • Method Details

    • addModelToChangesetCollection

      public static <T extends BaseModel> void addModelToChangesetCollection(T model) throws PortalException
      Throws:
      PortalException
    • copyFromLive

      public static long copyFromLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • copyFromLive

      public static long copyFromLive(jakarta.portlet.PortletRequest portletRequest, Portlet portlet) throws PortalException
      Throws:
      PortalException
    • copyRemoteLayouts

      public static long copyRemoteLayouts(ExportImportConfiguration exportImportConfiguration) throws PortalException
      Throws:
      PortalException
    • copyRemoteLayouts

      public static long copyRemoteLayouts(long exportImportConfigurationId) throws PortalException
      Throws:
      PortalException
    • copyRemoteLayouts

      public static long copyRemoteLayouts(long sourceGroupId, boolean privateLayout, Map<Long,Boolean> layoutIdMap, Map<String,String[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout) throws PortalException
      Throws:
      PortalException
    • copyRemoteLayouts

      public static long copyRemoteLayouts(long sourceGroupId, boolean privateLayout, Map<Long,Boolean> layoutIdMap, String name, Map<String,String[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout) throws PortalException
      Throws:
      PortalException
    • deleteLastImportSettings

      public static void deleteLastImportSettings(Group liveGroup, boolean privateLayout) throws PortalException
      Throws:
      PortalException
    • deleteRecentLayoutRevisionId

      public static void deleteRecentLayoutRevisionId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid)
    • deleteRecentLayoutRevisionId

      public static void deleteRecentLayoutRevisionId(long userId, long layoutSetBranchId, long plid)
    • getErrorMessagesJSONArray

      public static JSONArray getErrorMessagesJSONArray(Locale locale, Map<String,MissingReference> missingReferences)
    • getExceptionMessagesJSONObject

      public static JSONObject getExceptionMessagesJSONObject(Locale locale, Exception exception, ExportImportConfiguration exportImportConfiguration)
    • getLiveGroup

      public static Group getLiveGroup(Group group)
    • getLiveGroup

      public static Group getLiveGroup(long groupId)
    • getLiveGroupId

      public static long getLiveGroupId(long groupId)
    • getPermissionStagingGroup

      public static Group getPermissionStagingGroup(Group group)
    • getRecentLayoutRevisionId

      public static long getRecentLayoutRevisionId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid) throws PortalException
      Throws:
      PortalException
    • getRecentLayoutRevisionId

      public static long getRecentLayoutRevisionId(User user, long layoutSetBranchId, long plid) throws PortalException
      Throws:
      PortalException
    • getRecentLayoutSetBranchId

      public static long getRecentLayoutSetBranchId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetId)
    • getRecentLayoutSetBranchId

      public static long getRecentLayoutSetBranchId(User user, long layoutSetId)
    • getRemoteLayout

      public static Layout getRemoteLayout(long userId, long stagingGroupId, long plid) throws PortalException
      Throws:
      PortalException
    • getRemoteLayoutPlid

      public static long getRemoteLayoutPlid(long userId, long stagingGroupId, long plid) throws PortalException
      Throws:
      PortalException
    • getRemoteSiteURL

      public static String getRemoteSiteURL(Group stagingGroup, boolean privateLayout) throws PortalException
      Throws:
      PortalException
    • getSchedulerGroupName

      public static String getSchedulerGroupName(String destinationName, long groupId)
    • getStagedPortletId

      public static String getStagedPortletId(String portletId)
    • getStagingAndLiveGroupIds

      public static long[] getStagingAndLiveGroupIds(long groupId) throws PortalException
      Throws:
      PortalException
    • getStagingGroup

      public static Group getStagingGroup(long groupId)
    • getWarningMessagesJSONArray

      public static JSONArray getWarningMessagesJSONArray(Locale locale, Map<String,MissingReference> missingReferences)
    • getWorkflowTask

      public static WorkflowTask getWorkflowTask(long userId, LayoutRevision layoutRevision) throws PortalException
      Throws:
      PortalException
    • hasRemoteLayout

      public static boolean hasRemoteLayout(long userId, long stagingGroupId, long plid) throws PortalException
      Throws:
      PortalException
    • hasWorkflowTask

      public static boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision) throws PortalException
      Throws:
      PortalException
    • isGroupAccessible

      public static boolean isGroupAccessible(Group group, Group fromGroup)
    • isGroupAccessible

      public static boolean isGroupAccessible(long groupId, long fromGroupId) throws PortalException
      Throws:
      PortalException
    • isIncomplete

      public static boolean isIncomplete(Layout layout)
    • isIncomplete

      public static boolean isIncomplete(Layout layout, long layoutSetBranchId)
    • isRemoteLayoutHasPortletId

      public static boolean isRemoteLayoutHasPortletId(long userId, long stagingGroupId, long plid, String portletId)
    • populateLastPublishDateCounts

      public static void populateLastPublishDateCounts(PortletDataContext portletDataContext, StagedModelType[] stagedModelTypes) throws PortalException
      Throws:
      PortalException
    • populateLastPublishDateCounts

      public static void populateLastPublishDateCounts(PortletDataContext portletDataContext, String[] classNames) throws PortalException
      Throws:
      PortalException
    • publishLayout

      public static long publishLayout(long userId, long plid, long liveGroupId, boolean includeChildren) throws PortalException
      Throws:
      PortalException
    • publishLayouts

      public static long publishLayouts(long userId, ExportImportConfiguration exportImportConfiguration) throws PortalException
      Throws:
      PortalException
    • publishLayouts

      public static long publishLayouts(long userId, long exportImportConfigurationId) throws PortalException
      Throws:
      PortalException
    • publishLayouts

      public static long publishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, long[] layoutIds, Map<String,String[]> parameterMap) throws PortalException
      Throws:
      PortalException
    • publishLayouts

      public static long publishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, long[] layoutIds, String name, Map<String,String[]> parameterMap) throws PortalException
      Throws:
      PortalException
    • publishLayouts

      public static long publishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, Map<String,String[]> parameterMap) throws PortalException
      Throws:
      PortalException
    • publishPortlet

      public static long publishPortlet(long userId, ExportImportConfiguration exportImportConfiguration) throws PortalException
      Throws:
      PortalException
    • publishPortlet

      public static long publishPortlet(long userId, long exportImportConfigurationId) throws PortalException
      Throws:
      PortalException
    • publishPortlet

      public static long publishPortlet(long userId, long sourceGroupId, long targetGroupId, long sourcePlid, long targetPlid, String portletId, Map<String,String[]> parameterMap) throws PortalException
      Throws:
      PortalException
    • publishToLive

      public static long publishToLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • publishToLive

      public static long publishToLive(jakarta.portlet.PortletRequest portletRequest, Portlet portlet) throws PortalException
      Throws:
      PortalException
    • publishToRemote

      public static long publishToRemote(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • removeModelFromChangesetCollection

      public static <T extends BaseModel> void removeModelFromChangesetCollection(T model) throws PortalException
      Throws:
      PortalException
    • scheduleCopyFromLive

      public static void scheduleCopyFromLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • schedulePublishToLive

      public static void schedulePublishToLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • schedulePublishToRemote

      public static void schedulePublishToRemote(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutBranchId

      public static void setRecentLayoutBranchId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid, long layoutBranchId) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutBranchId

      public static void setRecentLayoutBranchId(User user, long layoutSetBranchId, long plid, long layoutBranchId) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutRevisionId

      public static void setRecentLayoutRevisionId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid, long layoutRevisionId) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutRevisionId

      public static void setRecentLayoutRevisionId(User user, long layoutSetBranchId, long plid, long layoutRevisionId) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutSetBranchId

      public static void setRecentLayoutSetBranchId(jakarta.servlet.http.HttpServletRequest httpServletRequest, long layoutSetId, long layoutSetBranchId) throws PortalException
      Throws:
      PortalException
    • setRecentLayoutSetBranchId

      public static void setRecentLayoutSetBranchId(User user, long layoutSetId, long layoutSetBranchId) throws PortalException
      Throws:
      PortalException
    • setRemoteSiteURL

      public static void setRemoteSiteURL(Group stagingGroup, boolean overrideRemoteSiteURL, String remoteSiteURL) throws PortalException
      Throws:
      PortalException
    • stripProtocolFromRemoteAddress

      public static String stripProtocolFromRemoteAddress(String remoteAddress)
    • transferFileToRemoteLive

      public static void transferFileToRemoteLive(File file, long stagingRequestId, HttpPrincipal httpPrincipal) throws Exception
      Throws:
      Exception
    • unscheduleCopyFromLive

      public static void unscheduleCopyFromLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • unschedulePublishToLive

      public static void unschedulePublishToLive(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • unschedulePublishToRemote

      public static void unschedulePublishToRemote(jakarta.portlet.PortletRequest portletRequest) throws PortalException
      Throws:
      PortalException
    • updateLastImportSettings

      public static void updateLastImportSettings(Element layoutElement, Layout layout, PortletDataContext portletDataContext) throws PortalException
      Throws:
      PortalException
    • validateRemoteGroupIsSame

      public static void validateRemoteGroupIsSame(long groupId, long remoteGroupId, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection) throws PortalException
      Throws:
      PortalException