mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Updates the book reading diagram for provider configuration
Documents the provider store configuration signature and responsibilities, adds the library type reader lookup, and regenerates the rendered diagram.
This commit is contained in:
1 parent
08bac594ae
commit
f6978fe4aa
2 files changed
+31
-11
No files matched your search
@@ -123,17 +123,35 @@ class GetLibraryBookReadersQueryHandler {
|
||||
+ HandleAsync(query: GetLibraryBookReadersQuery, token: CancellationToken): Task<Result<IReadOnlyList<LibraryBookReaderResponse>>>
|
||||
}
|
||||
|
||||
class SetLibraryBookReaderEnabledCommandHandler {
|
||||
class GetLibraryTypeBookReadersQueryHandler {
|
||||
- _unitOfWork: IUnitOfWork
|
||||
- _enablementCache: IBookReaderEnablementCache
|
||||
+ HandleAsync(command: SetLibraryBookReaderEnabledCommand, token: CancellationToken): Task<Result<Success>>
|
||||
- _providerConfigurationStore: IMediaLibraryProviderConfigurationStore
|
||||
- _bookReaderRegistry: IBookReaderRegistry
|
||||
+ HandleAsync(query: GetLibraryTypeBookReadersQuery, token: CancellationToken): Task<Result<IReadOnlyList<LibraryBookReaderResponse>>>
|
||||
}
|
||||
|
||||
note right of SetLibraryBookReaderEnabledCommandHandler
|
||||
Enables or disables the book reader of a plugin for a media
|
||||
library by upserting its configuration row, then invalidates
|
||||
the enablement cache so that a disabled reader stops being
|
||||
served immediately.
|
||||
note right of GetLibraryTypeBookReadersQueryHandler
|
||||
Lists the book readers that support a library type, disabled,
|
||||
so that they can be chosen before a library is created or
|
||||
before a change of its type is saved.
|
||||
end note
|
||||
|
||||
class MediaLibraryProviderConfigurationStore {
|
||||
- _unitOfWork: IUnitOfWork
|
||||
- _enablementCache: IBookReaderEnablementCache
|
||||
+ ConfigureProvidersAsync(libraryId: Guid, libraryType: LibraryType, metadataProviders: IReadOnlyList<LibraryProviderSelectionDto>?, artworkProviders: IReadOnlyList<LibraryProviderSelectionDto>?, bookReaders: IReadOnlyList<LibraryProviderSelectionDto>?, shouldReconcileOmittedKinds: bool, token: CancellationToken): Task<Result<Success>>
|
||||
+ GetSupportedBookReaderPluginIds(libraryType: LibraryType): IReadOnlyList<Guid>
|
||||
}
|
||||
|
||||
note right of MediaLibraryProviderConfigurationStore
|
||||
Called by the add and update library commands. Applies the
|
||||
chosen metadata providers, artwork providers and book readers
|
||||
of a media library by upserting their configuration rows in
|
||||
the same save as the library. When shouldReconcileOmittedKinds
|
||||
is set, the kinds without explicit choices are reconciled with
|
||||
the library type first. Book reader changes invalidate the
|
||||
enablement cache of the library so that a disabled reader
|
||||
stops being served immediately.
|
||||
end note
|
||||
|
||||
' ============================== BOOK READER PLUGINS ==============================
|
||||
@@ -221,8 +239,10 @@ BookReaderRegistry ..> IBookReader : reads the supported extensions of loaded pl
|
||||
|
||||
GetLibraryBookReadersQueryHandler --> ILibraryBookReaderConfigurationRepository : reads configurations
|
||||
GetLibraryBookReadersQueryHandler --> IBookReaderRegistry : reads supported extensions
|
||||
SetLibraryBookReaderEnabledCommandHandler --> ILibraryBookReaderConfigurationRepository : upserts the configuration
|
||||
SetLibraryBookReaderEnabledCommandHandler --> IBookReaderEnablementCache : invalidates the entry
|
||||
GetLibraryTypeBookReadersQueryHandler --> MediaLibraryProviderConfigurationStore : reads the supported readers
|
||||
GetLibraryTypeBookReadersQueryHandler --> IBookReaderRegistry : reads supported extensions
|
||||
MediaLibraryProviderConfigurationStore --> ILibraryBookReaderConfigurationRepository : upserts the configurations
|
||||
MediaLibraryProviderConfigurationStore --> IBookReaderEnablementCache : invalidates the library entries
|
||||
|
||||
ILibraryBookReaderConfigurationRepository --> LibraryBookReaderConfigurationEntity : persists
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" data-diagram-type="CLASS" style="width:2978px;height:2599px;background:#FFFFFF;" width="2978px" height="2599px" viewBox="0 0 2978 2599" zoomAndPan="magnify" preserveAspectRatio="none" contentStyleType="text/css"><?plantuml 1.2026.7?><defs/><g font-family="sans-serif" lengthAdjust="spacing"><g class="title" data-source-line="4"><text x="1274.748" y="24.533" fill="#000" font-size="14" textLength="422.413" font-weight="700">Code diagram for Book Reading 3.2.2 and Book Reader Plugins</text></g><!--class IBookReadingService--><g class="entity" data-qualified-name="IBookReadingService" id="ent0001" data-source-line="13"><rect x="1079.5" y="45.609" width="310.054" height="558.672" fill="#FFF" style="stroke:#000;stroke-width:0.5;" rx="2.5" ry="2.5"/><ellipse cx="1162.96" cy="61.609" rx="11" ry="11" fill="#B4A7E5" style="stroke:#181818;stroke-width:1;"/><path d="M1163.913,58.25 L1163.913,64.906 L1165.632,64.906 Q1166.241,64.906 1166.507,65.141 Q1166.772,65.375 1166.772,65.766 Q1166.772,66.141 1166.507,66.375 Q1166.241,66.609 1165.632,66.609 L1160.491,66.609 Q1159.882,66.609 1159.616,66.375 Q1159.351,66.141 1159.351,65.75 Q1159.351,65.375 1159.616,65.141 Q1159.882,64.906 1160.491,64.906 L1162.21,64.906 L1162.21,58.25 L1160.491,58.25 Q1159.882,58.25 1159.616,58.016 Q1159.351,57.781 1159.351,57.391 Q1159.351,57.016 1159.616,56.781 Q1159.882,56.547 1160.491,56.547 L1165.632,56.547 Q1166.241,56.547 1166.507,56.781 Q1166.772,57.016 1166.772,57.391 Q1166.772,57.781 1166.507,58.016 Q1166.241,58.25 1165.632,58.25 L1163.913,58.25 Z " fill="#000"/><text x="1183.46" y="67.338" fill="#000" font-size="14" textLength="134.634" font-style="italic">IBookReadingService</text><line x1="1080.5" y1="77.609" x2="1388.554" y2="77.609" style="stroke:#000;stroke-width:0.5;"/><line x1="1080.5" y1="85.609" x2="1388.554" y2="85.609" style="stroke:#000;stroke-width:0.5;"/><g data-visibility-modifier="PUBLIC_METHOD"><ellipse cx="1090.5" cy="152.742" rx="3" ry="3" fill="#84BE84" style="stroke:#038048;stroke-width:1;"/></g><text x="1099.5" y="104.143" fill="#000" font-size="14" textLength="164.186">GetManifestAsync(bookId:</text><text x="1099.5" y="121.752" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1132.962" y="121.752" fill="#000" font-size="14"> </text><text x="1136.852" y="121.752" fill="#000" font-size="14" textLength="53.683">libraryId:</text><text x="1190.534" y="121.752" fill="#000" font-size="14"> </text><text x="1194.424" y="121.752" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1227.886" y="121.752" fill="#000" font-size="14"> </text><text x="1231.775" y="121.752" fill="#000" font-size="14" textLength="31.138">path:</text><text x="1099.5" y="139.361" fill="#000" font-size="14" textLength="38.124">string,</text><text x="1137.624" y="139.361" fill="#000" font-size="14"> </text><text x="1141.514" y="139.361" fill="#000" font-size="14" textLength="73.131">libraryType:</text><text x="1214.645" y="139.361" fill="#000" font-size="14"> </text><text x="1218.534" y="139.361" fill="#000" font-size="14" textLength="77.807">LibraryType,</text><text x="1099.5" y="156.971" fill="#000" font-size="14" textLength="174.323">shouldRenderPdfAsImages:</text><text x="1099.5" y="174.58" fill="#000" font-size="14" textLength="30.358">bool,</text><text x="1129.858" y="174.58" fill="#000" font-size="14"> </text><text x="1133.748" y="174.58" fill="#000" font-size="14" textLength="38.138">token:</text><text x="1099.5" y="192.189" fill="#000" font-size="14" textLength="124.51">CancellationToken):</text><text x="1099.5" y="209.799" fill="#000" font-size="14" textLength="270.826">Task<Result<ReadingManifestResponse>></text><g data-visibility-modifier="PUBLIC_METHOD"><ellipse cx="1090.5" cy="293.617" rx="3" ry="3" fill="#84BE84" style="stroke:#038048;stroke-width:1;"/></g><text x="1099.5" y="227.408" fill="#000" font-size="14" textLength="157.972">GetSectionAsync(bookId:</text><text x="1257.472" y="227.408" fill="#000" font-size="14"> </text><text x="1261.361" y="227.408" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1099.5" y="245.018" fill="#000" font-size="14" textLength="53.683">libraryId:</text><text x="1153.183" y="245.018" fill="#000" font-size="14"> </text><text x="1157.072" y="245.018" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1190.534" y="245.018" fill="#000" font-size="14"> </text><text x="1194.424" y="245.018" fill="#000" font-size="14" textLength="31.138">path:</text><text x="1225.562" y="245.018" fill="#000" font-size="14"> </text><text x="1229.451" y="245.018" fill="#000" font-size="14" textLength="38.124">string,</text><text x="1099.5" y="262.627" fill="#000" font-size="14" textLength="73.131">libraryType:</text><text x="1172.631" y="262.627" fill="#000" font-size="14"> </text><text x="1176.521" y="262.627" fill="#000" font-size="14" textLength="7Line truncated
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" data-diagram-type="CLASS" style="width:3081px;height:2599px;background:#FFFFFF;" width="3081px" height="2599px" viewBox="0 0 3081 2599" zoomAndPan="magnify" preserveAspectRatio="none" contentStyleType="text/css"><?plantuml 1.2026.7?><defs/><g font-family="sans-serif" lengthAdjust="spacing"><g class="title" data-source-line="4"><text x="1326.081" y="24.533" fill="#000" font-size="14" textLength="422.413" font-weight="700">Code diagram for Book Reading 3.2.2 and Book Reader Plugins</text></g><!--class IBookReadingService--><g class="entity" data-qualified-name="IBookReadingService" id="ent0001" data-source-line="13"><rect x="1606" y="45.609" width="310.054" height="558.672" fill="#FFF" style="stroke:#000;stroke-width:0.5;" rx="2.5" ry="2.5"/><ellipse cx="1689.46" cy="61.609" rx="11" ry="11" fill="#B4A7E5" style="stroke:#181818;stroke-width:1;"/><path d="M1690.413,58.25 L1690.413,64.906 L1692.132,64.906 Q1692.741,64.906 1693.007,65.141 Q1693.272,65.375 1693.272,65.766 Q1693.272,66.141 1693.007,66.375 Q1692.741,66.609 1692.132,66.609 L1686.991,66.609 Q1686.382,66.609 1686.116,66.375 Q1685.851,66.141 1685.851,65.75 Q1685.851,65.375 1686.116,65.141 Q1686.382,64.906 1686.991,64.906 L1688.71,64.906 L1688.71,58.25 L1686.991,58.25 Q1686.382,58.25 1686.116,58.016 Q1685.851,57.781 1685.851,57.391 Q1685.851,57.016 1686.116,56.781 Q1686.382,56.547 1686.991,56.547 L1692.132,56.547 Q1692.741,56.547 1693.007,56.781 Q1693.272,57.016 1693.272,57.391 Q1693.272,57.781 1693.007,58.016 Q1692.741,58.25 1692.132,58.25 L1690.413,58.25 Z " fill="#000"/><text x="1709.96" y="67.338" fill="#000" font-size="14" textLength="134.634" font-style="italic">IBookReadingService</text><line x1="1607" y1="77.609" x2="1915.054" y2="77.609" style="stroke:#000;stroke-width:0.5;"/><line x1="1607" y1="85.609" x2="1915.054" y2="85.609" style="stroke:#000;stroke-width:0.5;"/><g data-visibility-modifier="PUBLIC_METHOD"><ellipse cx="1617" cy="152.742" rx="3" ry="3" fill="#84BE84" style="stroke:#038048;stroke-width:1;"/></g><text x="1626" y="104.143" fill="#000" font-size="14" textLength="164.186">GetManifestAsync(bookId:</text><text x="1626" y="121.752" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1659.462" y="121.752" fill="#000" font-size="14"> </text><text x="1663.352" y="121.752" fill="#000" font-size="14" textLength="53.683">libraryId:</text><text x="1717.034" y="121.752" fill="#000" font-size="14"> </text><text x="1720.924" y="121.752" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1754.386" y="121.752" fill="#000" font-size="14"> </text><text x="1758.275" y="121.752" fill="#000" font-size="14" textLength="31.138">path:</text><text x="1626" y="139.361" fill="#000" font-size="14" textLength="38.124">string,</text><text x="1664.124" y="139.361" fill="#000" font-size="14"> </text><text x="1668.014" y="139.361" fill="#000" font-size="14" textLength="73.131">libraryType:</text><text x="1741.145" y="139.361" fill="#000" font-size="14"> </text><text x="1745.034" y="139.361" fill="#000" font-size="14" textLength="77.807">LibraryType,</text><text x="1626" y="156.971" fill="#000" font-size="14" textLength="174.323">shouldRenderPdfAsImages:</text><text x="1626" y="174.58" fill="#000" font-size="14" textLength="30.358">bool,</text><text x="1656.358" y="174.58" fill="#000" font-size="14"> </text><text x="1660.248" y="174.58" fill="#000" font-size="14" textLength="38.138">token:</text><text x="1626" y="192.189" fill="#000" font-size="14" textLength="124.51">CancellationToken):</text><text x="1626" y="209.799" fill="#000" font-size="14" textLength="270.826">Task<Result<ReadingManifestResponse>></text><g data-visibility-modifier="PUBLIC_METHOD"><ellipse cx="1617" cy="293.617" rx="3" ry="3" fill="#84BE84" style="stroke:#038048;stroke-width:1;"/></g><text x="1626" y="227.408" fill="#000" font-size="14" textLength="157.972">GetSectionAsync(bookId:</text><text x="1783.972" y="227.408" fill="#000" font-size="14"> </text><text x="1787.861" y="227.408" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1626" y="245.018" fill="#000" font-size="14" textLength="53.683">libraryId:</text><text x="1679.683" y="245.018" fill="#000" font-size="14"> </text><text x="1683.572" y="245.018" fill="#000" font-size="14" textLength="33.462">Guid,</text><text x="1717.034" y="245.018" fill="#000" font-size="14"> </text><text x="1720.924" y="245.018" fill="#000" font-size="14" textLength="31.138">path:</text><text x="1752.062" y="245.018" fill="#000" font-size="14"> </text><text x="1755.951" y="245.018" fill="#000" font-size="14" textLength="38.124">string,</text><text x="1626" y="262.627" fill="#000" font-size="14" textLength="73.131">libraryType:</text><text x="1699.131" y="262.627" fill="#000" font-size="14"> </text><text x="1703.021" y="262.627" fill="#000" font-size="14" textLength="77.807">LibraryType,</text><texLine truncated
|
||||
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 173 KiB |
Reference in new issue
Block a user