org.opencms.ade.galleries
Class CmsPreviewService

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.galleries.CmsPreviewService
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, I_CmsPreviewService

public class CmsPreviewService
extends CmsGwtService
implements I_CmsPreviewService

Handles all RPC services related to the gallery preview dialog.

Since:
8.0.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
CmsPreviewService()
           
 
Method Summary
 CmsImageInfoBean getImageInfo(String resourcePath, String locale)
          Returns the image resource data to be displayed in the preview dialog.
 CmsResourceInfoBean getResourceInfo(String resourcePath, String locale)
          Returns the data to be displayed in the preview dialog.
 void readResourceInfo(CmsObject cms, CmsResource resource, CmsResourceInfoBean resInfo, String locale)
          Retrieves the resource information and puts it into the provided resource info bean.
 CmsImageInfoBean syncGetImageInfo(String resourcePath, String locale)
          Returns the image resource data to be displayed in the preview dialog.
 CmsImageInfoBean updateImageProperties(String resourcePath, String locale, Map<String,String> properties)
          Saves the given properties to the resource and returns the data to be displayed in the preview dialog.
 CmsResourceInfoBean updateResourceProperties(String resourcePath, String locale, Map<String,String> properties)
          Saves the given properties to the resource and returns the data to be displayed in the preview dialog.
 
Methods inherited from class org.opencms.gwt.CmsGwtService
checkPermissions, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, 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
 

Constructor Detail

CmsPreviewService

public CmsPreviewService()
Method Detail

getImageInfo

public CmsImageInfoBean getImageInfo(String resourcePath,
                                     String locale)
                              throws CmsRpcException
Description copied from interface: I_CmsPreviewService
Returns the image resource data to be displayed in the preview dialog.

Specified by:
getImageInfo in interface I_CmsPreviewService
Parameters:
resourcePath - the resource path
locale - the content locale
Returns:
the image resource data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPreviewService.getImageInfo(java.lang.String, java.lang.String)

getResourceInfo

public CmsResourceInfoBean getResourceInfo(String resourcePath,
                                           String locale)
                                    throws CmsRpcException
Description copied from interface: I_CmsPreviewService
Returns the data to be displayed in the preview dialog.

Specified by:
getResourceInfo in interface I_CmsPreviewService
Parameters:
resourcePath - the path to the selected resource
locale - the content locale
Returns:
the preview data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPreviewService.getResourceInfo(java.lang.String, java.lang.String)

readResourceInfo

public void readResourceInfo(CmsObject cms,
                             CmsResource resource,
                             CmsResourceInfoBean resInfo,
                             String locale)
                      throws CmsException
Retrieves the resource information and puts it into the provided resource info bean.

Parameters:
cms - the initialized cms object
resource - the resource
resInfo - the resource info bean
locale - the content locale
Throws:
CmsException - if something goes wrong

syncGetImageInfo

public CmsImageInfoBean syncGetImageInfo(String resourcePath,
                                         String locale)
                                  throws CmsRpcException
Description copied from interface: I_CmsPreviewService
Returns the image resource data to be displayed in the preview dialog.

Specified by:
syncGetImageInfo in interface I_CmsPreviewService
Parameters:
resourcePath - the resource path
locale - the content locale
Returns:
the image resource data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPreviewService.syncGetImageInfo(java.lang.String, java.lang.String)

updateImageProperties

public CmsImageInfoBean updateImageProperties(String resourcePath,
                                              String locale,
                                              Map<String,String> properties)
                                       throws CmsRpcException
Description copied from interface: I_CmsPreviewService
Saves the given properties to the resource and returns the data to be displayed in the preview dialog.

Specified by:
updateImageProperties in interface I_CmsPreviewService
Parameters:
resourcePath - the path to the selected resource
locale - the content locale
properties - a map with the key/value pairs of the properties to be updated
Returns:
the updates preview data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPreviewService.updateImageProperties(java.lang.String, java.lang.String, java.util.Map)

updateResourceProperties

public CmsResourceInfoBean updateResourceProperties(String resourcePath,
                                                    String locale,
                                                    Map<String,String> properties)
                                             throws CmsRpcException
Description copied from interface: I_CmsPreviewService
Saves the given properties to the resource and returns the data to be displayed in the preview dialog.

Specified by:
updateResourceProperties in interface I_CmsPreviewService
Parameters:
resourcePath - the path to the selected resource
locale - the content locale
properties - a map with the key/value pairs of the properties to be updated
Returns:
the updates preview data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsPreviewService.updateResourceProperties(java.lang.String, java.lang.String, java.util.Map)