Package org.opencms.ade.sitemap
Class CmsVfsSitemapService
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.sitemap.CmsVfsSitemapService
- 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_CmsSitemapService
Handles all RPC services related to the vfs sitemap.
- Since:
- 8.0.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classHelper class for representing information about a lock.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe path of the JSP used to download aliases.static final StringThe path to the JSP used to upload aliases.static final StringThe show model edit confirm dialog attribute name.Properties to remove from the copied template when creating a new sitemap entry.static final StringThe galleries folder name.static final StringThe configuration key for the functionDetail attribute in the container.info property.Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServletperThreadRequest, perThreadResponse
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringaddAliasImportResult(List<CmsAliasImportResult> results) Adds an alias import result.voidchangeCategory(String entryPoint, CmsUUID id, String title, String name) Sets the name and title of the given category.voidChecks the permissions of the current user to match the required security level.voidcreateCategory(String entryPoint, CmsUUID id, String title, String name) Creates a new category.static CmsClientPropertycreateClientProperty(CmsProperty prop, boolean preserveOrigin) Creates a client property bean from a server-side property.createNewGalleryFolder(String parentFolder, String title, int folderTypeId) Creates a new gallery folder.createNewModelPage(String entryPointUri, String title, String description, CmsUUID copyId, boolean isModelGroup) Creates a new model page.createSubSitemap(CmsUUID entryId) Creates a sub-sitemap of the given sitemap starting from the given entry.voiddisableModelPage(String baseUri, CmsUUID modelPageId, boolean disabled) Sets the disabled flag of a model page within the current sitemap configuration.editAttributeData(CmsUUID rootId) Loads the data for the attribute editor dialog and locks the sitemap configuration.protected CmsVfsSitemapService.LockInfoensureLockAndGetInfo(CmsResource resource) Locks the given resource with a temporary, if not already locked by the current user.getAliasImportResult(String resultKey) Gets the alias import results from the server.Gets the initial data for the bulk alias editor.getCategoryData(String entryPoint) Gets the category data for the given entry point.getChildren(String entryPointUri, CmsUUID entryId, int levels) Returns the sitemap children for the given path.getGalleryData(String entryPointUri) Returns the gallery data to this sub site.getModelInfos(CmsUUID rootId) Gets the model pages for the given structure id of the sitemap root folder.getNewElementInfo(String entryPointUri) Loads the model page data for the "add" menu.getResourceLink(CmsUUID baseId, String sitePath) Fetches the link for a resource selected in the sitemap editor.loadPropertyDataForLocaleCompareView(CmsUUID id, CmsUUID rootId) Loads the data needed by the property editor in the locale comparison view.mergeSubSitemap(String entryPoint, CmsUUID subSitemapId) Merges a sub-sitemap into it's parent sitemap.Returns the initialization data for the given sitemap.static CmsSitemapDataFetches the sitemap data.prepareReloadSitemap(CmsUUID rootId, CmsSitemapData.EditorMode mode) Prepares sitemap reloading for the given sitemap root.voidremoveModelPage(String entryPointUri, CmsUUID id) Removes a model page from the current sitemap configuration.save(String entryPoint, CmsSitemapChange change) Saves the change to the given sitemap.saveAliases(CmsAliasSaveValidationRequest saveRequest) Saves the aliases for the bulk alias editor.protected CmsSitemapChangesaveInternal(String entryPoint, CmsSitemapChange change) Internal method for saving a sitemap.voidsavePropertiesForLocaleCompareMode(CmsUUID id, String newUrlName, List<CmsPropertyModification> propertyChanges, boolean editedName) Saves the changed properties in locale comparison mode.voidsaveSitemapAttributes(CmsUUID rootId, Map<String, String> attributes) Saves the data from the sitemap attribute editor dialog to the sitemap configuration.setDefaultModel(CmsUUID rootId, CmsUUID modelId) Sets the default model page for the given sub-sitemap, returns the updated model info.voidsetEditorMode(CmsSitemapData.EditorMode editorMode) Sets the editor mode in the current user session.voidupdateAliasEditorStatus(boolean editing) Updates the alias editor status.validateAliases(CmsAliasEditValidationRequest validationRequest) Validates the aliases for the bulk alias editor.validateRewriteAliases(CmsRewriteAliasValidationRequest validationRequest) Validates rewrite aliases.Methods inherited from class org.opencms.gwt.CmsGwtServiceclearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, isBroadcastCall, log, log, logError, service, setBroadcastPoll, setCms, setContext, setRequest, setResponse, tryUnlockMethods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServletcheckPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponseMethods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServletdoPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentMethods inherited from class javax.servlet.http.HttpServletdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, serviceMethods inherited from class javax.servlet.GenericServletdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init
- 
Field Details- 
ALIAS_DOWNLOAD_PATHThe path of the JSP used to download aliases.- See Also:
 
- 
ALIAS_IMPORT_PATHThe path to the JSP used to upload aliases.- See Also:
 
- 
ATTR_SHOW_MODEL_EDIT_CONFIRMThe show model edit confirm dialog attribute name.- See Also:
 
