Interface CMSAdminSiteService

All Known Implementing Classes:
DefaultCMSAdminSiteService

public interface CMSAdminSiteService
The Interface CMSAdminSiteService responsible for managing cms sites.
Spring Bean ID:
cmsAdminSiteService
  • Method Details

    • getSites

      Get all sites which are defined in the CMS
      Returns:
      collection of all sites
    • getSiteForId

      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

      void setActiveSiteForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
      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

      void setActiveSite(CMSSiteModel site)
      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

      void setActiveCatalogVersion(String catalogId, String versionId) throws CMSItemNotFoundException
      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 id
      versionId - the version id
      Throws:
      CMSItemNotFoundException - if no catalog version with the given parameters is found
    • setActiveCatalogVersion

      void setActiveCatalogVersion(CatalogVersionModel catalogVersion)
      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

      boolean hasPreviewURL(CMSSiteModel site)
      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

      Collection<CatalogModel> getAllCatalogs(CMSSiteModel site)
      Returns all catalogs for the specified site site. 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

      void setCloneContext(Map<String,String> context)
      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

      Map<String,String> getCloneContext()
      Returns clone context.
      Returns:
      the clone context object
    • setOriginalItemContext

      void setOriginalItemContext(Map<String,Object> context)
      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 the RelatedPageRejectionService should not save this item part of its processing.
      Parameters:
      context - original item context
    • getOriginalItemContext

      Map<String,Object> getOriginalItemContext()
      Returns the original item context.
      Returns:
      the original item context object
    • setRestoreContext

      void setRestoreContext(Map<String,Object> context)
      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

      Map<String,Object> getRestoreContext()
      Returns restore context.
      Returns:
      the restore context object
    • setTypeContext

      void setTypeContext(Map<String,Object> context)
      Set a type context in the current session. The type context contains information about read only mode for attributes.
      Parameters:
      context -
    • getTypeContext

      Map<String,Object> getTypeContext()
      Returns type context.
      Returns:
      the type context object.