Class ContentContainerServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createContainer​(ContentContainer contentContainer)
      This method creates a database entity.
      void createContainer​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> blogAsMap)
      This method creates a database entity from a map-representation.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getArticles​(java.lang.String regex)
      This method retrieves a map, which can be processed in a templates.
      java.util.List<java.util.Map<java.lang.String,​java.lang.String>> getContainerArticles​(java.lang.String blogId)
      This method retrieves a map, which can be processed in a templates.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getContainerPaginationFilter​(java.lang.String requestJson)
      This method does calculation for a pages based on the request.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getContainerTypes()
      This method retrieves a map, which can be processed in a templates.
      ContentContainerRepository getRepository()  
      void removeArticles​(java.lang.String blogId, java.util.ArrayList<java.lang.String> articleIds)
      This method removes a list of database entities.
      void removeContainerAndClean​(java.lang.String blogId)
      This method removes a database entity and clean all relationships from another entities.
      void removeContainerFromBlogCategory​(java.lang.String containerId, java.lang.String categoryId)
      This method removes relationship between database entities.
      void removeContainersByIds​(java.util.ArrayList<java.lang.String> blogsIds)
      This method removes a list of database entities.
      ContentContainer saveContainer​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> blogAsMap, java.lang.String blogId)
      This method save an updates of database entity.
      org.springframework.data.domain.Page<ContentContainer> searchContainerResultsPaged​(java.lang.String requestJson)
      This method does search requests and returns data as pages.
      java.util.List<ContentContainer> searchContainersResults​(java.lang.String requestJson)
      This method does search requests and returns data as list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContentContainerServiceImpl

        public ContentContainerServiceImpl()
    • Method Detail

      • createContainer

        public void createContainer​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> blogAsMap)
        Description copied from interface: ContentContainerService
        This method creates a database entity from a map-representation.
        Specified by:
        createContainer in interface ContentContainerService
        Parameters:
        blogAsMap - map-representation of database entity
      • saveContainer

        @Transactional
        public ContentContainer saveContainer​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> blogAsMap,
                                              java.lang.String blogId)
        Description copied from interface: ContentContainerService
        This method save an updates of database entity.
        Specified by:
        saveContainer in interface ContentContainerService
        Parameters:
        blogAsMap - map-representation of database entity
        blogId - identification for database entity which will be updated
        Returns:
        saved instance of database entity
      • removeArticles

        @Transactional
        public void removeArticles​(java.lang.String blogId,
                                   java.util.ArrayList<java.lang.String> articleIds)
        Description copied from interface: ContentContainerService
        This method removes a list of database entities.
        Specified by:
        removeArticles in interface ContentContainerService
        Parameters:
        blogId - identification for database entity which will be updated
        articleIds - the list of database entities which will be removed
      • getContainerArticles

        public java.util.List<java.util.Map<java.lang.String,​java.lang.String>> getContainerArticles​(java.lang.String blogId)
        Description copied from interface: ContentContainerService
        This method retrieves a map, which can be processed in a templates.
        Specified by:
        getContainerArticles in interface ContentContainerService
        Parameters:
        blogId - identification for database entity which will be retrieved
        Returns:
        map-representation of data
      • getArticles

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getArticles​(java.lang.String regex)
        Description copied from interface: ContentContainerService
        This method retrieves a map, which can be processed in a templates.
        Specified by:
        getArticles in interface ContentContainerService
        Parameters:
        regex - regexp for a filtering by "_id" field of database entity
        Returns:
        map-representation of data
      • removeContainersByIds

        @Transactional
        public void removeContainersByIds​(java.util.ArrayList<java.lang.String> blogsIds)
        Description copied from interface: ContentContainerService
        This method removes a list of database entities.
        Specified by:
        removeContainersByIds in interface ContentContainerService
        Parameters:
        blogsIds - the list of database entities which will be removed
      • removeContainerAndClean

        @Transactional
        public void removeContainerAndClean​(java.lang.String blogId)
        Description copied from interface: ContentContainerService
        This method removes a database entity and clean all relationships from another entities.
        Specified by:
        removeContainerAndClean in interface ContentContainerService
        Parameters:
        blogId - identification for database entity which will be removed
      • getContainerPaginationFilter

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getContainerPaginationFilter​(java.lang.String requestJson)
        Description copied from interface: ContentContainerService
        This method does calculation for a pages based on the request.
        Specified by:
        getContainerPaginationFilter in interface ContentContainerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • searchContainerResultsPaged

        public org.springframework.data.domain.Page<ContentContainer> searchContainerResultsPaged​(java.lang.String requestJson)
        Description copied from interface: ContentContainerService
        This method does search requests and returns data as pages.
        Specified by:
        searchContainerResultsPaged in interface ContentContainerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • searchContainersResults

        public java.util.List<ContentContainer> searchContainersResults​(java.lang.String requestJson)
        Description copied from interface: ContentContainerService
        This method does search requests and returns data as list.
        Specified by:
        searchContainersResults in interface ContentContainerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities as list
      • getContainerTypes

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getContainerTypes()
        Description copied from interface: ContentContainerService
        This method retrieves a map, which can be processed in a templates.
        Specified by:
        getContainerTypes in interface ContentContainerService
        Returns:
        map-representation of data
      • removeContainerFromBlogCategory

        @Transactional
        public void removeContainerFromBlogCategory​(java.lang.String containerId,
                                                    java.lang.String categoryId)
        Description copied from interface: ContentContainerService
        This method removes relationship between database entities.
        Specified by:
        removeContainerFromBlogCategory in interface ContentContainerService
        Parameters:
        containerId - identification for database entity which will be removed
        categoryId - identification for database entity which will be updated