- 
FILTER_PROPERTIESProperties to remove from the copied template when creating a new sitemap entry.
- 
GALLERIES_FOLDER_NAMEThe galleries folder name.- See Also:
 
- 
KEY_FUNCTION_DETAILThe configuration key for the functionDetail attribute in the container.info property.- See Also:
 
 
- 
- 
Constructor Details- 
CmsVfsSitemapServicepublic CmsVfsSitemapService()
 
- 
- 
Method Details- 
addAliasImportResultAdds an alias import result.- Parameters:
- results- the list of alias import results to add
- Returns:
- the key to retrieve the alias import results
 
- 
createClientPropertyCreates a client property bean from a server-side property.- Parameters:
- prop- the property from which to create the client property
- preserveOrigin- if true, the origin will be copied into the new object
- Returns:
- the new client property
 
- 
prefetchpublic static CmsSitemapData prefetch(javax.servlet.http.HttpServletRequest request, String sitemapUri) throws CmsRpcException Fetches the sitemap data.- Parameters:
- request- the current request
- sitemapUri- the site relative path
- Returns:
- the sitemap data
- Throws:
- CmsRpcException- if something goes wrong
 
- 
changeCategorypublic void changeCategory(String entryPoint, CmsUUID id, String title, String name) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceSets the name and title of the given category.- Specified by:
- changeCategoryin interface- I_CmsSitemapService
- Parameters:
- entryPoint- the current entry point
- id- the category id
- title- the new title
- name- the new name
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
checkPermissionsDescription copied from class:CmsGwtServiceChecks the permissions of the current user to match the required security level.Note that the current request and response are not available yet. Override if needed. - Overrides:
- checkPermissionsin class- CmsGwtService
- Parameters:
- cms- the current cms object
- Throws:
- CmsRoleViolationException- if the security level can not be satisfied
- See Also:
 
- 
createCategorypublic void createCategory(String entryPoint, CmsUUID id, String title, String name) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceCreates a new category.- Specified by:
- createCategoryin interface- I_CmsSitemapService
- Parameters:
- entryPoint- the entry point
- id- the parent category id
- title- the title
- name- the category name
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
createNewGalleryFolderpublic CmsGalleryFolderEntry createNewGalleryFolder(String parentFolder, String title, int folderTypeId) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceCreates a new gallery folder.- Specified by:
- createNewGalleryFolderin interface- I_CmsSitemapService
- Parameters:
- parentFolder- the parent folder path
- title- the title property
- folderTypeId- the resource type id
- Returns:
- the new gallery folder data
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
createNewModelPagepublic CmsModelPageEntry createNewModelPage(String entryPointUri, String title, String description, CmsUUID copyId, boolean isModelGroup) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceCreates a new model page.- Specified by:
- createNewModelPagein interface- I_CmsSitemapService
- Parameters:
- entryPointUri- the uri of the entry point
- title- the title for the model page
- description- the description for the model page
- copyId- the structure id of the resource to copy to create a new model page; if null, the model page is created as an empty container page
- isModelGroup-- trueto create a new model group page
- Returns:
- a bean representing the created model page
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
createSubSitemapDescription copied from interface:I_CmsSitemapServiceCreates a sub-sitemap of the given sitemap starting from the given entry.- Specified by:
- createSubSitemapin interface- I_CmsSitemapService
- Parameters:
- entryId- the structure id of the sitemap entry to create a sub sitemap of
- Returns:
- the sub-sitemap creation result
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
disableModelPagepublic void disableModelPage(String baseUri, CmsUUID modelPageId, boolean disabled) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceSets the disabled flag of a model page within the current sitemap configuration.- Specified by:
- disableModelPagein interface- I_CmsSitemapService
- Parameters:
- baseUri- the base uri for the current sitemap
- modelPageId- structure id of the model page to remove
- disabled- the disabled flag
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
editAttributeDataDescription copied from interface:I_CmsSitemapServiceLoads the data for the attribute editor dialog and locks the sitemap configuration.- Specified by:
- editAttributeDatain interface- I_CmsSitemapService
- Parameters:
- rootId- the root ID of the current sitemap
- Returns:
- the data for the attribute editor dialog
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getAliasImportResultDescription copied from interface:I_CmsSitemapServiceGets the alias import results from the server.- Specified by:
- getAliasImportResultin interface- I_CmsSitemapService
- Parameters:
- resultKey- the key which identifies the alias import results to get
- Returns:
- the list of alias import results
- See Also:
 
- 
getAliasTableDescription copied from interface:I_CmsSitemapServiceGets the initial data for the bulk alias editor.- Specified by:
- getAliasTablein interface- I_CmsSitemapService
- Returns:
- the initial data for the alias editor
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getCategoryDataDescription copied from interface:I_CmsSitemapServiceGets the category data for the given entry point.- Specified by:
- getCategoryDatain interface- I_CmsSitemapService
- Parameters:
- entryPoint- the entry point
- Returns:
- the category data
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getChildrenpublic CmsClientSitemapEntry getChildren(String entryPointUri, CmsUUID entryId, int levels) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceReturns the sitemap children for the given path.- Specified by:
- getChildrenin interface- I_CmsSitemapService
- Parameters:
- entryPointUri- the URI of the sitemap entry point
- entryId- the entry id
- levels- the count of child levels to read
- Returns:
- the sitemap children
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getGalleryDataDescription copied from interface:I_CmsSitemapServiceReturns the gallery data to this sub site.- Specified by:
- getGalleryDatain interface- I_CmsSitemapService
- Parameters:
- entryPointUri- the sub site folder
- Returns:
- the gallery data to this sub site
- See Also:
 
