class CmMgmtServiceConfigLocationService implements CmConfigServiceDelegate {

    @Override
    public void setConfigs(Stack stack, ApiRoleList apiRoleList) {
        Optional<ApiRole> eventServer = getApiRole("EVENTSERVER", apiRoleList);
        eventServer.ifPresent(apiRole -> addConfig(apiRole, createApiConfig("eventserver_index_dir",
                buildSingleVolumePath(1, "cloudera-scm-eventserver"))));

        Optional<ApiRole> hostMonitor = getApiRole("HOSTMONITOR", apiRoleList);
        hostMonitor.ifPresent(apiRole -> addConfig(apiRole, createApiConfig("firehose_storage_dir",
                buildSingleVolumePath(1, "cloudera-host-monitor"))));

        Optional<ApiRole> reportsManager = getApiRole("REPORTSMANAGER", apiRoleList);
        reportsManager.ifPresent(apiRole -> addConfig(apiRole, createApiConfig("headlamp_scratch_dir",
                buildSingleVolumePath(1, "cloudera-scm-headlamp"))));

        Optional<ApiRole> serviceMonitor = getApiRole("SERVICEMONITOR", apiRoleList);
        serviceMonitor.ifPresent(apiRole -> addConfig(apiRole, createApiConfig("firehose_storage_dir",
                buildSingleVolumePath(1, "cloudera-service-monitor"))));
    }

}