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
FieldsModifier and TypeFieldDescriptionstatic final StringBundel name for the sites which are used as templates for new sites.static final StringConstant.protected com.vaadin.ui.WindowThe currently opened dialog window.protected CmsSitesTableThe site table.protected com.vaadin.v7.ui.TextFieldThe file table filter input.static final StringName of the macros folder for site templates.static final StringThe add project path name.static final StringThe edit project path name.static final StringThe global settings path name.static final StringThe webserver setting path name.static final Stringpath 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCenters the currently open window.voidcloseDialogWindow(boolean updateTable) Closes the current dialog window and updates the sites table if requested.voidcreateElement(CmsSite element) Creates the element of type T in the system.protected CmsSitesTableCreates the table holdings all available sites.voiddefaultAction(String elementId) Performs a default action.voiddeleteElements(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.ComponentgetComponentForState(String state) Returns the app component for the given state.Get corrupted sites.getElement(String elementId) Reads out an element.com.vaadin.server.ResourcegetFavIcon(String siteRoot) Returns the fav icon path for the given site.protected CmsObjectReturns the root cms object.protected List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(String state) Returns the sub navigation entries.voidinitUI(I_CmsAppUIContext context) Within this method the app UI should be initialized.booleanChecks if site export is enabled.static booleanisFolderWithMacros(CmsObject cms, String folderPathRoot) Method to check if a folder under given path contains a bundle for macro resolving.static booleanCheck if LetsEncrypt updates are configured to be triggered by webserver configuration updates.voidopenDeleteDialog(Set<String> data) Opens the delete dialog for the given sites.protected voidopenDialog(CmsBasicDialog dialog, String windowCaption) Opens a given dialog.voidopenEditDialog(String siteRoot) Opens the edit site dialog.voidOpens the global settings dialog.voidOpens the update server configuration dialog.voidupdateGeneralSettings(CmsObject cms, String defaultUri, Map<String, CmsSSLMode> workplaceServers, String sharedFolder) Updates the general settings.protected voidUpdate the info button.voidwriteElement(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-trueto update the sites table
-
createElement
Description copied from interface:I_CmsCRUDAppCreates the element of type T in the system.- Specified by:
createElementin interfaceI_CmsCRUDApp<CmsSite>- Parameters:
element- to be saved- See Also:
-
defaultAction
Description copied from interface:I_CmsCRUDAppPerforms a default action.- Specified by:
defaultActionin interfaceI_CmsCRUDApp<CmsSite>- Parameters:
elementId- id of element- See Also:
-
deleteElements
Description copied from interface:I_CmsCRUDAppDelete the given List of elements.- Specified by:
deleteElementsin interfaceI_CmsCRUDApp<CmsSite>- Parameters:
elementId- of elements to be deleted- See Also:
-
getAllElements
Description copied from interface:I_CmsCRUDAppGet all Elements.- Specified by:
getAllElementsin interfaceI_CmsCRUDApp<CmsSite>- Returns:
- a list of all elements
- See Also:
-
getCorruptedSites
Get corrupted sites.- Returns:
- List
-
getElement
Description copied from interface:I_CmsCRUDAppReads out an element.- Specified by:
getElementin 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_CmsWorkplaceAppWithin this method the app UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUIin interfaceI_CmsWorkplaceApp- Overrides:
initUIin 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_CmsCRUDAppWrites a changed element to the system which already exists.- Specified by:
writeElementin 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_CmsWorkplaceAppReturns the current bread crumb entries in an ordered map.- Specified by:
getBreadCrumbForStatein 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_CmsWorkplaceAppReturns the app component for the given state.- Specified by:
getComponentForStatein 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.
-