Interface CMSAdminSiteService
- All Known Implementing Classes:
DefaultCMSAdminSiteService
public interface CMSAdminSiteService
The Interface CMSAdminSiteService responsible for managing cms sites.
- Spring Bean ID:
- cmsAdminSiteService
-
Method Summary
Modifier and TypeMethodDescriptionReturns the active site (the site the current user is working on).getAllCatalogs(CMSSiteModel site) Returns all catalogs for the specified sitesite.returns all composed type which extend the AbstractPageReturns clone context.Returns the original item context.Returns restore context.getSiteForId(String id) Returns a site with the given IDgetSites()Get all sites which are defined in the CMSReturns type context.booleanchecks if the current user has set an active catalog versionbooleanchecks if the current user has set an active sitebooleancheck if the active site has a preview urlbooleanhasPreviewURL(CMSSiteModel site) check if the given site has a preview urlvoidsetActiveCatalogVersion(CatalogVersionModel catalogVersion) Set a catalog version as active.voidsetActiveCatalogVersion(String catalogId, String versionId) Set a catalog version (via catalog id and version id) as active.voidsetActiveSite(CMSSiteModel site) Sets a site as active (the site the current user is working on)voidSets a site as active (the site the current user is working on)voidsetCloneContext(Map<String, String> context) Set a clone context.voidsetOriginalItemContext(Map<String, Object> context) Set an original item context.voidsetRestoreContext(Map<String, Object> context) Set a restore context in the current session.voidsetTypeContext(Map<String, Object> context) Set a type context in the current session.
-
Method Details
-
getSites
Collection<CMSSiteModel> getSites()Get all sites which are defined in the CMS- Returns:
- collection of all sites
-
getSiteForId
CMSSiteModel getSiteForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException Returns a site with the given ID- Parameters:
id- the id of the site- Returns:
- the site object
- Throws:
AmbiguousIdentifierException- thrown when more than one object has been found.UnknownIdentifierException- thrown when no object has been found
-
setActiveSiteForId
Sets a site as active (the site the current user is working on)- Parameters:
id- id of the site- Throws:
AmbiguousIdentifierException- thrown when more than one object has been found.UnknownIdentifierException- thrown when no object has been found
-
setActiveSite
Sets a site as active (the site the current user is working on)- Parameters:
site- the cms site model
-
getActiveSite
CMSSiteModel getActiveSite()Returns the active site (the site the current user is working on). Returns null if no active site is set for the current user- Returns:
- the site
-
hasActiveSite
boolean hasActiveSite()checks if the current user has set an active site- Returns:
- true if there is an active site, otherwise false
-
setActiveCatalogVersion
Set a catalog version (via catalog id and version id) as active. The current user will work on that catalog version- Parameters:
catalogId- the catalog idversionId- the version id- Throws:
CMSItemNotFoundException- if no catalog version with the given parameters is found
-
setActiveCatalogVersion
Set a catalog version as active. The current user will work on that catalog version- Parameters:
catalogVersion- the catalog version model
-
getActiveCatalogVersion
CatalogVersionModel getActiveCatalogVersion()- Returns:
- the active catalog version for the current user. Returns null if no active catalog version is set for the current user
-
hasActiveCatalogVersion
boolean hasActiveCatalogVersion()checks if the current user has set an active catalog version- Returns:
- true if there is an active catalog version, otherwise false
-
getAllPageTypes
Collection<ComposedTypeModel> getAllPageTypes()returns all composed type which extend the AbstractPage- Returns:
- all page types
-
hasPreviewURL
boolean hasPreviewURL()check if the active site has a preview url- Returns:
- true if the active site has an preview url. False if no active site is set or no preview URL is provided.
-
hasPreviewURL
check if the given site has a preview url- Parameters:
site- the site to check- Returns:
- true if the active site has an preview url. False if no active site is set or no preview URL is provided.
-
getAllCatalogs
Returns all catalogs for the specified sitesite. This means all the content catalogs of the site as well as the product and classification system catalogs which belong to the stores associated with the site.- Parameters:
site- the CMS site- Returns:
- all content, product and classification system catalogs associated with the site
-
setCloneContext
Set a clone context. Clone context contains site id, catalog id and catalog version. Clone context is used to detect that the new cloned element will be created in a catalog version different from active one.- Parameters:
context- clone context
-
getCloneContext
Returns clone context.- Returns:
- the clone context object
-
setOriginalItemContext
Set an original item context. The original item context contains cmsItem uid, catalog id and catalog version. The original item context is used to detect that the item is being modified by the facade layer and that theRelatedPageRejectionServiceshould not save this item part of its processing.- Parameters:
context- original item context
-
getOriginalItemContext
Returns the original item context.- Returns:
- the original item context object
-
setRestoreContext
Set a restore context in the current session. The restore context contains information about whether to override while restore or not.- Parameters:
context- restore context
-
getRestoreContext
Returns restore context.- Returns:
- the restore context object
-
setTypeContext
Set a type context in the current session. The type context contains information about read only mode for attributes.- Parameters:
context-
-
getTypeContext
Returns type context.- Returns:
- the type context object.
-