Class CmsSitemapController
- java.lang.Object
-
- org.opencms.ade.sitemap.client.control.CmsSitemapController
-
- All Implemented Interfaces:
org.opencms.ade.sitemap.shared.I_CmsSitemapController
public class CmsSitemapController extends java.lang.Object implements org.opencms.ade.sitemap.shared.I_CmsSitemapController
Sitemap editor controller.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.detailpage.CmsDetailPageInfo>
m_allDetailPageInfos
A map of *all* detail page info beans, indexed by page id.protected org.opencms.ade.sitemap.shared.CmsSitemapData
m_data
The sitemap data.protected org.opencms.ade.sitemap.shared.CmsDetailPageTable
m_detailPageTable
The detail page table.protected com.google.gwt.event.shared.SimpleEventBus
m_eventBus
The event bus.static java.lang.String
NEW_ENTRY_NAME
The name to use for new entries.
-
Constructor Summary
Constructors Constructor Description CmsSitemapController()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistration
addChangeHandler(I_CmsSitemapChangeHandler handler)
Adds a new change event handler.void
addDetailPageInfo(org.opencms.ade.detailpage.CmsDetailPageInfo info)
Adds a new detail page information bean.com.google.gwt.event.shared.HandlerRegistration
addLoadHandler(I_CmsSitemapLoadHandler handler)
Adds a new load event handler.void
addPropertyUpdateHandler(I_CmsPropertyUpdateHandler handler)
Adds a handler for property changes caused by user edits.void
addToNavigation(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Adds the entry to the navigation.protected void
applyChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change)
Fires a sitemap change event.void
bump(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Makes the given sitemap entry the default detail page for its detail page type.void
changeCategory(org.opencms.util.CmsUUID id, java.lang.String title, java.lang.String name)
Changes the given category.void
clearDeletedList()
Clears the deleted clip-board list and commits the change.void
clearModifiedList()
Clears the modified clip-board list and commits the change.protected void
commitChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change, com.google.gwt.user.client.Command callback)
Adds a change to the queue.void
create(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, int resourceTypeId, org.opencms.util.CmsUUID copyResourceId, java.lang.String parameter, boolean isNewSitemap)
Registers a new sitemap entry.void
createCategory(org.opencms.util.CmsUUID id, java.lang.String title, java.lang.String name)
Creates a new category.void
createNewGallery(org.opencms.util.CmsUUID parentId, int galleryTypeId, java.lang.String title)
Creates a new gallery folder of the given type.void
createNewModelPage(java.lang.String title, java.lang.String description, org.opencms.util.CmsUUID copyId, boolean isModelGroup)
Creates a new model page.void
createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, java.lang.String sitemapFolderType)
Creates a new sub-entry which is a subsitemap.void
createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, java.lang.String sitemapType)
Creates a sitemap folder.void
createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent)
Creates a new sub-entry of an existing sitemap entry.void
createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, org.opencms.util.CmsUUID structureId)
Creates a new sub-entry of an existing sitemap entry.void
createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, org.opencms.util.CmsUUID structureId)
Registers a new sitemap entry.void
createSubSitemap(org.opencms.util.CmsUUID entryId)
Creates a sub-sitemap from the subtree of the current sitemap starting at the given entry.void
delete(java.lang.String sitePath)
Deletes the given entry and all its descendants.void
deleteCategory(org.opencms.util.CmsUUID id)
Deletes a category.void
disableModelPage(org.opencms.util.CmsUUID id, boolean disable)
Disables the given model page entry within the configuration.void
edit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, CmsReloadMode reloadStatus)
Edits the given sitemap entry.void
editAndChangeName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String newUrlName, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean keepNewStatus, CmsReloadMode reloadStatus)
Edits an entry and changes its URL name.static void
editPropertiesForLocaleCompareMode(org.opencms.ade.sitemap.shared.CmsLocaleComparePropertyData data, org.opencms.util.CmsUUID ownId, org.opencms.util.CmsUUID defaultFileId, java.lang.String noEditReason)
Opens the property editor for locale compare mode.void
ensureUniqueName(java.lang.String parentFolder, java.lang.String newName, I_CmsSimpleCallback<java.lang.String> callback)
Ensure the uniqueness of a given URL-name within the children of the given parent folder.void
ensureUniqueName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, java.lang.String newName, I_CmsSimpleCallback<java.lang.String> callback)
Ensure the uniqueness of a given URL-name within the children of the given parent site-map entry.void
executePropertyModification(org.opencms.gwt.shared.property.CmsPropertyModification propMod)
Applies the given property modification.org.opencms.ade.sitemap.shared.CmsSitemapCategoryData
getCategoryData()
Gets the category data.protected org.opencms.ade.sitemap.shared.CmsSitemapChange
getChangeForEdit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges)
Creates a change object for an edit operation.void
getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, boolean continueIfParentNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Retrieves the child entries of the given node from the server.void
getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Retrieves the child entries of the given node from the server.org.opencms.ade.sitemap.shared.CmsSitemapData
getData()
Returns the sitemap data.org.opencms.ade.detailpage.CmsDetailPageInfo
getDetailPageInfo(org.opencms.util.CmsUUID id)
Returns the detail page info for a given entry id.org.opencms.ade.sitemap.shared.CmsDetailPageTable
getDetailPageTable()
Returns the detail page table.java.lang.String
getEffectiveProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the effective value of a property value for a sitemap entry.org.opencms.gwt.shared.property.CmsClientProperty
getEffectivePropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the value of a property which is effective at a given sitemap entry.java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>
getEntriesById(java.util.Collection<org.opencms.util.CmsUUID> ids)
Returns all entries with an id from a given list.org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
getEntry(java.lang.String entryPath)
Returns the tree entry with the given path.org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
getEntryById(org.opencms.util.CmsUUID id)
Finds an entry by id.protected java.lang.String
getEntryPoint()
Returns the URI of the current sitemap.org.opencms.ade.sitemap.shared.CmsGalleryType
getGalleryType(java.lang.Integer typeId)
Returns the gallery type with the given id.java.lang.String
getInheritedProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the value for a property which a sitemap entry would inherit if it didn't have its own properties.org.opencms.gwt.shared.property.CmsClientProperty
getInheritedPropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the property object which would be inherited by a sitemap entry.java.util.List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>
getLoadedDescendants(java.lang.String path)
Returns a list of all descendant sitemap entries of a given path which have already been loaded on the client.java.lang.String
getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Returns the no edit reason ornull
if editing is allowed.java.lang.String
getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, boolean checkChildLocks)
Returns the no edit reason ornull
if editing is allowed.org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
getParentEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Returns the parent entry of a sitemap entry, or null if it is the root entry.protected java.lang.String
getPath(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String newUrlName)
Helper method for getting the full path of a sitemap entry whose URL name is being edited.java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty>
getPropertiesForId(org.opencms.util.CmsUUID id)
Gets the properties for a given structure id.org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync
getService()
Returns the sitemap service instance.protected org.opencms.gwt.shared.rpc.I_CmsVfsServiceAsync
getVfsService()
Returns the sitemap service instance.void
gotoParentSitemap()
Leaves the current sitemap to open the parent sitemap.void
hideInNavigation(org.opencms.util.CmsUUID entryId)
Hides the entry within the site navigation.protected void
initDetailPageInfos()
Initializes the detail page information.boolean
isDetailPage(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Checks whether this entry belongs to a detail page.boolean
isDetailPage(org.opencms.util.CmsUUID id)
Returns true if the id is the id of a detail page.boolean
isEditable()
Checks if the current sitemap is editable.boolean
isHiddenProperty(java.lang.String propertyName)
Checks whether a string is the name of a hidden property.boolean
isLocaleComparisonEnabled()
Returns true if the locale comparison mode is enabled.boolean
isRoot(java.lang.String sitePath)
Checks if the given site path is the sitemap root.void
leaveEditor(java.lang.String target)
Ask to save the page before leaving, if necessary.void
loadCategories(boolean openLocalCategories, org.opencms.util.CmsUUID openItemId)
Loads and displays the category data.void
loadGalleries()
Loads all available galleries for the current sub site.void
loadModelPages()
Loads the model pages.void
loadNewElementInfo(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Loads the new element info.void
loadPath(java.lang.String sitePath)
Loads all entries on the given path.void
loadPath(java.lang.String sitePath, boolean continueIfNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Loads all entries on the given path.void
loadPath(java.lang.String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Loads the sitemap entry for the given site path.protected void
makeNewEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, I_CmsSimpleCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Creates a new client sitemap entry bean to use for the RPC call which actually creates the entry on the server side.void
mergeSubSitemap(org.opencms.util.CmsUUID entryId)
Merges a subsitemap at the given id back into this sitemap.void
move(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String toPath, int position)
Moves the given sitemap entry with all its descendants to the new position.void
openPropertyDialogForVaadin(org.opencms.util.CmsUUID structureId, org.opencms.util.CmsUUID rootId)
Opens the property dialog for the locale comparison mode.void
openSiteMap(java.lang.String sitePath)
Opens the site-map specified.void
openSiteMap(java.lang.String sitePath, boolean siteChange)
Opens the site-map specified.void
recomputeProperties()
Recomputes properties for all sitemap entries.protected void
recomputeProperties(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Recomputes the properties for a client sitemap entry.void
refreshRoot(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Refreshes the root entry.void
registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
void
registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String oldPath)
void
removeFromNavigation(org.opencms.util.CmsUUID entryId)
Removes the entry with the given site-path from navigation.void
removeModelPage(org.opencms.util.CmsUUID id, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> asyncCallback)
Removes a model page from the sitemap's configuration.java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty>
replaceProperties(org.opencms.util.CmsUUID id, java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> properties)
static <A,B>
BsafeLookup(java.util.Map<A,B> map, A key)
Helper method for looking up a value in a map which may be null.void
setEditorModeInSession(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode)
Sets the editor mode in the user session.void
showInNavigation(org.opencms.util.CmsUUID entryId)
Shows a formerly hidden entry in the navigation.void
undelete(org.opencms.util.CmsUUID entryId, java.lang.String sitePath)
Undeletes the resource with the given structure id.void
updateEntry(java.lang.String sitePath)
Updates the given entry.void
updateEntry(org.opencms.util.CmsUUID entryId)
Updates the given entry.void
updateEntry(org.opencms.util.CmsUUID entryId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Updates the given entry.void
updateSingleEntry(org.opencms.util.CmsUUID entryId)
Updates the given entry only, not evaluating any child changes.
-
-
-
Field Detail
-
NEW_ENTRY_NAME
public static final java.lang.String NEW_ENTRY_NAME
The name to use for new entries.- See Also:
- Constant Field Values
-
m_allDetailPageInfos
protected java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.detailpage.CmsDetailPageInfo> m_allDetailPageInfos
A map of *all* detail page info beans, indexed by page id.
-
m_data
protected org.opencms.ade.sitemap.shared.CmsSitemapData m_data
The sitemap data.
-
m_detailPageTable
protected org.opencms.ade.sitemap.shared.CmsDetailPageTable m_detailPageTable
The detail page table.
-
m_eventBus
protected com.google.gwt.event.shared.SimpleEventBus m_eventBus
The event bus.
-
-
Constructor Detail
-
CmsSitemapController
public CmsSitemapController()
Constructor.
-
-
Method Detail
-
editPropertiesForLocaleCompareMode
public static void editPropertiesForLocaleCompareMode(org.opencms.ade.sitemap.shared.CmsLocaleComparePropertyData data, org.opencms.util.CmsUUID ownId, org.opencms.util.CmsUUID defaultFileId, java.lang.String noEditReason)
Opens the property editor for locale compare mode.- Parameters:
data
- the data used by the property editorownId
- the iddefaultFileId
- the default file idnoEditReason
- the reason the properties can't be edited
-
safeLookup
public static <A,B> B safeLookup(java.util.Map<A,B> map, A key)
Helper method for looking up a value in a map which may be null.- Type Parameters:
A
- the key typeB
- the value type- Parameters:
map
- the map (which may be null)key
- the map key- Returns:
- the value of the map at the given key, or null if the map is null
-
addChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(I_CmsSitemapChangeHandler handler)
Adds a new change event handler.- Parameters:
handler
- the handler to add- Returns:
- the handler registration
-
addDetailPageInfo
public void addDetailPageInfo(org.opencms.ade.detailpage.CmsDetailPageInfo info)
Adds a new detail page information bean.- Parameters:
info
- the detail page information bean to add
-
addLoadHandler
public com.google.gwt.event.shared.HandlerRegistration addLoadHandler(I_CmsSitemapLoadHandler handler)
Adds a new load event handler.- Parameters:
handler
- the handler to add- Returns:
- the handler registration
-
addPropertyUpdateHandler
public void addPropertyUpdateHandler(I_CmsPropertyUpdateHandler handler)
Adds a handler for property changes caused by user edits.- Parameters:
handler
- a new handler for property updates caused by the user
-
addToNavigation
public void addToNavigation(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Adds the entry to the navigation.- Parameters:
entry
- the entry
-
bump
public void bump(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Makes the given sitemap entry the default detail page for its detail page type.- Parameters:
entry
- an entry representing a detail page
-
changeCategory
public void changeCategory(org.opencms.util.CmsUUID id, java.lang.String title, java.lang.String name)
Changes the given category.- Parameters:
id
- the category idtitle
- the new category titlename
- the new category name
-
clearDeletedList
public void clearDeletedList()
Clears the deleted clip-board list and commits the change.
-
clearModifiedList
public void clearModifiedList()
Clears the modified clip-board list and commits the change.
-
create
public void create(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, int resourceTypeId, org.opencms.util.CmsUUID copyResourceId, java.lang.String parameter, boolean isNewSitemap)
Registers a new sitemap entry.- Parameters:
newEntry
- the new entryparentId
- the parent entry idresourceTypeId
- the resource type idcopyResourceId
- the copy resource idparameter
- an additional parameter which may contain more information needed to create the new resourceisNewSitemap
- a flag controlling whether a new sitemap should be created
-
createCategory
public void createCategory(org.opencms.util.CmsUUID id, java.lang.String title, java.lang.String name)
Creates a new category.- Parameters:
id
- the parent category id, or the null uuid for a new top-level categorytitle
- the title of the categoryname
- the name of the category
-
createNewGallery
public void createNewGallery(org.opencms.util.CmsUUID parentId, int galleryTypeId, java.lang.String title)
Creates a new gallery folder of the given type.- Parameters:
parentId
- the parent folder idgalleryTypeId
- the folder type idtitle
- the folder title
-
createNewModelPage
public void createNewModelPage(java.lang.String title, java.lang.String description, org.opencms.util.CmsUUID copyId, boolean isModelGroup)
Creates a new model page.- Parameters:
title
- the title of the model pagedescription
- the description of the model pagecopyId
- the structure id of the resource which should be used as a copy model for the new pageisModelGroup
- in case of a model group page
-
createSitemapSubEntry
public void createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, java.lang.String sitemapType)
Creates a sitemap folder.- Parameters:
newEntry
- the new entryparentId
- the entry parent idsitemapType
- the resource type for the subsitemap folder
-
createSitemapSubEntry
public void createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, java.lang.String sitemapFolderType)
Creates a new sub-entry which is a subsitemap.- Parameters:
parent
- the parent entrysitemapFolderType
- the sitemap folder type
-
createSubEntry
public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent)
Creates a new sub-entry of an existing sitemap entry.- Parameters:
parent
- the entry to which a new sub-entry should be added
-
createSubEntry
public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, org.opencms.util.CmsUUID structureId)
Creates a new sub-entry of an existing sitemap entry.- Parameters:
parent
- the entry to which a new sub-entry should be addedstructureId
- the structure id of the model page (if null, uses default model page)
-
createSubEntry
public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, org.opencms.util.CmsUUID structureId)
Registers a new sitemap entry.- Parameters:
newEntry
- the new entryparentId
- the parent entry idstructureId
- the structure id of the model page (if null, uses default model page)
-
createSubSitemap
public void createSubSitemap(org.opencms.util.CmsUUID entryId)
Creates a sub-sitemap from the subtree of the current sitemap starting at the given entry.- Parameters:
entryId
- the id of the entry
-
delete
public void delete(java.lang.String sitePath)
Deletes the given entry and all its descendants.- Parameters:
sitePath
- the site path of the entry to delete
-
deleteCategory
public void deleteCategory(org.opencms.util.CmsUUID id)
Deletes a category.- Parameters:
id
- the id of the category
-
disableModelPage
public void disableModelPage(org.opencms.util.CmsUUID id, boolean disable)
Disables the given model page entry within the configuration.- Parameters:
id
- the entry iddisable
-true
to disable the entry
-
edit
public void edit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, CmsReloadMode reloadStatus)
Edits the given sitemap entry.- Parameters:
entry
- the sitemap entry to updatepropertyChanges
- the property changesreloadStatus
- a value indicating which entries need to be reloaded after the change
-
editAndChangeName
public void editAndChangeName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String newUrlName, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean keepNewStatus, CmsReloadMode reloadStatus)
Edits an entry and changes its URL name.- Parameters:
entry
- the entry which is being editednewUrlName
- the new URL name of the entrypropertyChanges
- the property changeskeepNewStatus
-true
if the entry should keep it's new statusreloadStatus
- a value indicating which entries need to be reloaded after the change
-
ensureUniqueName
public void ensureUniqueName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, java.lang.String newName, I_CmsSimpleCallback<java.lang.String> callback)
Ensure the uniqueness of a given URL-name within the children of the given parent site-map entry.- Parameters:
parent
- the parent entrynewName
- the proposed namecallback
- the callback to execute
-
ensureUniqueName
public void ensureUniqueName(java.lang.String parentFolder, java.lang.String newName, I_CmsSimpleCallback<java.lang.String> callback)
Ensure the uniqueness of a given URL-name within the children of the given parent folder.- Parameters:
parentFolder
- the parent foldernewName
- the proposed namecallback
- the callback to execute
-
executePropertyModification
public void executePropertyModification(org.opencms.gwt.shared.property.CmsPropertyModification propMod)
Applies the given property modification.- Parameters:
propMod
- the property modification to apply
-
getCategoryData
public org.opencms.ade.sitemap.shared.CmsSitemapCategoryData getCategoryData()
Gets the category data.- Returns:
- the category data
-
getChildren
public void getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Retrieves the child entries of the given node from the server.- Parameters:
entryId
- the entry idsetOpen
- if the entry should be openedcallback
- the callback to execute after the children have been loaded
-
getChildren
public void getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, boolean continueIfParentNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Retrieves the child entries of the given node from the server.- Parameters:
entryId
- the entry idsetOpen
- if the entry should be openedcontinueIfParentNotLoaded
- if false, and the entry identified by the id has not been loaded, stop; else store the entry in memorycallback
- the callback to execute after the children have been loaded
-
getData
public org.opencms.ade.sitemap.shared.CmsSitemapData getData()
Returns the sitemap data.- Returns:
- the sitemap data
-
getDetailPageInfo
public org.opencms.ade.detailpage.CmsDetailPageInfo getDetailPageInfo(org.opencms.util.CmsUUID id)
Returns the detail page info for a given entry id.- Parameters:
id
- a sitemap entry id- Returns:
- the detail page info for that id
-
getDetailPageTable
public org.opencms.ade.sitemap.shared.CmsDetailPageTable getDetailPageTable()
Returns the detail page table.- Returns:
- the detail page table
-
getEffectiveProperty
public java.lang.String getEffectiveProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the effective value of a property value for a sitemap entry.- Parameters:
entry
- the sitemap entryname
- the name of the property- Returns:
- the effective value
-
getEffectivePropertyObject
public org.opencms.gwt.shared.property.CmsClientProperty getEffectivePropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the value of a property which is effective at a given sitemap entry.- Parameters:
entry
- the sitemap entryname
- the name of the property- Returns:
- the effective property value
-
getEntriesById
public java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> getEntriesById(java.util.Collection<org.opencms.util.CmsUUID> ids)
Returns all entries with an id from a given list.- Parameters:
ids
- a list of sitemap entry ids- Returns:
- all entries whose id is contained in the id list
-
getEntry
public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getEntry(java.lang.String entryPath)
Returns the tree entry with the given path.- Parameters:
entryPath
- the path to look for- Returns:
- the tree entry with the given path, or
null
if not found
-
getEntryById
public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getEntryById(org.opencms.util.CmsUUID id)
Finds an entry by id.- Parameters:
id
- the id of the entry to find- Returns:
- the found entry, or null if the entry wasn't found
-
getGalleryType
public org.opencms.ade.sitemap.shared.CmsGalleryType getGalleryType(java.lang.Integer typeId)
Returns the gallery type with the given id.- Parameters:
typeId
- the type id- Returns:
- the gallery type
-
getInheritedProperty
public java.lang.String getInheritedProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the value for a property which a sitemap entry would inherit if it didn't have its own properties.- Parameters:
entry
- the sitemap entryname
- the property name- Returns:
- the inherited property value
-
getInheritedPropertyObject
public org.opencms.gwt.shared.property.CmsClientProperty getInheritedPropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String name)
Gets the property object which would be inherited by a sitemap entry.- Parameters:
entry
- the sitemap entryname
- the name of the property- Returns:
- the property object which would be inherited
-
getLoadedDescendants
public java.util.List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> getLoadedDescendants(java.lang.String path)
Returns a list of all descendant sitemap entries of a given path which have already been loaded on the client.- Parameters:
path
- the path for which the descendants should be collected- Returns:
- the list of descendant sitemap entries
-
getNoEditReason
public java.lang.String getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Returns the no edit reason ornull
if editing is allowed.- Parameters:
entry
- the entry to get the no edit reason for- Returns:
- the no edit reason
-
getNoEditReason
public java.lang.String getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, boolean checkChildLocks)
Returns the no edit reason ornull
if editing is allowed.- Parameters:
entry
- the entry to get the no edit reason forcheckChildLocks
- true if locks of children should be checked- Returns:
- the no edit reason
-
getParentEntry
public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getParentEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Returns the parent entry of a sitemap entry, or null if it is the root entry.- Parameters:
entry
- a sitemap entry- Returns:
- the parent entry or null
-
getPropertiesForId
public java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> getPropertiesForId(org.opencms.util.CmsUUID id)
Gets the properties for a given structure id.- Specified by:
getPropertiesForId
in interfaceorg.opencms.ade.sitemap.shared.I_CmsSitemapController
- Parameters:
id
- the structure id of a sitemap entry- Returns:
- the properties for that structure id
-
getService
public org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync getService()
Returns the sitemap service instance.- Returns:
- the sitemap service instance
-
gotoParentSitemap
public void gotoParentSitemap()
Leaves the current sitemap to open the parent sitemap.
-
hideInNavigation
public void hideInNavigation(org.opencms.util.CmsUUID entryId)
Hides the entry within the site navigation.Hidden entries will still be visible in the navigation mode of the sitemap editor. They will also have a NavText and a NavPos. Only when using the NavBuilder get navigation for folder method, they will not be included.
- Parameters:
entryId
- the entry id
-
isDetailPage
public boolean isDetailPage(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Checks whether this entry belongs to a detail page.- Parameters:
entry
- the entry to check- Returns:
- true if this entry belongs to a detail page
-
isDetailPage
public boolean isDetailPage(org.opencms.util.CmsUUID id)
Returns true if the id is the id of a detail page.- Parameters:
id
- the sitemap entry id- Returns:
- true if the id is the id of a detail page entry
-
isEditable
public boolean isEditable()
Checks if the current sitemap is editable.- Returns:
true
if the current sitemap is editable
-
isHiddenProperty
public boolean isHiddenProperty(java.lang.String propertyName)
Checks whether a string is the name of a hidden property.A hidden property is a property which should not appear in the property editor because it requires special treatment.
- Parameters:
propertyName
- the property name which should be checked- Returns:
- true if the argument is the name of a hidden property
-
isLocaleComparisonEnabled
public boolean isLocaleComparisonEnabled()
Returns true if the locale comparison mode is enabled.- Returns:
- true if the locale comparison mode is enabled
-
isRoot
public boolean isRoot(java.lang.String sitePath)
Checks if the given site path is the sitemap root.- Parameters:
sitePath
- the site path to check- Returns:
true
if the given site path is the sitemap root
-
leaveEditor
public void leaveEditor(java.lang.String target)
Ask to save the page before leaving, if necessary.- Parameters:
target
- the leaving target
-
loadCategories
public void loadCategories(boolean openLocalCategories, org.opencms.util.CmsUUID openItemId)
Loads and displays the category data.- Parameters:
openLocalCategories
- true if the local category tree should be openedopenItemId
- the id of the item to open
-
loadGalleries
public void loadGalleries()
Loads all available galleries for the current sub site.
-
loadModelPages
public void loadModelPages()
Loads the model pages.
-
loadNewElementInfo
public void loadNewElementInfo(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Loads the new element info.- Parameters:
callback
- the callback to call when done
-
loadPath
public void loadPath(java.lang.String sitePath)
Loads all entries on the given path.- Parameters:
sitePath
- the site path
-
loadPath
public void loadPath(java.lang.String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Loads the sitemap entry for the given site path.- Parameters:
sitePath
- the site pathcallback
- the callback
-
loadPath
public void loadPath(java.lang.String sitePath, boolean continueIfNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Loads all entries on the given path.- Parameters:
sitePath
- the site pathcontinueIfNotLoaded
- parameter passed to getChildrencallback
- the callback to execute when done
-
mergeSubSitemap
public void mergeSubSitemap(org.opencms.util.CmsUUID entryId)
Merges a subsitemap at the given id back into this sitemap.- Parameters:
entryId
- the id of the sub sitemap entry
-
move
public void move(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String toPath, int position)
Moves the given sitemap entry with all its descendants to the new position.- Parameters:
entry
- the sitemap entry to movetoPath
- the destination pathposition
- the new position between its siblings
-
openPropertyDialogForVaadin
public void openPropertyDialogForVaadin(org.opencms.util.CmsUUID structureId, org.opencms.util.CmsUUID rootId)
Opens the property dialog for the locale comparison mode.- Parameters:
structureId
- the structure id of the sitemap entry to editrootId
- the structure id of the resource comparing to the tree root in sitemap compare mode
-
openSiteMap
public void openSiteMap(java.lang.String sitePath)
Opens the site-map specified.- Parameters:
sitePath
- the site path to the site-map folder
-
openSiteMap
public void openSiteMap(java.lang.String sitePath, boolean siteChange)
Opens the site-map specified.- Parameters:
sitePath
- the site path to the site-map foldersiteChange
- in case the site was changed
-
recomputeProperties
public void recomputeProperties()
Recomputes properties for all sitemap entries.
-
refreshRoot
public void refreshRoot(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Refreshes the root entry.- Parameters:
callback
- the callback to call after the entry has been refreshed
-
registerEntry
public void registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
- Specified by:
registerEntry
in interfaceorg.opencms.ade.sitemap.shared.I_CmsSitemapController
- See Also:
I_CmsSitemapController.registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry)
-
registerPathChange
public void registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String oldPath)
- Specified by:
registerPathChange
in interfaceorg.opencms.ade.sitemap.shared.I_CmsSitemapController
- See Also:
I_CmsSitemapController.registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry, java.lang.String)
-
removeFromNavigation
public void removeFromNavigation(org.opencms.util.CmsUUID entryId)
Removes the entry with the given site-path from navigation.- Parameters:
entryId
- the entry id
-
removeModelPage
public void removeModelPage(org.opencms.util.CmsUUID id, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> asyncCallback)
Removes a model page from the sitemap's configuration.- Parameters:
id
- the structure id of the model pageasyncCallback
- the callback to call when done
-
replaceProperties
public java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> replaceProperties(org.opencms.util.CmsUUID id, java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> properties)
- Specified by:
replaceProperties
in interfaceorg.opencms.ade.sitemap.shared.I_CmsSitemapController
- See Also:
I_CmsSitemapController.replaceProperties(org.opencms.util.CmsUUID, java.util.Map)
-
setEditorModeInSession
public void setEditorModeInSession(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode)
Sets the editor mode in the user session.- Parameters:
editorMode
- the editor mode
-
showInNavigation
public void showInNavigation(org.opencms.util.CmsUUID entryId)
Shows a formerly hidden entry in the navigation.- Parameters:
entryId
- the entry id- See Also:
hideInNavigation(CmsUUID)
-
undelete
public void undelete(org.opencms.util.CmsUUID entryId, java.lang.String sitePath)
Undeletes the resource with the given structure id.- Parameters:
entryId
- the entry idsitePath
- the site-path
-
updateEntry
public void updateEntry(org.opencms.util.CmsUUID entryId)
Updates the given entry.- Parameters:
entryId
- the entry id
-
updateEntry
public void updateEntry(org.opencms.util.CmsUUID entryId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Updates the given entry.- Parameters:
entryId
- the entry idcallback
- the callback to call after the entry has been updated
-
updateEntry
public void updateEntry(java.lang.String sitePath)
Updates the given entry.- Parameters:
sitePath
- the entry sitepath
-
updateSingleEntry
public void updateSingleEntry(org.opencms.util.CmsUUID entryId)
Updates the given entry only, not evaluating any child changes.- Parameters:
entryId
- the entry id
-
applyChange
protected void applyChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change)
Fires a sitemap change event.- Parameters:
change
- the change event to fire
-
commitChange
protected void commitChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change, com.google.gwt.user.client.Command callback)
Adds a change to the queue.- Parameters:
change
- the change to commitcallback
- the callback to execute after the change has been applied
-
getChangeForEdit
protected org.opencms.ade.sitemap.shared.CmsSitemapChange getChangeForEdit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges)
Creates a change object for an edit operation.- Parameters:
entry
- the edited sitemap entrypropertyChanges
- the list of property changes- Returns:
- the change object
-
getEntryPoint
protected java.lang.String getEntryPoint()
Returns the URI of the current sitemap.- Returns:
- the URI of the current sitemap
-
getPath
protected java.lang.String getPath(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, java.lang.String newUrlName)
Helper method for getting the full path of a sitemap entry whose URL name is being edited.- Parameters:
entry
- the sitemap entrynewUrlName
- the new url name of the sitemap entry- Returns:
- the new full site path of the sitemap entry
-
getVfsService
protected org.opencms.gwt.shared.rpc.I_CmsVfsServiceAsync getVfsService()
Returns the sitemap service instance.- Returns:
- the sitemap service instance
-
initDetailPageInfos
protected void initDetailPageInfos()
Initializes the detail page information.
-
makeNewEntry
protected void makeNewEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, I_CmsSimpleCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
Creates a new client sitemap entry bean to use for the RPC call which actually creates the entry on the server side.- Parameters:
parent
- the parent entrycallback
- the callback to execute
-
recomputeProperties
protected void recomputeProperties(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
Recomputes the properties for a client sitemap entry.- Parameters:
entry
- the entry for whose descendants the properties should be recomputed
-
-