SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-382
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Maurice Nicholson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Add mapping configuration model API

Created: 17/Mar/07 10:21 AM   Updated: 02/May/07 03:33 PM
Component/s: Compass::Core
Affects Version/s: None
Fix Version/s: 1.1.2, 1.2 M1


 Description  « Hide
AFAIK the only way to do programmatic Java class mapping configuration is to generate XML on the fly then pass it to Compass using, for example
configuration.addInputStream(is, name)

This works but feels a little clunky, and apart from other things means a dependency (for me) on XML tools (yuck!) and the XML config schema.

A neater solution would be for Compass to provide a runtime mapping API so I can work directly with that in Java.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 01/May/07 03:47 PM
Added the ability to call CompassConfiguration#addResourceMapping(ResourceMapping). Resource Mapping is a super interface for all different mappings supported by Compass, such as ClassMapping.

In order to understand how it can be used, I suggest looking at: XmlMappingBinding or AnnotationsMappingBinding. This is, at least, until I get a chance to update it in the reference documentation.


Shay Banon added a comment - 02/May/07 03:33 PM
backported this feature to 1.1 branch as well.