Class StagingUtil
Object
com.liferay.exportimport.kernel.staging.StagingUtil
- Author:
- Raymond Augé
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends BaseModel>
voidaddModelToChangesetCollection(T model) static longcopyFromLive(PortletRequest portletRequest) static longcopyFromLive(PortletRequest portletRequest, Portlet portlet) static longcopyRemoteLayouts(long exportImportConfigurationId) static longcopyRemoteLayouts(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) static longcopyRemoteLayouts(long sourceGroupId, boolean privateLayout, Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout) static longcopyRemoteLayouts(ExportImportConfiguration exportImportConfiguration) static voiddeleteLastImportSettings(Group liveGroup, boolean privateLayout) static voiddeleteRecentLayoutRevisionId(long userId, long layoutSetBranchId, long plid) static voiddeleteRecentLayoutRevisionId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid) static JSONArraygetErrorMessagesJSONArray(Locale locale, Map<String, MissingReference> missingReferences) static JSONObjectgetExceptionMessagesJSONObject(Locale locale, Exception exception, ExportImportConfiguration exportImportConfiguration) static GroupgetLiveGroup(long groupId) static GroupgetLiveGroup(Group group) static longgetLiveGroupId(long groupId) static GroupgetPermissionStagingGroup(Group group) static longgetRecentLayoutRevisionId(User user, long layoutSetBranchId, long plid) static longgetRecentLayoutRevisionId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid) static longgetRecentLayoutSetBranchId(User user, long layoutSetId) static longgetRecentLayoutSetBranchId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetId) static LayoutgetRemoteLayout(long userId, long stagingGroupId, long plid) static longgetRemoteLayoutPlid(long userId, long stagingGroupId, long plid) static StringgetRemoteSiteURL(Group stagingGroup, boolean privateLayout) static StringgetSchedulerGroupName(String destinationName, long groupId) static StringgetStagedPortletId(String portletId) static long[]getStagingAndLiveGroupIds(long groupId) static GroupgetStagingGroup(long groupId) static JSONArraygetWarningMessagesJSONArray(Locale locale, Map<String, MissingReference> missingReferences) static WorkflowTaskgetWorkflowTask(long userId, LayoutRevision layoutRevision) static booleanhasRemoteLayout(long userId, long stagingGroupId, long plid) static booleanhasWorkflowTask(long userId, LayoutRevision layoutRevision) static booleanisGroupAccessible(long groupId, long fromGroupId) static booleanisGroupAccessible(Group group, Group fromGroup) static booleanisIncomplete(Layout layout) static booleanisIncomplete(Layout layout, long layoutSetBranchId) static booleanisRemoteLayoutHasPortletId(long userId, long stagingGroupId, long plid, String portletId) static voidpopulateLastPublishDateCounts(PortletDataContext portletDataContext, StagedModelType[] stagedModelTypes) static voidpopulateLastPublishDateCounts(PortletDataContext portletDataContext, String[] classNames) static longpublishLayout(long userId, long plid, long liveGroupId, boolean includeChildren) static longpublishLayouts(long userId, long exportImportConfigurationId) static longpublishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, long[] layoutIds, String name, Map<String, String[]> parameterMap) static longpublishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, long[] layoutIds, Map<String, String[]> parameterMap) static longpublishLayouts(long userId, long sourceGroupId, long targetGroupId, boolean privateLayout, Map<String, String[]> parameterMap) static longpublishLayouts(long userId, ExportImportConfiguration exportImportConfiguration) static longpublishPortlet(long userId, long exportImportConfigurationId) static longpublishPortlet(long userId, long sourceGroupId, long targetGroupId, long sourcePlid, long targetPlid, String portletId, Map<String, String[]> parameterMap) static longpublishPortlet(long userId, ExportImportConfiguration exportImportConfiguration) static longpublishToLive(PortletRequest portletRequest) static longpublishToLive(PortletRequest portletRequest, Portlet portlet) static longpublishToRemote(PortletRequest portletRequest) static <T extends BaseModel>
voidremoveModelFromChangesetCollection(T model) static voidscheduleCopyFromLive(PortletRequest portletRequest) static voidschedulePublishToLive(PortletRequest portletRequest) static voidschedulePublishToRemote(PortletRequest portletRequest) static voidsetRecentLayoutBranchId(User user, long layoutSetBranchId, long plid, long layoutBranchId) static voidsetRecentLayoutBranchId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid, long layoutBranchId) static voidsetRecentLayoutRevisionId(User user, long layoutSetBranchId, long plid, long layoutRevisionId) static voidsetRecentLayoutRevisionId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetBranchId, long plid, long layoutRevisionId) static voidsetRecentLayoutSetBranchId(User user, long layoutSetId, long layoutSetBranchId) static voidsetRecentLayoutSetBranchId(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetId, long layoutSetBranchId) static voidsetRemoteSiteURL(Group stagingGroup, boolean overrideRemoteSiteURL, String remoteSiteURL) static StringstripProtocolFromRemoteAddress(String remoteAddress) static voidtransferFileToRemoteLive(File file, long stagingRequestId, HttpPrincipal httpPrincipal) static voidunscheduleCopyFromLive(PortletRequest portletRequest) static voidunschedulePublishToLive(PortletRequest portletRequest) static voidunschedulePublishToRemote(PortletRequest portletRequest) static voidupdateLastImportSettings(Element layoutElement, Layout layout, PortletDataContext portletDataContext) static voidvalidateRemoteGroupIsSame(long groupId, long remoteGroupId, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection)
-
Constructor Details
-
StagingUtil
public StagingUtil()
-
-
Method Details
-
addModelToChangesetCollection
public static <T extends BaseModel> void addModelToChangesetCollection(T model) throws PortalException - Throws:
PortalException
-
copyFromLive
- Throws:
PortalException
-
copyFromLive
public static long copyFromLive(PortletRequest portletRequest, Portlet portlet) throws PortalException - Throws:
PortalException
-
copyRemoteLayouts
public static long copyRemoteLayouts(ExportImportConfiguration exportImportConfiguration) throws PortalException - Throws:
PortalException
-
copyRemoteLayouts
- Throws:
PortalException
-
copyRemoteLayouts
public static long copyRemoteLayouts(long sourceGroupId, boolean privateLayout, Map<Long, Boolean> layoutIdMap, Map<String, throws PortalExceptionString[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout) - Throws:
PortalException
-
copyRemoteLayouts
public static long copyRemoteLayouts(long sourceGroupId, boolean privateLayout, Map<Long, Boolean> layoutIdMap, String name, Map<String, throws PortalExceptionString[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout) - Throws:
PortalException
-
deleteLastImportSettings
public static void deleteLastImportSettings(Group liveGroup, boolean privateLayout) throws PortalException - Throws:
PortalException
-
deleteRecentLayoutRevisionId
public static void deleteRecentLayoutRevisionId(javax.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
-
getLiveGroup
-
getLiveGroupId
public static long getLiveGroupId(long groupId) -
getPermissionStagingGroup
-
getRecentLayoutRevisionId
public static long getRecentLayoutRevisionId(javax.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(javax.servlet.http.HttpServletRequest httpServletRequest, long layoutSetId) -
getRecentLayoutSetBranchId
-
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
-
getStagedPortletId
-
getStagingAndLiveGroupIds
- Throws:
PortalException
-
getStagingGroup
-
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
-
isGroupAccessible
- Throws:
PortalException
-
isIncomplete
-
isIncomplete
-
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
- Throws:
PortalException
-
publishToLive
public static long publishToLive(PortletRequest portletRequest, Portlet portlet) throws PortalException - Throws:
PortalException
-
publishToRemote
- Throws:
PortalException
-
removeModelFromChangesetCollection
public static <T extends BaseModel> void removeModelFromChangesetCollection(T model) throws PortalException - Throws:
PortalException
-
scheduleCopyFromLive
- Throws:
PortalException
-
schedulePublishToLive
- Throws:
PortalException
-
schedulePublishToRemote
- Throws:
PortalException
-
setRecentLayoutBranchId
public static void setRecentLayoutBranchId(javax.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(javax.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(javax.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
-
transferFileToRemoteLive
public static void transferFileToRemoteLive(File file, long stagingRequestId, HttpPrincipal httpPrincipal) throws Exception - Throws:
Exception
-
unscheduleCopyFromLive
- Throws:
PortalException
-
unschedulePublishToLive
- Throws:
PortalException
-
unschedulePublishToRemote
- 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
-