class EcmFileParticipantService {

    @Transactional(rollbackFor = Exception.class)
    public void setFolderParticipantsFromParentFolder(AcmFolder folder)
    {
        if (folder.getParentFolder() == null)
        {
            throw new IllegalStateException("Folder doesn't have parent folder!");
        }

        folder.getParentFolder().getParticipants().forEach(participant -> participant.setReplaceChildrenParticipant(true));
        setFolderParticipants(folder, folder.getParentFolder().getParticipants(), folder.getRestricted());

        // modify the instance to trigger the Solr transformers
        folder.setModified(new Date());
    }

}