[MGNLDAM-553] RenditionAwareAssetProvider breaks design of DAM API Created: 06/Mar/15  Updated: 01/Jul/15  Resolved: 10/Mar/15

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM API
Affects Version/s: 2.0.7
Fix Version/s: 2.0.8

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLDAM-555 Add asset renderer that does nothing ... Closed
relates to MGNLDAM-554 Add asset renderer that knows about i... Closed
relates to MGNLDAM-556 RenditionWrapper should extend new in... Closed
relates to MGNLSTK-1469 Use asset renderers from DAM Closed
relates to MGNLSTK-1471 Adjust STK to work with new renderers... Closed
supersession
supersedes MGNLDAM-523 Add new asset provider capability - r... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Extract STK functionality

 Description   

MGNLDAM-523 introduced this new interface, but it's flawed. It was added without the understanding that something was missing before:

  • JcrAssetProvider should be implementing getRendererFor()

RenditionAwareAssetProvider adds a method that looks like a shortcut for the above, except that it also prevents using the whole system correctly
:

AssetProviderRegistry.getRendererFor(myAsset, MediaType.JPEG).render(myAsset, MediaType.JPEG, "myRenditionName")

(i see the verbosity/redundancy, for which we could add a shortcut in APR)

I'd like to deprecate this interface ASAP, and remove it in 2.1, since it just creates noise and confusion.

STK has an implementation of this, which should also go.

In addition, we'll need:

  • a default renderer that knows about our imaging module
  • a noop renderer so there is always at minimum one renderer which does nothing.


 Comments   
Comment by Magnolia International [ 10/Mar/15 ]

commits are in merging/MGNLDAM-553-and-associated* branches (2.0 deprecates the RenditionAwareAssetProvider interface, 2.1 removes it)

Comment by Espen Jervidalo [ 10/Mar/15 ]

info.magnolia.dam.api.AbstractAssetProvider
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory

use import instead of FQN

Generated at Mon Feb 12 05:00:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.