Package org.opencms.ade.publish
Class CmsPublishService
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
-
- com.google.gwt.user.server.rpc.RemoteServiceServlet
-
- org.opencms.gwt.CmsGwtService
-
- org.opencms.ade.publish.CmsPublishService
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService
,com.google.gwt.user.server.rpc.SerializationPolicyProvider
,java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,I_CmsPublishService
public class CmsPublishService extends CmsGwtService implements I_CmsPublishService
The implementation of the publish service.- Since:
- 8.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PARAM_CONFIRM
Name for the request parameter to control display of the confirmation dialog.static java.lang.String
PARAM_PUBLISH_PROJECT_ID
The publish project id parameter name.static java.lang.String
PARAM_WORKFLOW_ID
The workflow id parameter name.
-
Constructor Summary
Constructors Constructor Description CmsPublishService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSiblings(java.util.Set<CmsResource> publishResources)
Adds siblings to a set of publish resources.CmsWorkflowResponse
executeAction(CmsWorkflowAction action, CmsWorkflowActionParams params)
Tries to publish a list of resources.CmsPublishData
getInitData(java.util.HashMap<java.lang.String,java.lang.String> params)
Returns the initial publish data.CmsPublishData
getPublishData(CmsObject cms, java.util.HashMap<java.lang.String,java.lang.String> params, java.lang.String workflowId, java.lang.String projectParam, java.util.List<java.lang.String> pathList, java.lang.String closeLink, boolean confirm)
Gets the publish data for the given parameters.CmsPublishGroupList
getResourceGroups(CmsWorkflow workflow, CmsPublishOptions options, boolean projectChanged)
Retrieves the publish list, subdivided into groups based on the time of their last change.CmsPublishOptions
getResourceOptions()
Retrieves the publish options.static CmsPublishData
prefetch(javax.servlet.http.HttpServletRequest request)
Fetches the publish data.static java.lang.String
wrapProjectName(CmsObject cms, java.lang.String name)
Wraps the project name in a message string.-
Methods inherited from class org.opencms.gwt.CmsGwtService
checkPermissions, clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, isBroadcastCall, log, log, logError, service, setBroadcastPoll, setCms, setContext, setRequest, setResponse, tryUnlock
-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponse
-
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
PARAM_CONFIRM
public static final java.lang.String PARAM_CONFIRM
Name for the request parameter to control display of the confirmation dialog.- See Also:
- Constant Field Values
-
PARAM_PUBLISH_PROJECT_ID
public static final java.lang.String PARAM_PUBLISH_PROJECT_ID
The publish project id parameter name.- See Also:
- Constant Field Values
-
PARAM_WORKFLOW_ID
public static final java.lang.String PARAM_WORKFLOW_ID
The workflow id parameter name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsPublishService
public CmsPublishService()
-
-
Method Detail
-
prefetch
public static CmsPublishData prefetch(javax.servlet.http.HttpServletRequest request) throws CmsRpcException
Fetches the publish data.- Parameters:
request
- the servlet request- Returns:
- the publish data
- Throws:
CmsRpcException
- if something goes wrong
-
wrapProjectName
public static java.lang.String wrapProjectName(CmsObject cms, java.lang.String name)
Wraps the project name in a message string.- Parameters:
cms
- the CMS contextname
- the project name- Returns:
- the message for the given project name
-
executeAction
public CmsWorkflowResponse executeAction(CmsWorkflowAction action, CmsWorkflowActionParams params) throws CmsRpcException
Description copied from interface:I_CmsPublishService
Tries to publish a list of resources.- Specified by:
executeAction
in interfaceI_CmsPublishService
- Parameters:
action
- the work flow actionparams
- the data on which to perform the workflow action- Returns:
- the workflow response
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsPublishService.executeAction(org.opencms.ade.publish.shared.CmsWorkflowAction, org.opencms.ade.publish.shared.CmsWorkflowActionParams)
-
getInitData
public CmsPublishData getInitData(java.util.HashMap<java.lang.String,java.lang.String> params) throws CmsRpcException
Description copied from interface:I_CmsPublishService
Returns the initial publish data.- Specified by:
getInitData
in interfaceI_CmsPublishService
- Parameters:
params
- a map of additional publish parameters- Returns:
- the initial publish data
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsPublishService.getInitData(java.util.HashMap)
-
getPublishData
public CmsPublishData getPublishData(CmsObject cms, java.util.HashMap<java.lang.String,java.lang.String> params, java.lang.String workflowId, java.lang.String projectParam, java.util.List<java.lang.String> pathList, java.lang.String closeLink, boolean confirm) throws java.lang.Exception
Gets the publish data for the given parameters.- Parameters:
cms
- the CMS contextparams
- other publish parametersworkflowId
- the workflow idprojectParam
- the projectpathList
- the list of direct publish resource site pathscloseLink
- the close linkconfirm
- true if confirmation dialog should be displayed after closing the dialog- Returns:
- the publish data
- Throws:
java.lang.Exception
- if something goes wrong
-
getResourceGroups
public CmsPublishGroupList getResourceGroups(CmsWorkflow workflow, CmsPublishOptions options, boolean projectChanged) throws CmsRpcException
Description copied from interface:I_CmsPublishService
Retrieves the publish list, subdivided into groups based on the time of their last change.- Specified by:
getResourceGroups
in interfaceI_CmsPublishService
- Parameters:
workflow
- the selected workflowoptions
- the publish options for which the publish list should be fetchedprojectChanged
- indicates whether the reason we get the resource groups is because the user changed the project- Returns:
- the publish list groups
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsPublishService.getResourceGroups(org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions, boolean)
-
getResourceOptions
public CmsPublishOptions getResourceOptions() throws CmsRpcException
Retrieves the publish options.- Specified by:
getResourceOptions
in interfaceI_CmsPublishService
- Returns:
- the publish options last used
- Throws:
CmsRpcException
- if something goes wrong
-
addSiblings
protected void addSiblings(java.util.Set<CmsResource> publishResources)
Adds siblings to a set of publish resources.- Parameters:
publishResources
- the set to which siblings should be added
-
-