Allow character object to be used in FreeMarker templates

Description

The FreeMarker templating system provides support for direct access to Java objects. In particular it's list directive allows the looping over a list of objects, very useful for say equipment lists or skill lists.

We should examine the feasibility of exposing a character output object to the FreeMarker templates in a similar way to the UI's CharacterFacade system. While many of the UI's facades may be reused, some lists such as templates, skills, abilities etc will have to expose the lists of export visible objects rather than the display visible objects.

Environment

None

Activity

Show:
Tom Parker
March 7, 2014, 7:58 PM

Looks to me like PC and the export handler are exposed right now - is that necessary or should we not be passing those to output (don't want people to start using something when long term I really don't think it is PlayerCharacter.class that we want to expose?

James Dempsey
March 7, 2014, 9:03 PM

Those two are there for use by the custom tags only. See pcgen.io.freemarker.PCStringDirective for an example of usage.

Other transport mechanisms could be examined, such as setters or supply via the constructor. I didn't do that initially as i expected that at some stage in the future the directives would be created once and shared.

James Dempsey
June 18, 2014, 3:58 PM

Superseded by

Cancelled

Assignee

Unassigned

Reporter

James Dempsey

Labels

None

Theme

None

Epic/Theme

None

Pending User Input

None

Time tracking

0m

Time remaining

168h

Components

Affects versions

Priority

Minor
Configure