- 
getModelInfosDescription copied from interface:I_CmsSitemapServiceGets the model pages for the given structure id of the sitemap root folder.- Specified by:
- getModelInfosin interface- I_CmsSitemapService
- Parameters:
- rootId- structure id of a folder
- Returns:
- the model pages available in the given folder
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getNewElementInfoDescription copied from interface:I_CmsSitemapServiceLoads the model page data for the "add" menu.- Specified by:
- getNewElementInfoin interface- I_CmsSitemapService
- Parameters:
- entryPointUri- the entry point uri
- Returns:
- the list of resource info beans for the model pages
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
getResourceLinkDescription copied from interface:I_CmsSitemapServiceFetches the link for a resource selected in the sitemap editor.- Specified by:
- getResourceLinkin interface- I_CmsSitemapService
- Parameters:
- baseId- the structure id of the current sitemap root entry
- sitePath- the site path of a resource
- Returns:
- the link to the resource
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
loadPropertyDataForLocaleCompareViewpublic CmsLocaleComparePropertyData loadPropertyDataForLocaleCompareView(CmsUUID id, CmsUUID rootId) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceLoads the data needed by the property editor in the locale comparison view.- Specified by:
- loadPropertyDataForLocaleCompareViewin interface- I_CmsSitemapService
- Parameters:
- id- the id of the resource for which the property editor should be opened
- rootId- the structure id of the resource which corresponds to the tree root in locale compare mode
- Returns:
- the property data for locale comparison mode
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
mergeSubSitemappublic CmsSitemapChange mergeSubSitemap(String entryPoint, CmsUUID subSitemapId) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceMerges a sub-sitemap into it's parent sitemap.- Specified by:
- mergeSubSitemapin interface- I_CmsSitemapService
- Parameters:
- entryPoint- the sitemap entry point
- subSitemapId- the structure id of the sub sitemap folder
- Returns:
- the result of the merge operation
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
prefetchDescription copied from interface:I_CmsSitemapServiceReturns the initialization data for the given sitemap.- Specified by:
- prefetchin interface- I_CmsSitemapService
- Parameters:
- sitemapUri- the site relative path
- Returns:
- the initialization data
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
removeModelPageDescription copied from interface:I_CmsSitemapServiceRemoves a model page from the current sitemap configuration.- Specified by:
- removeModelPagein interface- I_CmsSitemapService
- Parameters:
- entryPointUri- the base uri for the current sitemap
- id- structure id of the model page to remove
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
savePropertiesForLocaleCompareModepublic void savePropertiesForLocaleCompareMode(CmsUUID id, String newUrlName, List<CmsPropertyModification> propertyChanges, boolean editedName) throws CmsRpcException Description copied from interface:I_CmsSitemapServiceSaves the changed properties in locale comparison mode.- Specified by:
- savePropertiesForLocaleCompareModein interface- I_CmsSitemapService
- Parameters:
- id- the structure id
- newUrlName- the new URL name
- propertyChanges- the property changes
- editedName- true if the name was edited
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
saveSitemapAttributespublic void saveSitemapAttributes(CmsUUID rootId, Map<String, String> attributes) throws CmsRpcExceptionDescription copied from interface:I_CmsSitemapServiceSaves the data from the sitemap attribute editor dialog to the sitemap configuration.- Specified by:
- saveSitemapAttributesin interface- I_CmsSitemapService
- Parameters:
- rootId- the root ID
- attributes- the sitemap attributes
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
setDefaultModelDescription copied from interface:I_CmsSitemapServiceSets the default model page for the given sub-sitemap, returns the updated model info.- Specified by:
- setDefaultModelin interface- I_CmsSitemapService
- Parameters:
- rootId- structure id of the sub-sitemap root folder
- modelId- the id of the model page to set as default
- Returns:
- the updated model info
- Throws:
- CmsRpcException- if something goes wrong
- See Also:
 
- 
updateAliasEditorStatusDescription copied from interface:I_CmsSitemapServiceUpdates the alias editor status.This is used to keep two users from editing the alias table for a site root concurrently. - Specified by:
- updateAliasEditorStatusin interface- I_CmsSitemapService
- Parameters:
- editing- true to indicate that the table is still being edited, false to indicate that the table isn't being edited anymore
- See Also:
 
- 
ensureLockAndGetInfoprotected CmsVfsSitemapService.LockInfo ensureLockAndGetInfo(CmsResource resource) throws CmsException Locks the given resource with a temporary, if not already locked by the current user. Will throw an exception if the resource could not be locked for the current user.- Parameters:
- resource- the resource to lock
- Returns:
- the assigned lock
- Throws:
- CmsException- if the resource could not be locked
 
 
-