[BLOSSOM-184] Add support for DAM 2.x new package name of DamConfig.java Created: 11/Jul/14  Updated: 06/Dec/14  Resolved: 25/Jul/14

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: 3.0.2
Fix Version/s: 3.0.3

Type: Improvement Priority: Major
Reporter: Dominika Assignee: Tobias Mattsson
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
relation
is related to BLOSSOM-186 Update sample to Magnolia 5.3.1 and D... 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)
Date of First Response:

 Description   

Using Magnolia 5.3.1-SNAPSHOT and Blossom 3.0.2.

When using new DAM versions 2.x, the @TabFactory method 'DamConfig' argument can no longer bind.

In the new DAM 'DamConfig' is in the "info.magnolia.dam.app.ui.config" package, while Blossom's ParameterResolver implementation has hardcoded and expecting the class name of "info.magnolia.dam.asset.config.DamConfig"

Stacktrace:
Caused by: java.lang.IllegalStateException: Unable to resolve parameter of type [class info.magnolia.dam.app.ui.config.DamConfig]

As a quick fix, I created a class in my module using old package structure, pining to DamFieldConfig in new package structure.

package info.magnolia.dam.asset.config;
import info.magnolia.dam.app.ui.config.DamFieldConfig;
public class DamConfig

{ public final DamFieldConfig fields = new DamFieldConfig(); }

So far so good. Probably this class should find its way to DAM 2.x magnolia-dam-compatibility project.



 Comments   
Comment by Tobias Mattsson [ 25/Jul/14 ]

Note that you will also need to change the package of DamTemplatingFunctions in blossom-servlet.xml from info.magnolia.dam.asset.functions.DamTemplatingFunctions to info.magnolia.dam.templating.functions.DamTemplatingFunctions.

Comment by Jan Haderka [ 06/Dec/14 ]

Bulk close of old resolved tickets.

Generated at Sun Feb 11 23:30:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.