public class CmsPreviewService extends CmsGwtService implements I_CmsPreviewService
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
PATTERN_FOCAL_POINT
Regex used to parse the image.focalpoint property.
|
| Constructor and Description |
|---|
CmsPreviewService() |
| Modifier and Type | Method and Description |
|---|---|
CmsImageInfoBean |
getImageInfo(java.lang.String resourcePath,
java.lang.String locale)
Returns the image resource data to be displayed in the preview dialog.
|
static java.lang.String |
getPreviewContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
CmsObject cms,
CmsResource resource,
java.util.Locale locale)
Renders the preview content for the given resource and locale.
|
CmsResourceInfoBean |
getResourceInfo(java.lang.String resourcePath,
java.lang.String locale)
Returns the data to be displayed in the preview dialog.
|
static CmsPoint |
readFocalPoint(CmsObject cms,
CmsResource resource)
Reads the focal point from a resource.
|
void |
readResourceInfo(CmsObject cms,
CmsResource resource,
CmsResourceInfoBean resInfo,
java.lang.String locale)
Retrieves the resource information and puts it into the provided resource info bean.
|
CmsImageInfoBean |
updateImageProperties(java.lang.String resourcePath,
java.lang.String locale,
java.util.Map<java.lang.String,java.lang.String> properties)
Saves the given properties to the resource and returns the data to be displayed in the preview dialog.
|
CmsResourceInfoBean |
updateResourceProperties(java.lang.String resourcePath,
java.lang.String locale,
java.util.Map<java.lang.String,java.lang.String> properties)
Saves the given properties to the resource and returns the data to be displayed in the preview dialog.
|
checkPermissions, clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, setResponse, tryUnlockcheckPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponsedoPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, servicepublic static final java.util.regex.Pattern PATTERN_FOCAL_POINT
public CmsPreviewService()
public static java.lang.String getPreviewContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CmsObject cms, CmsResource resource, java.util.Locale locale)
request - the current servlet requestresponse - the current servlet responsecms - the cms contextresource - the resourcelocale - the content localepublic static CmsPoint readFocalPoint(CmsObject cms, CmsResource resource) throws CmsException
cms - the CMS context to useresource - the resourceCmsException - if something goes wrongpublic CmsImageInfoBean getImageInfo(java.lang.String resourcePath, java.lang.String locale) throws CmsRpcException
I_CmsPreviewServicegetImageInfo in interface I_CmsPreviewServiceresourcePath - the resource pathlocale - the content localeCmsRpcException - if something goes wrongI_CmsPreviewService.getImageInfo(java.lang.String, java.lang.String)public CmsResourceInfoBean getResourceInfo(java.lang.String resourcePath, java.lang.String locale) throws CmsRpcException
I_CmsPreviewServicegetResourceInfo in interface I_CmsPreviewServiceresourcePath - the path to the selected resourcelocale - the content localeCmsRpcException - if something goes wrongI_CmsPreviewService.getResourceInfo(java.lang.String, java.lang.String)public void readResourceInfo(CmsObject cms, CmsResource resource, CmsResourceInfoBean resInfo, java.lang.String locale) throws CmsException
cms - the initialized cms objectresource - the resourceresInfo - the resource info beanlocale - the content localeCmsException - if something goes wrongpublic CmsImageInfoBean updateImageProperties(java.lang.String resourcePath, java.lang.String locale, java.util.Map<java.lang.String,java.lang.String> properties) throws CmsRpcException
I_CmsPreviewServiceupdateImageProperties in interface I_CmsPreviewServiceresourcePath - the path to the selected resourcelocale - the content localeproperties - a map with the key/value pairs of the properties to be updatedCmsRpcException - if something goes wrongI_CmsPreviewService.updateImageProperties(java.lang.String, java.lang.String, java.util.Map)public CmsResourceInfoBean updateResourceProperties(java.lang.String resourcePath, java.lang.String locale, java.util.Map<java.lang.String,java.lang.String> properties) throws CmsRpcException
I_CmsPreviewServiceupdateResourceProperties in interface I_CmsPreviewServiceresourcePath - the path to the selected resourcelocale - the content localeproperties - a map with the key/value pairs of the properties to be updatedCmsRpcException - if something goes wrongI_CmsPreviewService.updateResourceProperties(java.lang.String, java.lang.String, java.util.Map)