Customization Guide

Customize FS-CD Domain Values

The interface DomainValueSource defines the contract for resolving domain values and localized texts. For instance dunning level value 1 stands for Reminder.

The default implementation PropertiesDomainValueSource uses resource bundles (locale-specific properties files). The default resource bundle is de.faktorzehn.fscdadapter.domain.

excerpt from domain_de.properties
dunningLevel.1=Erinnerung
dunningLevel.2=Qualifizierte Mahnung
dunningLevel.3=Nachmahnung
#...

Domain objects store both the ID and the localized text for their enumeration-like attributes using IdName data objects. For example, if FS-CD returns the value 1 for dunning level, the domain object’s dunningLevel attribute contains an IdName object with { id : "1", name: "Erinnerung" }.

To customize domain values and texts either use a custom resource bundle by setting property jco.domain-bundle, or replace the DomainValueSource implementation:

@Service
public class MyDomainValueSource implements DomainValueSource {

    @Override
    public String getText(List<Pair<Attribute, String>> attributeValueMap, Locale locale){
        // your custom logic
    }

    // other methods
}