Class DefaultCMSComponentService

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

    public class DefaultCMSComponentService
    extends AbstractCMSService
    implements CMSComponentService
    Default implementation of CMSComponentService interface.
    See Also:
    Serialized Form
    • Field Detail

      • CE_SYSTEM_PROPS

        protected static final java.lang.String CE_SYSTEM_PROPS
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultCMSComponentService

        public DefaultCMSComponentService()
        Constructor used to create new instance of DefaultCMSComponentService
    • Method Detail

      • getAbstractCMSComponents

        public <T extends AbstractCMSComponentModelSearchPageData<T> getAbstractCMSComponents​(java.util.Collection<java.lang.String> ids,
                                                                                                SearchPageData searchPageData)
        Gets the abstract cms component.
        Specified by:
        getAbstractCMSComponents in interface CMSComponentService
        Type Parameters:
        T - the AbstractCMSComponentModel subclass type
        Parameters:
        ids - the id collection of cms components to get
        searchPageData - the searchPageData contains requested pagination and sorting information
        Returns:
        the list of abstract cms component in SearchPageData; otherwise return an empty collection result when no component is found
      • getAllAbstractCMSComponents

        public <T extends AbstractCMSComponentModelSearchPageData<T> getAllAbstractCMSComponents​(SearchPageData searchPageData)
        Description copied from interface: CMSComponentService
        Gets all abstract cms components filtered by the specified pagination and sorting information.
        Specified by:
        getAllAbstractCMSComponents in interface CMSComponentService
        Type Parameters:
        T - the AbstractCMSComponentModel subclass type
        Parameters:
        searchPageData - the searchPageData contains requested pagination and sorting information
        Returns:
        the list of abstract cms component in SearchPageData; otherwise return an empty collection result when no component is found
      • getEditorProperties

        public java.util.Collection<java.lang.String> getEditorProperties​(AbstractCMSComponentModel component)
        Get all editor properties for the given content element. Editor-Properties are editorial properties, like headline, image and so on. Editor-Properties are used to display information on the frontend.
        Specified by:
        getEditorProperties in interface CMSComponentService
        Parameters:
        component - the component which editor properties should be retrieved
        Returns:
        all editor properties
      • getEditorProperties

        protected java.util.Collection<java.lang.String> getEditorProperties​(AbstractCMSComponentModel component,
                                                                             boolean readableOnly)
      • getSystemProperties

        public java.util.Collection<java.lang.String> getSystemProperties​(AbstractCMSComponentModel component)
        Get all system properties for the given content element. System-Properties are non editorial properties, like id, catalogVersion and so on. System-Properties are not used to display any information on the frontend.
        Specified by:
        getSystemProperties in interface CMSComponentService
        Parameters:
        component - the component which system properties should be retrieved
        Returns:
        collection of all system properties for component
      • isComponentContainer

        public boolean isComponentContainer​(java.lang.String componentTypeCode)
        Description copied from interface: CMSComponentService
        Checks if component is a container.
        Specified by:
        isComponentContainer in interface CMSComponentService
        Parameters:
        componentTypeCode - the component's ComposedType code
        Returns:
        Boolean.TRUE if is component, Boolean.FALSE otherwise
      • isComponentRestricted

        public boolean isComponentRestricted​(AbstractCMSComponentModel component)
        Description copied from interface: CMSComponentService
        Checks if passed as parameter AbstractCMSComponentModel is restricted restricted.
        Specified by:
        isComponentRestricted in interface CMSComponentService
        Parameters:
        component - the component which is checked against any restrictions
        Returns:
        true if is restricted, false otherwise
      • isComponentUsedOutsidePage

        public boolean isComponentUsedOutsidePage​(AbstractCMSComponentModel component,
                                                  AbstractPageModel page)
        Description copied from interface: CMSComponentService
        Checks if the component is used outside the page provided as reference.
        Specified by:
        isComponentUsedOutsidePage in interface CMSComponentService
        Parameters:
        component - The component to check.
        page - The page used as reference.
        Returns:
        Boolean.TRUE if the component is used elsewhere. Boolean.FALSE if it's never used or if it's only used in the reference page.
      • setCmsComponentDao

        public void setCmsComponentDao​(CMSComponentDao cmsComponentDao)
      • getSystemProperties

        protected java.util.List<java.lang.String> getSystemProperties()
      • setSystemProperties

        public void setSystemProperties​(java.util.List<java.lang.String> systemProperties)
      • getTypeService

        protected TypeService getTypeService()
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • setCatalogVersionService

        public void setCatalogVersionService​(CatalogVersionService catalogVersionService)