[MGNLDAM-419] getFileName/getFileExtension not properly (re-) implemented for 1.x assets in AssetWrapper Created: 12/Mar/14  Updated: 21/Jul/14  Resolved: 21/Jul/14

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM App, DAM JCR Provider
Affects Version/s: 2.0
Fix Version/s: 2.0.2

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Eric Hechinger
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 12_03_14_11_40.png    
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
Epic Link: DAM / CMIS

 Description   

info.magnolia.dam.asset.AssetWrapper#getFileExtension currently returns "" (or something if there happens to be a dot in the filename), because pre-2.0 assets had two properties: "fileName" and "extension".

The specs of are clear:

    /**
     * Returns the "preferred" file name for this asset's binary. The returned name should include the file's extension
     * (if any), but not its path.
     */
    String getFileName();

However, this doesn't make any assumptions/implications on the storage. One simple assumption to make in JcrAsset would be that "if property 'extension' exists, we're dealing with a 1.x Asset" and have getFileName() take that into account.
Ideally, UI components will lazily update such nodes (when edited), so that we don't actually have to migrate existing content.


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