class LocalDhisResourceRepositoryContainerImpl implements LocalDhisResourceRepositoryContainer {

    @Override
    public void apply( @Nonnull LocalDhisRepositoryResultCallback resultCallback )
    {
        supportedResourceClasses.stream().map( repositoryItems::get ).filter( Objects::nonNull )
            .forEach( ri -> ri.applySaves( resultCallback ) );

        // deletion should be made in reverse order in order to honor constraints between resources
        Lists.reverse( new ArrayList<>( supportedResourceClasses ) ).stream().map( repositoryItems::get ).filter( Objects::nonNull )
            .forEach( ri -> ri.applyDeletes( resultCallback ) );
    }

    public  LocalDhisResourceRepositoryContainerImpl( @Nonnull Set<Class<? extends DhisResource>> supportedResourceClasses );

}