Package org.opencms.ui.apps.sitemanager
Class CmsSiteManager
java.lang.Object
org.opencms.ui.apps.A_CmsWorkplaceApp
org.opencms.ui.apps.sitemanager.CmsSiteManager
- All Implemented Interfaces:
I_CmsCRUDApp<CmsSite>
,I_CmsWorkplaceApp
Manager class for the Site manager app.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
A_CmsWorkplaceApp.NavEntry
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Bundel name for the sites which are used as templates for new sites.static final String
Constant.protected com.vaadin.ui.Window
The currently opened dialog window.protected CmsSitesTable
The site table.protected com.vaadin.v7.ui.TextField
The file table filter input.static final String
Name of the macros folder for site templates.static final String
The add project path name.static final String
The edit project path name.static final String
The global settings path name.static final String
The webserver setting path name.static final String
path attribute to transmit root of a site to be edited.Fields inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
m_infoLayout, m_rootLayout, m_uiContext, PARAM_ASSIGN, PARAM_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Centers the currently open window.void
closeDialogWindow
(boolean updateTable) Closes the current dialog window and updates the sites table if requested.void
createElement
(CmsSite element) Creates the element of type T in the system.protected CmsSitesTable
Creates the table holdings all available sites.void
defaultAction
(String elementId) Performs a default action.void
deleteElements
(List<String> elementId) Delete the given List of elements.Get all Elements.protected LinkedHashMap<String,
String> getBreadCrumbForState
(String state) Returns the current bread crumb entries in an ordered map.protected com.vaadin.ui.Component
getComponentForState
(String state) Returns the app component for the given state.Get corrupted sites.getElement
(String elementId) Reads out an element.com.vaadin.server.Resource
getFavIcon
(String siteRoot) Returns the fav icon path for the given site.protected CmsObject
Returns the root cms object.protected List<A_CmsWorkplaceApp.NavEntry>
getSubNavEntries
(String state) Returns the sub navigation entries.void
initUI
(I_CmsAppUIContext context) Within this method the app UI should be initialized.boolean
Checks if site export is enabled.static boolean
isFolderWithMacros
(CmsObject cms, String folderPathRoot) Method to check if a folder under given path contains a bundle for macro resolving.static boolean
Check if LetsEncrypt updates are configured to be triggered by webserver configuration updates.void
openDeleteDialog
(Set<String> data) Opens the delete dialog for the given sites.protected void
openDialog
(CmsBasicDialog dialog, String windowCaption) Opens a given dialog.void
openEditDialog
(String siteRoot) Opens the edit site dialog.void
Opens the global settings dialog.void
Opens the update server configuration dialog.void
updateGeneralSettings
(CmsObject cms, String defaultUri, Map<String, CmsSSLMode> workplaceServers, String sharedFolder) Updates the general settings.protected void
Update the info button.void
writeElement
(CmsSite element) Writes a changed element to the system which already exists.Methods inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
addParamToState, addSubNavEntry, getLastPathLevel, getOfflineCmsObject, getParamFromState, getParamsFromState, onStateChange, openSubView, removeParamsFromState, setBreadCrumbEntries, updateBreadCrumb, updateSubNav
-
Field Details
-
BUNDLE_NAME
Bundel name for the sites which are used as templates for new sites.- See Also:
-
FAVICON
Constant.- See Also:
-
MACRO_FOLDER
Name of the macros folder for site templates.- See Also:
-
PATH_NAME_ADD
The add project path name.- See Also:
-
PATH_NAME_EDIT
The edit project path name.- See Also:
-
PATH_NAME_GLOBAL
The global settings path name.- See Also:
-
PATH_NAME_WEBSERVER
The webserver setting path name.- See Also:
-
SITE_ROOT
path attribute to transmit root of a site to be edited.- See Also:
-
m_dialogWindow
The currently opened dialog window. -
m_sitesTable
The site table. -
m_siteTableFilter
The file table filter input.
-
-
Constructor Details
-
CmsSiteManager
public CmsSiteManager()
-
-
Method Details
-
isFolderWithMacros
Method to check if a folder under given path contains a bundle for macro resolving.- Parameters:
cms
- CmsObjectfolderPathRoot
- root path of folder- Returns:
- true if macros bundle found
-
isLetsEncryptConfiguredForWebserverThread
Check if LetsEncrypt updates are configured to be triggered by webserver configuration updates.- Returns:
- true if LetsEncrypt updates are configured to be triggered by webserver configuration updates
-
centerWindow
Centers the currently open window. -
closeDialogWindow
Closes the current dialog window and updates the sites table if requested.- Parameters:
updateTable
-true
to update the sites table
-
createElement
Description copied from interface:I_CmsCRUDApp
Creates the element of type T in the system.- Specified by:
createElement
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
element
- to be saved- See Also:
-
defaultAction
Description copied from interface:I_CmsCRUDApp
Performs a default action.- Specified by:
defaultAction
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
elementId
- id of element- See Also:
-
deleteElements
Description copied from interface:I_CmsCRUDApp
Delete the given List of elements.- Specified by:
deleteElements
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
elementId
- of elements to be deleted- See Also:
-
getAllElements
Description copied from interface:I_CmsCRUDApp
Get all Elements.- Specified by:
getAllElements
in interfaceI_CmsCRUDApp<CmsSite>
- Returns:
- a list of all elements
- See Also:
-
getCorruptedSites
Get corrupted sites.- Returns:
- List
-
getElement
Description copied from interface:I_CmsCRUDApp
Reads out an element.- Specified by:
getElement
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
elementId
- of the object- Returns:
- the object of type T
- See Also:
-
getFavIcon
Returns the fav icon path for the given site.- Parameters:
siteRoot
- the site root- Returns:
- the icon path
-
initUI
Description copied from interface:I_CmsWorkplaceApp
Within this method the app UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUI
in interfaceI_CmsWorkplaceApp
- Overrides:
initUI
in classA_CmsWorkplaceApp
- Parameters:
context
- the UI context- See Also:
-
isExportEnabled
Checks if site export is enabled.- Returns:
- true if site export is enabled
-
openDeleteDialog
Opens the delete dialog for the given sites.- Parameters:
data
- the site roots
-
openEditDialog
Opens the edit site dialog.- Parameters:
siteRoot
- the site root of the site to edit, ifnull
-
openSettingsDailog
Opens the global settings dialog. -
openUpdateServerConfigDailog
Opens the update server configuration dialog. -
updateGeneralSettings
public void updateGeneralSettings(CmsObject cms, String defaultUri, Map<String, CmsSSLMode> workplaceServers, String sharedFolder) Updates the general settings.- Parameters:
cms
- the cms to usedefaultUri
- the default URIworkplaceServers
- the workplace server URLssharedFolder
- the shared folder URI
-
writeElement
Description copied from interface:I_CmsCRUDApp
Writes a changed element to the system which already exists.- Specified by:
writeElement
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
element
- to be saved- See Also:
-
createSitesTable
Creates the table holdings all available sites.- Returns:
- a vaadin table component
-
getBreadCrumbForState
Description copied from class:A_CmsWorkplaceApp
Returns the current bread crumb entries in an ordered map.- Specified by:
getBreadCrumbForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the current state- Returns:
- bread crumb entry name by state, in case the state is empty, the entry will be disabled
- See Also:
-
getComponentForState
Description copied from class:A_CmsWorkplaceApp
Returns the app component for the given state.- Specified by:
getComponentForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the state to render- Returns:
- the app component
- See Also:
-
getRootCmsObject
Returns the root cms object.- Returns:
- the root cms object
-
openDialog
Opens a given dialog.- Parameters:
dialog
- to be shownwindowCaption
- caption of window
-
updateInfo
Update the info button.
-