Package org.opencms.ade.containerpage
Class CmsContainerpageService
- 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.containerpage.CmsContainerpageService
-
- 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_CmsContainerpageService
public class CmsContainerpageService extends CmsGwtService implements I_CmsContainerpageService
The RPC service used by the container-page editor.- Since:
- 8.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADDINFO_EDIT_SMALL_ELEMENTS
Additional info key for storing the "edit small elements" setting on the user.static java.lang.String
ATTR_CLIPBOARD_TAB
Session attribute name used to store the selected clipboard tab.static java.lang.String
MODEL_GROUP_PATH_FRAGMENT
The model group pages path fragment.static java.lang.String
SOURCE_CONTAINERPAGE_ID_SETTING
The source container page id settings key.
-
Constructor Summary
Constructors Constructor Description CmsContainerpageService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToFavoriteList(CmsContainerPageRpcContext context, java.lang.String clientId)
Adds an element specified by it's id to the favorite list.void
addToRecentList(CmsContainerPageRpcContext context, java.lang.String clientId)
Adds an element specified by it's id to the recent list.boolean
checkContainerpageOrElementsChanged(CmsUUID structureId, CmsUUID detailContentId, java.lang.String contentLocale)
Check if a page or its elements have been changed.CmsCreateElementData
checkCreateNewElement(CmsUUID pageStructureId, java.lang.String clientId, java.lang.String resourceType, CmsContainer container, java.lang.String locale)
To create a new element of the given type this method will check if a model resource needs to be selected, otherwise creates the new element.boolean
checkNewWidgetsAvailable(CmsUUID structureId)
Checks whether the Acacia widgets are available for all fields of the content.CmsUUID
convertToServerId(java.lang.String id)
Parses an element id.CmsUUID
copyElement(CmsUUID pageId, CmsUUID originalElementId, java.lang.String locale)
Creates a new element with a given model element and returns the copy'S structure id.CmsContainerElement
createNewElement(CmsUUID pageStructureId, java.lang.String clientId, java.lang.String resourceType, CmsUUID modelResourceStructureId, java.lang.String locale)
Creates a new element of the given type and returns the new element data containing structure id and site path.static java.util.List<CmsModelResourceInfo>
generateModelResourceList(CmsObject cms, java.lang.String resourceType, java.util.List<CmsResource> modelResources, java.util.Locale contentLocale)
Generates the model resource data list.CmsContainerElementBean
getCachedElement(java.lang.String clientId, java.lang.String pageRootPath)
Reads the cached element-bean for the given client-side-id from cache.CmsContainer
getContainerInfo()
This method is used for serialization purposes only.CmsDialogOptionsAndInfo
getDeleteOptions(java.lang.String clientId, CmsUUID pageId, java.lang.String requestParams)
Returns the delete options.CmsDialogOptionsAndInfo
getEditOptions(java.lang.String clientId, CmsUUID pageId, java.lang.String requestParams, boolean isListElement)
Returns the edit options.CmsContainerElement
getElementInfo()
This method is used for serialization purposes only.java.util.Map<java.lang.String,CmsContainerElementData>
getElementsData(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.util.Collection<java.lang.String> clientIds, java.util.Collection<CmsContainer> containers, boolean allwaysCopy, java.lang.String dndSource, java.lang.String locale)
Returns container element data by client id.CmsElementSettingsConfig
getElementSettingsConfig(CmsContainerPageRpcContext context, java.lang.String clientId, java.lang.String containerId, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Returns container element settings config data.java.util.Set<CmsUUID>
getElementsLockedForPublishing(java.util.Set<CmsUUID> idsToCheck)
Checks which structure ids of a given set belong to resources locked for publishing by the current user, and then returns those.CmsContainerElementData
getElementWithSettings(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String uriParams, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.String> settings, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Gets the element data for an id and a map of settings.java.util.List<CmsContainerElementData>
getFavoriteList(CmsUUID pageStructureId, CmsUUID detailContentId, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Returns the container element data of the favorite list.CmsContainerPageGalleryData
getGalleryDataForPage(java.util.List<CmsContainer> containers, CmsUUID elementView, java.lang.String uri, java.lang.String locale)
Returns the gallery configuration data according to the current page containers and the selected element view.CmsContainerElementData
getNewElementData(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String resourceType, java.util.Collection<CmsContainer> containers, java.lang.String localeName)
Returns new container element data for the given resource type name.CmsDialogOptionsAndInfo
getNewOptions(java.lang.String clientId, CmsUUID pageStructureId, java.lang.String requestParams)
Gets the edit handler options for creating a new element.java.util.List<CmsContainerElementData>
getRecentList(CmsUUID pageStructureId, CmsUUID detailContentId, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Returns the container element data of the recent list.CmsRemovedElementStatus
getRemovedElementStatus(java.lang.String id, CmsUUID containerpageId)
Gets the status of a removed element.static java.lang.String
getSerializedContainerInfo(CmsContainer container)
Returns serialized container data.static java.lang.String
getSerializedElementInfo(CmsObject cms, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CmsContainerElementBean elementBean, CmsContainerPageBean page)
Returns the serialized element data.void
handleDelete(java.lang.String clientId, java.lang.String deleteOption, CmsUUID pageId, java.lang.String requestParams)
Handles the element deletion.CmsRemovedElementStatus
internalGetRemovedElementStatus(CmsUUID structureId, CmsUUID containerpageId)
Internal helper method to get the status of a removed element.static boolean
isEditingModelGroups(CmsObject cms, CmsResource containerPage)
Checks whether the current page is a model group page.int
loadClipboardTab()
Loads the index of the clipboard tab last selected by the user.CmsCntPageData
prefetch()
Returns the initialization data.static CmsCntPageData
prefetch(javax.servlet.http.HttpServletRequest request)
Fetches the container page data.CmsUUID
prepareForEdit(java.lang.String clientId, java.lang.String editOption, CmsUUID pageId, java.lang.String requestParams)
Prepares an element to be edited.CmsContainerElementData
replaceElement(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String clientId, java.lang.String replaceId, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Returns the element data to replace a given content element with another while keeping it's settings.void
saveClipboardTab(int tabIndex)
Saves the index of the clipboard tab selected by the user.long
saveContainerpage(CmsUUID pageStructureId, java.util.List<CmsContainer> containers)
Saves the container-page.long
saveDetailContainers(CmsUUID detailId, java.lang.String detailContainerResource, java.util.List<CmsContainer> containers)
Saves the detail containers.CmsContainerElementData
saveElementSettings(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.String> settings, java.util.List<CmsContainer> containers, java.lang.String locale)
Saves the settings for the given element to the container page and returns the updated element data.void
saveFavoriteList(java.util.List<java.lang.String> clientIds, java.lang.String uri)
Saves the favorite list.CmsGroupContainerSaveResult
saveGroupContainer(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, CmsGroupContainer groupContainer, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Saves a group-container element.java.util.Map<java.lang.String,CmsContainerElementData>
saveInheritanceContainer(CmsUUID pageStructureId, CmsUUID detailContentId, CmsInheritanceContainer inheritanceContainer, java.util.Collection<CmsContainer> containers, java.lang.String locale)
Saves an inheritance container.void
saveRecentList(java.util.List<java.lang.String> clientIds, java.lang.String uri)
Saves the recent list.void
setEditSmallElements(boolean editSmallElements)
Enables or disables editing for small elements on page load.void
setElementView(CmsUUID elementView)
Sets the element view.void
setLastPage(CmsUUID pageId, CmsUUID detailId)
Stores information about the container page last edited.void
setSessionCache(CmsADESessionCache cache)
Sets the session cache.static void
unlockPage(CmsObject cms, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Unlocks a page or set of pages if they are locked by the current user.-
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
-
ADDINFO_EDIT_SMALL_ELEMENTS
public static final java.lang.String ADDINFO_EDIT_SMALL_ELEMENTS
Additional info key for storing the "edit small elements" setting on the user.- See Also:
- Constant Field Values
-
ATTR_CLIPBOARD_TAB
public static final java.lang.String ATTR_CLIPBOARD_TAB
Session attribute name used to store the selected clipboard tab.- See Also:
- Constant Field Values
-
MODEL_GROUP_PATH_FRAGMENT
public static final java.lang.String MODEL_GROUP_PATH_FRAGMENT
The model group pages path fragment.- See Also:
- Constant Field Values
-
SOURCE_CONTAINERPAGE_ID_SETTING
public static final java.lang.String SOURCE_CONTAINERPAGE_ID_SETTING
The source container page id settings key.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsContainerpageService
public CmsContainerpageService()
-
-
Method Detail
-
generateModelResourceList
public static java.util.List<CmsModelResourceInfo> generateModelResourceList(CmsObject cms, java.lang.String resourceType, java.util.List<CmsResource> modelResources, java.util.Locale contentLocale) throws CmsException
Generates the model resource data list.- Parameters:
cms
- the cms contextresourceType
- the resource type namemodelResources
- the model resourcecontentLocale
- the content locale- Returns:
- the model resources data
- Throws:
CmsException
- if something goes wrong reading the resource information
-
getSerializedContainerInfo
public static java.lang.String getSerializedContainerInfo(CmsContainer container) throws java.lang.Exception
Returns serialized container data.- Parameters:
container
- the container- Returns:
- the serialized data
- Throws:
java.lang.Exception
- if serialization fails
-
getSerializedElementInfo
public static java.lang.String getSerializedElementInfo(CmsObject cms, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CmsContainerElementBean elementBean, CmsContainerPageBean page) throws java.lang.Exception
Returns the serialized element data.- Parameters:
cms
- the cms contextrequest
- the servlet requestresponse
- the servlet responseelementBean
- the element to serializepage
- the container page- Returns:
- the serialized element data
- Throws:
java.lang.Exception
- if something goes wrong
-
isEditingModelGroups
public static boolean isEditingModelGroups(CmsObject cms, CmsResource containerPage)
Checks whether the current page is a model group page.- Parameters:
cms
- the CMS contextcontainerPage
- the current page- Returns:
true
if the current page is a model group page
-
prefetch
public static CmsCntPageData prefetch(javax.servlet.http.HttpServletRequest request) throws CmsRpcException
Fetches the container page data.- Parameters:
request
- the current request- Returns:
- the container page data
- Throws:
CmsRpcException
- if something goes wrong
-
unlockPage
public static void unlockPage(CmsObject cms, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
Unlocks a page or set of pages if they are locked by the current user.This is not called via the normal GWT-RPC mechanism, but with the browser's sendBeacon function.
- Parameters:
cms
- the CMS contextrequest
- the current requestresponse
- the current response- Throws:
java.lang.Exception
- if something goes wrong
-
addToFavoriteList
public void addToFavoriteList(CmsContainerPageRpcContext context, java.lang.String clientId) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Adds an element specified by it's id to the favorite list.- Specified by:
addToFavoriteList
in interfaceI_CmsContainerpageService
- Parameters:
context
- the rpc contextclientId
- the element id- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.addToFavoriteList(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, java.lang.String)
-
addToRecentList
public void addToRecentList(CmsContainerPageRpcContext context, java.lang.String clientId) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Adds an element specified by it's id to the recent list.- Specified by:
addToRecentList
in interfaceI_CmsContainerpageService
- Parameters:
context
- the rpc contextclientId
- the element id- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.addToRecentList(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, java.lang.String)
-
checkContainerpageOrElementsChanged
public boolean checkContainerpageOrElementsChanged(CmsUUID structureId, CmsUUID detailContentId, java.lang.String contentLocale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Check if a page or its elements have been changed.- Specified by:
checkContainerpageOrElementsChanged
in interfaceI_CmsContainerpageService
- Parameters:
structureId
- the structure id of the resourcedetailContentId
- the structure id of the detail content (may be null)contentLocale
- the content locale- Returns:
- true if there were changes in the page or its elements
- Throws:
CmsRpcException
- if the RPC call fails- See Also:
I_CmsContainerpageService.checkContainerpageOrElementsChanged(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID, java.lang.String)
-
checkCreateNewElement
public CmsCreateElementData checkCreateNewElement(CmsUUID pageStructureId, java.lang.String clientId, java.lang.String resourceType, CmsContainer container, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
To create a new element of the given type this method will check if a model resource needs to be selected, otherwise creates the new element. Returns a bean containing either the new element data or a list of model resources to select.- Specified by:
checkCreateNewElement
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the container page structure idclientId
- the client id of the new element (this will be the structure id of the configured new resource)resourceType
- the resource tape of the new elementcontainer
- the parent containerlocale
- the content locale- Returns:
- the bean containing either the new element data or a list of model resources to select
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.checkCreateNewElement(org.opencms.util.CmsUUID, java.lang.String, java.lang.String, org.opencms.ade.containerpage.shared.CmsContainer, java.lang.String)
-
checkNewWidgetsAvailable
public boolean checkNewWidgetsAvailable(CmsUUID structureId) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Checks whether the Acacia widgets are available for all fields of the content.- Specified by:
checkNewWidgetsAvailable
in interfaceI_CmsContainerpageService
- Parameters:
structureId
- the structure id of the content- Returns:
- true if Acacia widgets are available for all fields
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.checkNewWidgetsAvailable(org.opencms.util.CmsUUID)
-
convertToServerId
public CmsUUID convertToServerId(java.lang.String id) throws CmsIllegalArgumentException
Parses an element id.- Parameters:
id
- the element id- Returns:
- the corresponding structure id
- Throws:
CmsIllegalArgumentException
- if the id has not the right format
-
copyElement
public CmsUUID copyElement(CmsUUID pageId, CmsUUID originalElementId, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Creates a new element with a given model element and returns the copy'S structure id.- Specified by:
copyElement
in interfaceI_CmsContainerpageService
- Parameters:
pageId
- the container page idoriginalElementId
- the model element idlocale
- the content locale- Returns:
- the structure id of the copy
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.copyElement(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID, java.lang.String)
-
createNewElement
public CmsContainerElement createNewElement(CmsUUID pageStructureId, java.lang.String clientId, java.lang.String resourceType, CmsUUID modelResourceStructureId, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Creates a new element of the given type and returns the new element data containing structure id and site path.- Specified by:
createNewElement
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the container page structure idclientId
- the client id of the new element (this will be the structure id of the configured new resource)resourceType
- the resource tape of the new elementmodelResourceStructureId
- the model resource structure idlocale
- the content locale- Returns:
- the new element data containing structure id and site path
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.createNewElement(org.opencms.util.CmsUUID, java.lang.String, java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
-
getCachedElement
public CmsContainerElementBean getCachedElement(java.lang.String clientId, java.lang.String pageRootPath) throws CmsException
Reads the cached element-bean for the given client-side-id from cache.- Parameters:
clientId
- the client-side-idpageRootPath
- the container page root path- Returns:
- the cached container element bean
- Throws:
CmsException
- in case reading the element resource fails
-
getContainerInfo
public CmsContainer getContainerInfo()
Description copied from interface:I_CmsContainerpageService
This method is used for serialization purposes only.- Specified by:
getContainerInfo
in interfaceI_CmsContainerpageService
- Returns:
- container info
- See Also:
I_CmsContainerpageService.getContainerInfo()
-
getDeleteOptions
public CmsDialogOptionsAndInfo getDeleteOptions(java.lang.String clientId, CmsUUID pageId, java.lang.String requestParams) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the delete options.- Specified by:
getDeleteOptions
in interfaceI_CmsContainerpageService
- Parameters:
clientId
- the client element idpageId
- the current page structure idrequestParams
- optional request parameters- Returns:
- the delete options
- Throws:
CmsRpcException
- in case something goes wrong- See Also:
I_CmsContainerpageService.getDeleteOptions(java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
-
getEditOptions
public CmsDialogOptionsAndInfo getEditOptions(java.lang.String clientId, CmsUUID pageId, java.lang.String requestParams, boolean isListElement) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the edit options.- Specified by:
getEditOptions
in interfaceI_CmsContainerpageService
- Parameters:
clientId
- the client element idpageId
- the current page structure idrequestParams
- optional request parametersisListElement
- in case a list element, not a container element is about to be edited- Returns:
- the edit options
- Throws:
CmsRpcException
- in case something goes wrong- See Also:
I_CmsContainerpageService.getEditOptions(java.lang.String, org.opencms.util.CmsUUID, java.lang.String, boolean)
-
getElementInfo
public CmsContainerElement getElementInfo()
Description copied from interface:I_CmsContainerpageService
This method is used for serialization purposes only.- Specified by:
getElementInfo
in interfaceI_CmsContainerpageService
- Returns:
- element info
- See Also:
I_CmsContainerpageService.getElementInfo()
-
getElementsData
public java.util.Map<java.lang.String,CmsContainerElementData> getElementsData(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.util.Collection<java.lang.String> clientIds, java.util.Collection<CmsContainer> containers, boolean allwaysCopy, java.lang.String dndSource, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns container element data by client id.- Specified by:
getElementsData
in interfaceI_CmsContainerpageService
- Parameters:
context
- the rpc contextdetailContentId
- the detail content structure idreqParams
- optional request parametersclientIds
- the requested element id'scontainers
- the containers of the current pageallwaysCopy
-true
in case reading data for a clipboard element used as a copy groupdndSource
- the drag and drop source container (if we are getting the data for the drag and drop case)locale
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getElementsData(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, java.util.Collection, java.util.Collection, boolean, java.lang.String, java.lang.String)
-
getElementSettingsConfig
public CmsElementSettingsConfig getElementSettingsConfig(CmsContainerPageRpcContext context, java.lang.String clientId, java.lang.String containerId, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns container element settings config data.- Specified by:
getElementSettingsConfig
in interfaceI_CmsContainerpageService
- Parameters:
context
- the rpc contextclientId
- the requested element idcontainerId
- the parent container idcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getElementSettingsConfig(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, java.lang.String, java.lang.String, java.util.Collection, java.lang.String)
-
getElementsLockedForPublishing
public java.util.Set<CmsUUID> getElementsLockedForPublishing(java.util.Set<CmsUUID> idsToCheck) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Checks which structure ids of a given set belong to resources locked for publishing by the current user, and then returns those.- Specified by:
getElementsLockedForPublishing
in interfaceI_CmsContainerpageService
- Parameters:
idsToCheck
- the set of ids to check- Returns:
- the subset of ids which belong to resources locked for publishing by the current user
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.getElementsLockedForPublishing(java.util.Set)
-
getElementWithSettings
public CmsContainerElementData getElementWithSettings(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String uriParams, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.String> settings, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Gets the element data for an id and a map of settings.- Specified by:
getElementWithSettings
in interfaceI_CmsContainerpageService
- Parameters:
context
- the RPC contextdetailContentId
- the detail content structure iduriParams
- optional request parametersclientId
- the requested element idssettings
- the settings for which the element data should be loadedcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getElementWithSettings(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, java.lang.String, java.util.Map, java.util.Collection, java.lang.String)
-
getFavoriteList
public java.util.List<CmsContainerElementData> getFavoriteList(CmsUUID pageStructureId, CmsUUID detailContentId, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the container element data of the favorite list.- Specified by:
getFavoriteList
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the container page structure iddetailContentId
- the detail content structure idcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the favorite list element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getFavoriteList(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID, java.util.Collection, java.lang.String)
-
getGalleryDataForPage
public CmsContainerPageGalleryData getGalleryDataForPage(java.util.List<CmsContainer> containers, CmsUUID elementView, java.lang.String uri, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the gallery configuration data according to the current page containers and the selected element view.- Specified by:
getGalleryDataForPage
in interfaceI_CmsContainerpageService
- Parameters:
containers
- the page containerselementView
- the element viewuri
- the page URIlocale
- the content locale- Returns:
- the gallery data
- Throws:
CmsRpcException
- in case something goes wrong- See Also:
I_CmsContainerpageService.getGalleryDataForPage(java.util.List, org.opencms.util.CmsUUID, java.lang.String, java.lang.String)
-
getNewElementData
public CmsContainerElementData getNewElementData(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String resourceType, java.util.Collection<CmsContainer> containers, java.lang.String localeName) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns new container element data for the given resource type name.- Specified by:
getNewElementData
in interfaceI_CmsContainerpageService
- Parameters:
context
- the RPC contextdetailContentId
- the detail content structure idreqParams
- optional request parametersresourceType
- the requested element resource type namecontainers
- the containers of the current pagelocaleName
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getNewElementData(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, java.lang.String, java.util.Collection, java.lang.String)
-
getNewOptions
public CmsDialogOptionsAndInfo getNewOptions(java.lang.String clientId, CmsUUID pageStructureId, java.lang.String requestParams) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Gets the edit handler options for creating a new element.- Specified by:
getNewOptions
in interfaceI_CmsContainerpageService
- Parameters:
clientId
- the client id of the selected elementpageStructureId
- the container page structure idrequestParams
- the request parameter string- Returns:
- the dialog option data from the edit handler
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.getNewOptions(java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
-
getRecentList
public java.util.List<CmsContainerElementData> getRecentList(CmsUUID pageStructureId, CmsUUID detailContentId, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the container element data of the recent list.- Specified by:
getRecentList
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the container page structure iddetailContentId
- the detail content structure idcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the recent list element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.getRecentList(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID, java.util.Collection, java.lang.String)
-
getRemovedElementStatus
public CmsRemovedElementStatus getRemovedElementStatus(java.lang.String id, CmsUUID containerpageId) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Gets the status of a removed element.- Specified by:
getRemovedElementStatus
in interfaceI_CmsContainerpageService
- Parameters:
id
- the client id of the removed elementcontainerpageId
- the id of the page which should be excluded from the relation check, or null if no page should be excluded- Returns:
- the status of the removed element
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.getRemovedElementStatus(java.lang.String, org.opencms.util.CmsUUID)
-
handleDelete
public void handleDelete(java.lang.String clientId, java.lang.String deleteOption, CmsUUID pageId, java.lang.String requestParams) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Handles the element deletion.- Specified by:
handleDelete
in interfaceI_CmsContainerpageService
- Parameters:
clientId
- the client element iddeleteOption
- the selected delete optionpageId
- the current page structure idrequestParams
- optional request parameters- Throws:
CmsRpcException
- in case something goes wrong- See Also:
I_CmsContainerpageService.handleDelete(java.lang.String, java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
-
internalGetRemovedElementStatus
public CmsRemovedElementStatus internalGetRemovedElementStatus(CmsUUID structureId, CmsUUID containerpageId) throws CmsException
Internal helper method to get the status of a removed element.- Parameters:
structureId
- the structure id of the removed elementcontainerpageId
- the id of the page to exclude from the relation check, or null if no page should be excluded- Returns:
- the status of the removed element
- Throws:
CmsException
- in case reading the resource fails
-
loadClipboardTab
public int loadClipboardTab()
Description copied from interface:I_CmsContainerpageService
Loads the index of the clipboard tab last selected by the user.- Specified by:
loadClipboardTab
in interfaceI_CmsContainerpageService
- Returns:
- the clipboard tab index
- See Also:
I_CmsContainerpageService.loadClipboardTab()
-
prefetch
public CmsCntPageData prefetch() throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the initialization data.- Specified by:
prefetch
in interfaceI_CmsContainerpageService
- Returns:
- the initialization data
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.prefetch()
-
prepareForEdit
public CmsUUID prepareForEdit(java.lang.String clientId, java.lang.String editOption, CmsUUID pageId, java.lang.String requestParams) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Prepares an element to be edited.- Specified by:
prepareForEdit
in interfaceI_CmsContainerpageService
- Parameters:
clientId
- the client element ideditOption
- the selected delete optionpageId
- the current page structure idrequestParams
- optional request parameters- Returns:
- the structure ID of the content to edit
- Throws:
CmsRpcException
- in case something goes wrong- See Also:
I_CmsContainerpageService.prepareForEdit(java.lang.String, java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
-
replaceElement
public CmsContainerElementData replaceElement(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String clientId, java.lang.String replaceId, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Returns the element data to replace a given content element with another while keeping it's settings.- Specified by:
replaceElement
in interfaceI_CmsContainerpageService
- Parameters:
context
- the rpc contextdetailContentId
- the detail content structure idreqParams
- optional request parametersclientId
- the id of the element to replacereplaceId
- the id of the replacing elementcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.replaceElement(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, java.lang.String, java.lang.String, java.util.Collection, java.lang.String)
-
saveClipboardTab
public void saveClipboardTab(int tabIndex)
Description copied from interface:I_CmsContainerpageService
Saves the index of the clipboard tab selected by the user.- Specified by:
saveClipboardTab
in interfaceI_CmsContainerpageService
- Parameters:
tabIndex
- the index of the selected clipboard tab- See Also:
I_CmsContainerpageService.saveClipboardTab(int)
-
saveContainerpage
public long saveContainerpage(CmsUUID pageStructureId, java.util.List<CmsContainer> containers) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves the container-page.- Specified by:
saveContainerpage
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the container page structure idcontainers
- the container-page's containers- Returns:
- the server time stamp of time of saving
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveContainerpage(org.opencms.util.CmsUUID, java.util.List)
-
saveDetailContainers
public long saveDetailContainers(CmsUUID detailId, java.lang.String detailContainerResource, java.util.List<CmsContainer> containers) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves the detail containers.- Specified by:
saveDetailContainers
in interfaceI_CmsContainerpageService
- Parameters:
detailId
- the detail content iddetailContainerResource
- the detail container resource pathcontainers
- the container-page's containers- Returns:
- the server time stamp of time of saving
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveDetailContainers(org.opencms.util.CmsUUID, java.lang.String, java.util.List)
-
saveElementSettings
public CmsContainerElementData saveElementSettings(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.String> settings, java.util.List<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves the settings for the given element to the container page and returns the updated element data.- Specified by:
saveElementSettings
in interfaceI_CmsContainerpageService
- Parameters:
context
- the RPC contextdetailContentId
- the detail content structure idreqParams
- optional request parametersclientId
- the requested element idssettings
- the settings for which the element data should be loadedcontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the element data
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveElementSettings(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, java.lang.String, java.util.Map, java.util.List, java.lang.String)
-
saveFavoriteList
public void saveFavoriteList(java.util.List<java.lang.String> clientIds, java.lang.String uri) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves the favorite list.- Specified by:
saveFavoriteList
in interfaceI_CmsContainerpageService
- Parameters:
clientIds
- favorite list element id'suri
- the container page URI- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveFavoriteList(java.util.List, java.lang.String)
-
saveGroupContainer
public CmsGroupContainerSaveResult saveGroupContainer(CmsContainerPageRpcContext context, CmsUUID detailContentId, java.lang.String reqParams, CmsGroupContainer groupContainer, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves a group-container element.- Specified by:
saveGroupContainer
in interfaceI_CmsContainerpageService
- Parameters:
context
- the RPC contextdetailContentId
- the detail content structure idreqParams
- optional request parametersgroupContainer
- the group-container to savecontainers
- the containers of the current pagelocale
- the content locale- Returns:
- the data of the saved group container
- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveGroupContainer(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, org.opencms.util.CmsUUID, java.lang.String, org.opencms.ade.containerpage.shared.CmsGroupContainer, java.util.Collection, java.lang.String)
-
saveInheritanceContainer
public java.util.Map<java.lang.String,CmsContainerElementData> saveInheritanceContainer(CmsUUID pageStructureId, CmsUUID detailContentId, CmsInheritanceContainer inheritanceContainer, java.util.Collection<CmsContainer> containers, java.lang.String locale) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves an inheritance container.- Specified by:
saveInheritanceContainer
in interfaceI_CmsContainerpageService
- Parameters:
pageStructureId
- the current page's structure iddetailContentId
- the detail content structure idinheritanceContainer
- the inheritance container to savecontainers
- the containers of the current pagelocale
- the requested locale- Returns:
- the element data of the saved container
- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.saveInheritanceContainer(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID, org.opencms.ade.containerpage.shared.CmsInheritanceContainer, java.util.Collection, java.lang.String)
-
saveRecentList
public void saveRecentList(java.util.List<java.lang.String> clientIds, java.lang.String uri) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Saves the recent list.- Specified by:
saveRecentList
in interfaceI_CmsContainerpageService
- Parameters:
clientIds
- recent list element id'suri
- the container page URI- Throws:
CmsRpcException
- if something goes wrong processing the request- See Also:
I_CmsContainerpageService.saveRecentList(java.util.List, java.lang.String)
-
setEditSmallElements
public void setEditSmallElements(boolean editSmallElements) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Enables or disables editing for small elements on page load.- Specified by:
setEditSmallElements
in interfaceI_CmsContainerpageService
- Parameters:
editSmallElements
- the defautl setting for the small element editability- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.setEditSmallElements(boolean)
-
setElementView
public void setElementView(CmsUUID elementView)
Description copied from interface:I_CmsContainerpageService
Sets the element view.- Specified by:
setElementView
in interfaceI_CmsContainerpageService
- Parameters:
elementView
- the element view- See Also:
I_CmsContainerpageService.setElementView(org.opencms.util.CmsUUID)
-
setLastPage
public void setLastPage(CmsUUID pageId, CmsUUID detailId) throws CmsRpcException
Description copied from interface:I_CmsContainerpageService
Stores information about the container page last edited.- Specified by:
setLastPage
in interfaceI_CmsContainerpageService
- Parameters:
pageId
- the page iddetailId
- the detail content id- Throws:
CmsRpcException
- if something goes wrong- See Also:
I_CmsContainerpageService.setLastPage(org.opencms.util.CmsUUID, org.opencms.util.CmsUUID)
-
setSessionCache
public void setSessionCache(CmsADESessionCache cache)
Sets the session cache.- Parameters:
cache
- the session cache
-
-