Class EntityServiceImpl<E extends de.digitalcollections.model.identifiable.entity.Entity>

    • Constructor Detail

      • EntityServiceImpl

        @Autowired
        public EntityServiceImpl​(@Qualifier("entityRepositoryImpl")
                                 EntityRepository<E> repository)
    • Method Detail

      • addRelatedFileresource

        public void addRelatedFileresource​(E entity,
                                           de.digitalcollections.model.identifiable.resource.FileResource fileResource)
        Specified by:
        addRelatedFileresource in interface IdentifiableService<E extends de.digitalcollections.model.identifiable.entity.Entity>
      • buildNotificationUrl

        protected URI buildNotificationUrl​(String urlTemplate,
                                           UUID entityUuid,
                                           de.digitalcollections.model.identifiable.entity.EntityType entityType)
        Build a notification url by replacing placeholders in the template with the entity's uuid and type
      • filteringForActive

        protected de.digitalcollections.model.filter.Filtering filteringForActive()
      • getByRefId

        public E getByRefId​(long refId)
        Specified by:
        getByRefId in interface EntityService<E extends de.digitalcollections.model.identifiable.entity.Entity>
      • getRandom

        public List<E> getRandom​(int count)
        Specified by:
        getRandom in interface EntityService<E extends de.digitalcollections.model.identifiable.entity.Entity>
      • getRelatedFileResources

        public List<de.digitalcollections.model.identifiable.resource.FileResource> getRelatedFileResources​(E entity)
        Specified by:
        getRelatedFileResources in interface IdentifiableService<E extends de.digitalcollections.model.identifiable.entity.Entity>
      • saveRelatedFileResources

        public List<de.digitalcollections.model.identifiable.resource.FileResource> saveRelatedFileResources​(E entity,
                                                                                                             List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
        Description copied from interface: IdentifiableService
        Save list of file resources related to an identifiable. Prerequisite: file resources have been saved before (exist already)
        Specified by:
        saveRelatedFileResources in interface IdentifiableService<E extends de.digitalcollections.model.identifiable.entity.Entity>
        Parameters:
        entity - entity part the file resources are related to
        fileResources - the file resources that are related to the entity part
        Returns:
        the list of the related file resources
      • sendNotification

        protected void sendNotification​(String action,
                                        String httpVerb,
                                        UUID uuid,
                                        de.digitalcollections.model.identifiable.entity.EntityType entityType)
        Send a notification to an external url when an entity has changed