Class PublicationServiceImpl

    • Field Detail

      • LOG

        protected final org.slf4j.Logger LOG
    • Method Detail

      • count

        public long count()
        Specified by:
        count in interface BaseService<Publication,​java.util.UUID>
        Returns:
        number of entities
      • exists

        public boolean exists​(java.util.UUID uuid)
        Specified by:
        exists in interface BaseService<Publication,​java.util.UUID>
        Parameters:
        uuid - ID of entity
        Returns:
        true if exists
      • findOne

        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\',\'ROLE_CONCEPT\',\'ROLE_VIEW\',\'ROLE_GUEST\')")
        public Publication findOne​(java.util.UUID uuid)
        Description copied from interface: BaseService
        Return a entity based on its ID.
        Specified by:
        findOne in interface BaseService<Publication,​java.util.UUID>
        Parameters:
        uuid - ID of entity
        Returns:
        Entity
      • save

        @Transactional
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\') and hasPermission(#instance,\'AGENCY\')")
        public Publication save​(Publication instance)
        Description copied from interface: BaseService
        Store object T to backstore
        Specified by:
        save in interface BaseService<Publication,​java.util.UUID>
        Parameters:
        instance - object T
        Returns:
        saved instance T (may have fields updated by backstore)
      • delete

        @Transactional
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\')")
        public void delete​(java.util.UUID uuid)
        Description copied from interface: BaseService
        Deletes object with id ID from backstore, exception raised by failure.
        Specified by:
        delete in interface BaseService<Publication,​java.util.UUID>
        Parameters:
        uuid - ID of entity
      • delete

        @Transactional
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\')")
        public void delete​(java.util.List<Publication> instances)
        Description copied from interface: BaseService
        Deletes object with these IDs from backstore, exception raised by failure.
        Specified by:
        delete in interface BaseService<Publication,​java.util.UUID>
        Parameters:
        instances - list of entity IDs
      • findAllPageable

        @Transactional(readOnly=true)
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\',\'ROLE_CONCEPT\',\'ROLE_VIEW\',\'ROLE_GUEST\')")
        public org.springframework.data.domain.Page<Publication> findAllPageable​(org.springframework.data.domain.Pageable pageable)
        Specified by:
        findAllPageable in interface PublicationService
      • findByNameOrPurposeAndStatus

        @Transactional(readOnly=true)
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\',\'ROLE_CONCEPT\',\'ROLE_VIEW\',\'ROLE_GUEST\')")
        public org.springframework.data.domain.Page<Publication> findByNameOrPurposeAndStatus​(java.lang.String name,
                                                                                              java.lang.String purpose,
                                                                                              java.lang.String publicationStatus,
                                                                                              java.lang.String publishedKind,
                                                                                              org.springframework.data.domain.Pageable pageable)
        Specified by:
        findByNameOrPurposeAndStatus in interface PublicationService
      • getDetail

        @Transactional(readOnly=true)
        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\',\'ROLE_CONCEPT\',\'ROLE_VIEW\',\'ROLE_GUEST\')")
        public ElementRef getDetail​(ElementRef publicationElement)
        Specified by:
        getDetail in interface PublicationService