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
public class CmsSiteManager extends A_CmsWorkplaceApp implements I_CmsCRUDApp<CmsSite>
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
Fields Modifier and Type Field Description static java.lang.String
BUNDLE_NAME
Bundel name for the sites which are used as templates for new sites.static java.lang.String
FAVICON
Constant.protected com.vaadin.ui.Window
m_dialogWindow
The currently opened dialog window.protected CmsSitesTable
m_sitesTable
The site table.protected com.vaadin.v7.ui.TextField
m_siteTableFilter
The file table filter input.static java.lang.String
MACRO_FOLDER
Name of the macros folder for site templates.static java.lang.String
PATH_NAME_ADD
The add project path name.static java.lang.String
PATH_NAME_EDIT
The edit project path name.static java.lang.String
PATH_NAME_GLOBAL
The global settings path name.static java.lang.String
PATH_NAME_WEBSERVER
The webserver setting path name.static java.lang.String
SITE_ROOT
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
Constructors Constructor Description CmsSiteManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
centerWindow()
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
createSitesTable()
Creates the table holdings all available sites.void
defaultAction(java.lang.String elementId)
Performs a default action.void
deleteElements(java.util.List<java.lang.String> elementId)
Delete the given List of elements.java.util.List<CmsSite>
getAllElements()
Get all Elements.protected java.util.LinkedHashMap<java.lang.String,java.lang.String>
getBreadCrumbForState(java.lang.String state)
Returns the current bread crumb entries in an ordered map.protected com.vaadin.ui.Component
getComponentForState(java.lang.String state)
Returns the app component for the given state.java.util.List<CmsSite>
getCorruptedSites()
Get corrupted sites.CmsSite
getElement(java.lang.String elementId)
Reads out an element.com.vaadin.server.Resource
getFavIcon(java.lang.String siteRoot)
Returns the fav icon path for the given site.protected CmsObject
getRootCmsObject()
Returns the root cms object.protected java.util.List<A_CmsWorkplaceApp.NavEntry>
getSubNavEntries(java.lang.String state)
Returns the sub navigation entries.void
initUI(I_CmsAppUIContext context)
Within this method the app UI should be initialized.static boolean
isFolderWithMacros(CmsObject cms, java.lang.String folderPathRoot)
Method to check if a folder under given path contains a bundle for macro resolving.static boolean
isLetsEncryptConfiguredForWebserverThread()
Check if LetsEncrypt updates are configured to be triggered by webserver configuration updates.void
openDeleteDialog(java.util.Set<java.lang.String> data)
Opens the delete dialog for the given sites.protected void
openDialog(CmsBasicDialog dialog, java.lang.String windowCaption)
Opens a given dialog.void
openEditDialog(java.lang.String siteRoot)
Opens the edit site dialog.void
openSettingsDailog()
Opens the global settings dialog.void
openUpdateServerConfigDailog()
Opens the update server configuration dialog.void
updateGeneralSettings(CmsObject cms, java.lang.String defaultUri, java.util.Map<java.lang.String,CmsSSLMode> workplaceServers, java.lang.String sharedFolder)
Updates the general settings.protected void
updateInfo()
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 Detail
-
BUNDLE_NAME
public static final java.lang.String BUNDLE_NAME
Bundel name for the sites which are used as templates for new sites.- See Also:
- Constant Field Values
-
FAVICON
public static final java.lang.String FAVICON
Constant.- See Also:
- Constant Field Values
-
MACRO_FOLDER
public static final java.lang.String MACRO_FOLDER
Name of the macros folder for site templates.- See Also:
- Constant Field Values
-
PATH_NAME_ADD
public static final java.lang.String PATH_NAME_ADD
The add project path name.- See Also:
- Constant Field Values
-
PATH_NAME_EDIT
public static final java.lang.String PATH_NAME_EDIT
The edit project path name.- See Also:
- Constant Field Values
-
PATH_NAME_GLOBAL
public static final java.lang.String PATH_NAME_GLOBAL
The global settings path name.- See Also:
- Constant Field Values
-
PATH_NAME_WEBSERVER
public static final java.lang.String PATH_NAME_WEBSERVER
The webserver setting path name.- See Also:
- Constant Field Values
-
SITE_ROOT
public static final java.lang.String SITE_ROOT
path attribute to transmit root of a site to be edited.- See Also:
- Constant Field Values
-
m_dialogWindow
protected com.vaadin.ui.Window m_dialogWindow
The currently opened dialog window.
-
m_sitesTable
protected CmsSitesTable m_sitesTable
The site table.
-
m_siteTableFilter
protected com.vaadin.v7.ui.TextField m_siteTableFilter
The file table filter input.
-
-
Constructor Detail
-
CmsSiteManager
public CmsSiteManager()
-
-
Method Detail
-
isFolderWithMacros
public static boolean isFolderWithMacros(CmsObject cms, java.lang.String folderPathRoot)
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
public static boolean 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
public void centerWindow()
Centers the currently open window.
-
closeDialogWindow
public void closeDialogWindow(boolean updateTable)
Closes the current dialog window and updates the sites table if requested.- Parameters:
updateTable
-true
to update the sites table
-
createElement
public void createElement(CmsSite element)
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:
I_CmsCRUDApp.createElement(java.lang.Object)
-
defaultAction
public void defaultAction(java.lang.String elementId)
Description copied from interface:I_CmsCRUDApp
Performs a default action.- Specified by:
defaultAction
in interfaceI_CmsCRUDApp<CmsSite>
- Parameters:
elementId
- id of element- See Also:
I_CmsCRUDApp.defaultAction(java.lang.String)
-
deleteElements
public void deleteElements(java.util.List<java.lang.String> elementId)
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:
I_CmsCRUDApp.deleteElements(java.util.List)
-
getAllElements
public java.util.List<CmsSite> 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:
I_CmsCRUDApp.getAllElements()
-
getCorruptedSites
public java.util.List<CmsSite> getCorruptedSites()
Get corrupted sites.- Returns:
- List
-
getElement
public CmsSite getElement(java.lang.String elementId)
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:
I_CmsCRUDApp.getElement(java.lang.String)
-
getFavIcon
public com.vaadin.server.Resource getFavIcon(java.lang.String siteRoot)
Returns the fav icon path for the given site.- Parameters:
siteRoot
- the site root- Returns:
- the icon path
-
initUI
public void initUI(I_CmsAppUIContext context)
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:
A_CmsWorkplaceApp.initUI(org.opencms.ui.apps.I_CmsAppUIContext)
-
openDeleteDialog
public void openDeleteDialog(java.util.Set<java.lang.String> data)
Opens the delete dialog for the given sites.- Parameters:
data
- the site roots
-
openEditDialog
public void openEditDialog(java.lang.String siteRoot)
Opens the edit site dialog.- Parameters:
siteRoot
- the site root of the site to edit, ifnull
-
openSettingsDailog
public void openSettingsDailog()
Opens the global settings dialog.
-
openUpdateServerConfigDailog
public void openUpdateServerConfigDailog()
Opens the update server configuration dialog.
-
updateGeneralSettings
public void updateGeneralSettings(CmsObject cms, java.lang.String defaultUri, java.util.Map<java.lang.String,CmsSSLMode> workplaceServers, java.lang.String sharedFolder)
Updates the general settings.- Parameters:
cms
- the cms to usedefaultUri
- the default URIworkplaceServers
- the workplace server URLssharedFolder
- the shared folder URI
-
writeElement
public void writeElement(CmsSite element)
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:
I_CmsCRUDApp.writeElement(java.lang.Object)
-
createSitesTable
protected CmsSitesTable createSitesTable()
Creates the table holdings all available sites.- Returns:
- a vaadin table component
-
getBreadCrumbForState
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> getBreadCrumbForState(java.lang.String state)
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:
A_CmsWorkplaceApp.getBreadCrumbForState(java.lang.String)
-
getComponentForState
protected com.vaadin.ui.Component getComponentForState(java.lang.String state)
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:
A_CmsWorkplaceApp.getComponentForState(java.lang.String)
-
getRootCmsObject
protected CmsObject getRootCmsObject()
Returns the root cms object.- Returns:
- the root cms object
-
getSubNavEntries
protected java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the sub navigation entries.- Specified by:
getSubNavEntries
in classA_CmsWorkplaceApp
- Parameters:
state
- the state- Returns:
- the sub navigation entries
- See Also:
A_CmsWorkplaceApp.getSubNavEntries(java.lang.String)
-
openDialog
protected void openDialog(CmsBasicDialog dialog, java.lang.String windowCaption)
Opens a given dialog.- Parameters:
dialog
- to be shownwindowCaption
- caption of window
-
updateInfo
protected void updateInfo()
Update the info button.
-
-