FxHierarchy

This hierarchy connects to the IFxRates bean and will fill the single level with the return of the method IFxRates::getAvailableCurrencies. The bean has to be declared by a call to the Atoti registration.

import com.activeviam.accelerator.common.postprocessor.fxconversion.impl.FxHierarchy;

// ....

PostProcessorUtils.injectAll(IFXRatesAware.class, fxRates);

// ....

hierarchyBuilder.toDimension(CURRENCY_DIMENSION,
        FxHierarchy.hierarchy(DISPLAY_CURRENCY_HIERARCHY)
            .slicing()
            .withLevel(DISPLAY_CURRENCY_LEVEL)
            .withCurrenciesOrder("EUR", "USD"));

Here are the methods exposed to set up the hierarchy:

Method Parameters Mandatory Usage
withAllMembersEnabled Boolean Specifies if the level 0 is the AllMembers level. Set to false makes the dimension slicing.
slicing Makes the hierarchy slicing, equivalent to withAllMembersEnabled(false).
withVisible Boolean Sets the visible flag to the hierarchy.
hidden Hides the hierarchy, equivalent to withVisible(false)
withLevel String X Specifies the name of the required level.
withType int The Copper type of the level (mandatory for Copper usage), for instance withType(Types.TYPE_STRING).
withComparator IComparator Sets the level comparator directly from a comparator object instance (the running hierarchy will create its own instance).
withComparator IComparatorDescription Sets the level comparator from a comparator description.
withComparator String Sets the level comparator from a comparator Plug-In Key.
withCurrenciesOrder String… Sets the level comparator with the provided currencies first.
withCurrenciesOrder List Sets the level comparator with the provided currencies first.