[MAGNOLIA-5686] Node2Bean converter for com.google.common.net.MediaType Created: 17/Feb/14  Updated: 09/Apr/14  Resolved: 11/Mar/14

Status: Closed
Project: Magnolia
Component/s: content2bean, core
Affects Version/s: None
Fix Version/s: 5.3

Type: New Feature Priority: Neutral
Reporter: Magnolia International Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: dam, quickwin
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-5713 Node2Bean should support Lists or Map... Closed
dependency
depends upon MAGNOLIA-4847 Upgrade to newer version of guava Closed
is depended upon by MGNLDAM-389 Cleanup DAM API and split into sub mo... Closed
is depended upon by MGNLDAM-391 Finalize the DAM API review Closed
Template:
Acceptance criteria:
Empty
Epic Link: DAM / CMIS
Sprint: 5.3 Sprint 3, 5.3 Sprint 4, 5.3 Sprint 5

 Description   

Several places could benefit from configuring MediaType objects. Rather than reinventing parsing and matching via regular expressions or other mechanism, we could just use com.google.common.net.MediaType, which is a very convenient class to manipulate mime types.
eg: MediaType.parse("image/png").is(MediaType.parse("image/*")) // returns true
From the below, one can easily figure out why it'd be beneficial to configure stuff (e.g someFileMediaType.is(configuredMT) to query whether this file can be treated by a configured component), and how to implement a Node2Bean converter.

http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/index.html?com/google/common/net/MediaType.html


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