Interface DescriptorChangeSuggestionService


  • public interface DescriptorChangeSuggestionService
    Service interface for managing descriptor change suggestions in collections. This service handles the creation, updating, and management of descriptor change suggestions, including file handling and status management. Note: File storage is handled internally using unique identifiers. The provided filename is used only for display and metadata purposes.
    • Method Detail

      • getSuggestion

        DescriptorChangeSuggestion getSuggestion​(long key)
        Retrieves a descriptor change suggestion by its key.
        Parameters:
        key - The key of the suggestion to retrieve
        Returns:
        The DescriptorChangeSuggestion or null if not found
      • applySuggestion

        void applySuggestion​(long key)
                      throws IOException
        Applies a pending descriptor change suggestion. This will create or update the descriptor group based on the suggestion.
        Parameters:
        key - The key of the suggestion to apply
        Throws:
        IOException - If there's an error processing the file
        IllegalArgumentException - If the suggestion is not in PENDING state
        IllegalStateException - If the suggestion cannot be applied
      • list

        PagingResponse<DescriptorChangeSuggestionlist​(Pageable pageable,
                                                        Status status,
                                                        Type type,
                                                        String proposerEmail,
                                                        UUID collectionKey,
                                                        Country country)
        Lists descriptor change suggestions with optional filters.
        Parameters:
        pageable - Pagination details
        status - Filter by status (PENDING, APPROVED, DISCARDED)
        type - Filter by type (CREATE, UPDATE, DELETE)
        proposerEmail - Filter by proposer's email
        collectionKey - Filter by collection key
        country - Filter by collection's country
        Returns:
        PagingResponse containing the filtered suggestions
      • count

        long count​(Status status,
                   Type type,
                   String proposerEmail,
                   UUID collectionKey,
                   Country country)
        Counts the total number of descriptor change suggestions based on filters.
        Parameters:
        status - Filter by status
        type - Filter by type
        proposerEmail - Filter by proposer's email
        collectionKey - Filter by collection key
        country - Filter by collection's country
        Returns:
        Total number of matching suggestions