Class DefaultCMSAdminSiteService

  • All Implemented Interfaces:
    CMSAdminSiteService, java.io.Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

    public class DefaultCMSAdminSiteService
    extends AbstractCMSAdminService
    implements CMSAdminSiteService
    Default implementation of the site service.
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultCMSAdminSiteService

        public DefaultCMSAdminSiteService()
    • Method Detail

      • hasActiveSite

        public boolean hasActiveSite()
        Description copied from interface: CMSAdminSiteService
        checks if the current user has set an active site
        Specified by:
        hasActiveSite in interface CMSAdminSiteService
        Returns:
        true if there is an active site, otherwise false
      • hasActiveCatalogVersion

        public boolean hasActiveCatalogVersion()
        Description copied from interface: CMSAdminSiteService
        checks if the current user has set an active catalog version
        Specified by:
        hasActiveCatalogVersion in interface CMSAdminSiteService
        Returns:
        true if there is an active catalog version, otherwise false
      • setActiveCatalogVersion

        public void setActiveCatalogVersion​(java.lang.String catalogId,
                                            java.lang.String versionId)
                                     throws CMSItemNotFoundException
        Description copied from interface: CMSAdminSiteService
        Set a catalog version (via catalog id and version id) as active. The current user will work on that catalog version
        Specified by:
        setActiveCatalogVersion in interface CMSAdminSiteService
        Parameters:
        catalogId - the catalog id
        versionId - the version id
        Throws:
        CMSItemNotFoundException - if no catalog version with the given parameters is found
      • hasPreviewURL

        public boolean hasPreviewURL()
        Description copied from interface: CMSAdminSiteService
        check if the active site has a preview url
        Specified by:
        hasPreviewURL in interface CMSAdminSiteService
        Returns:
        true if the active site has an preview url. False if no active site is set or no preview URL is provided.
      • hasPreviewURL

        public boolean hasPreviewURL​(CMSSiteModel site)
        Description copied from interface: CMSAdminSiteService
        check if the given site has a preview url
        Specified by:
        hasPreviewURL in interface CMSAdminSiteService
        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.
      • getCmsSiteDao

        protected CMSSiteDao getCmsSiteDao()
      • setCmsSiteDao

        public void setCmsSiteDao​(CMSSiteDao cmsSiteDao)
      • setCatalogVersionService

        public void setCatalogVersionService​(CatalogVersionService catalogVersionService)
      • getTypeService

        protected TypeService getTypeService()
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • getAllCatalogs

        public java.util.Collection<CatalogModel> getAllCatalogs​(CMSSiteModel site)
        Description copied from interface: CMSAdminSiteService
        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.
        Specified by:
        getAllCatalogs in interface CMSAdminSiteService
        Parameters:
        site - the CMS site
        Returns:
        all content, product and classification system catalogs associated with the site
      • setCloneContext

        public void setCloneContext​(java.util.Map<java.lang.String,​java.lang.String> context)
        Description copied from interface: CMSAdminSiteService
        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.
        Specified by:
        setCloneContext in interface CMSAdminSiteService
        Parameters:
        context - clone context
      • getCloneContext

        public java.util.Map<java.lang.String,​java.lang.String> getCloneContext()
        Description copied from interface: CMSAdminSiteService
        Returns clone context.
        Specified by:
        getCloneContext in interface CMSAdminSiteService
        Returns:
        the clone context object
      • setOriginalItemContext

        public void setOriginalItemContext​(java.util.Map<java.lang.String,​java.lang.Object> context)
        Description copied from interface: CMSAdminSiteService
        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.
        Specified by:
        setOriginalItemContext in interface CMSAdminSiteService
        Parameters:
        context - original item context
      • getOriginalItemContext

        public java.util.Map<java.lang.String,​java.lang.Object> getOriginalItemContext()
        Description copied from interface: CMSAdminSiteService
        Returns the original item context.
        Specified by:
        getOriginalItemContext in interface CMSAdminSiteService
        Returns:
        the original item context object
      • setRestoreContext

        public void setRestoreContext​(java.util.Map<java.lang.String,​java.lang.Object> context)
        Description copied from interface: CMSAdminSiteService
        Set a restore context in the current session. The restore context contains information about whether to override while restore or not.
        Specified by:
        setRestoreContext in interface CMSAdminSiteService
        Parameters:
        context - restore context
      • getRestoreContext

        public java.util.Map<java.lang.String,​java.lang.Object> getRestoreContext()
        Description copied from interface: CMSAdminSiteService
        Returns restore context.
        Specified by:
        getRestoreContext in interface CMSAdminSiteService
        Returns:
        the restore context object
      • setTypeContext

        public void setTypeContext​(java.util.Map<java.lang.String,​java.lang.Object> context)
        Description copied from interface: CMSAdminSiteService
        Set a type context in the current session. The type context contains information about read only mode for attributes.
        Specified by:
        setTypeContext in interface CMSAdminSiteService
      • getTypeContext

        public java.util.Map<java.lang.String,​java.lang.Object> getTypeContext()
        Description copied from interface: CMSAdminSiteService
        Returns type context.
        Specified by:
        getTypeContext in interface CMSAdminSiteService
        Returns:
        the type context object.