org.opencms.ade.publish
Class CmsPublishService

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.opencms.gwt.CmsGwtService
                      extended by 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
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.
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
CmsPublishService()
           
 
Method Summary
 CmsWorkflowResponse executeAction(java.util.List<CmsUUID> toPublish, java.util.List<CmsUUID> toRemove, CmsWorkflowAction action)
          Tries to publish a list of resources.
 CmsPublishData getInitData()
          Returns the initial publish data.
 java.util.List<CmsProjectBean> getProjects()
          Gets a list of projects from the server.
 java.util.List<CmsPublishGroup> getResourceGroups(CmsWorkflow workflow, CmsPublishOptions options)
          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.
 
Methods inherited from class org.opencms.gwt.CmsGwtService
checkPermissions, clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, setResponse, tryUnlock
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, 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
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

executeAction

public CmsWorkflowResponse executeAction(java.util.List<CmsUUID> toPublish,
                                         java.util.List<CmsUUID> toRemove,
                                         CmsWorkflowAction action)
                                  throws CmsRpcException
Description copied from interface: I_CmsPublishService
Tries to publish a list of resources.

Specified by:
executeAction in interface I_CmsPublishService
Parameters:
toPublish - list of IDs of resources to publish
toRemove - list of IDs of resources to remove from the publish list
action - the work flow action
Returns:
the workflow response
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPublishService.executeAction(java.util.List, java.util.List, org.opencms.ade.publish.shared.CmsWorkflowAction)

getInitData

public CmsPublishData getInitData()
                           throws CmsRpcException
Description copied from interface: I_CmsPublishService
Returns the initial publish data.

Specified by:
getInitData in interface I_CmsPublishService
Returns:
the initial publish data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPublishService.getInitData()

getProjects

public java.util.List<CmsProjectBean> getProjects()
                                           throws CmsRpcException
Description copied from interface: I_CmsPublishService
Gets a list of projects from the server.

Specified by:
getProjects in interface I_CmsPublishService
Returns:
a list of projects
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPublishService.getProjects()

getResourceGroups

public java.util.List<CmsPublishGroup> getResourceGroups(CmsWorkflow workflow,
                                                         CmsPublishOptions options)
                                                  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 interface I_CmsPublishService
Parameters:
workflow - the selected workflow
options - the publish options for which the publish list should be fetched
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)

getResourceOptions

public CmsPublishOptions getResourceOptions()
                                     throws CmsRpcException
Description copied from interface: I_CmsPublishService
Retrieves the publish options.

Specified by:
getResourceOptions in interface I_CmsPublishService
Returns:
the publish options last used
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPublishService.getResourceOptions()