@Test(expected = IllegalStateException.class) public void testSetFolderParticipantsFromParentFolderThrowsIllegalStateExceptionWhenFolderHasNoParentFolder() { AcmFolder folder = new AcmFolder(); folder.setParentFolder(null); fileParticipantService.setFolderParticipantsFromParentFolder(folder); fail("IllegalStateException should have been thrown!"); }
@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()); folder.setModified(new Date()); }
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()); folder.setModified(new Date()); } }
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()); folder.setModified(new Date()); }  }
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()); folder.setModified(new Date()); }  @Transactional(rollbackFor = Exception.class) EcmFile setFileParticipantsFromParentFolder(EcmFile file); @Transactional(rollbackFor = Exception.class) void setFolderParticipantsFromParentFolder(AcmFolder folder); List<AcmParticipant> getFolderParticipantsFromParentAssignedObject(String objectType, Long objectId); List<AcmParticipant> getFolderParticipantsFromAssignedObject(List<AcmParticipant> assignedObjectParticipants); @Transactional(rollbackFor = Exception.class) void inheritParticipantsFromAssignedObject(List<AcmParticipant> assignedObjectParticipants,
            List<AcmParticipant> originalAssignedObjectParticipants, AcmContainer acmContainer, boolean restricted); @Transactional(rollbackFor = Exception.class) List<AcmParticipant> setFileParticipants(Long objectId, List<AcmParticipant> participants); @Transactional(rollbackFor = Exception.class) List<AcmParticipant> setFolderParticipants(Long objectId, List<AcmParticipant> participants); EcmFileDao getFileDao(); void setFileDao(EcmFileDao fileDao); AcmParticipantService getParticipantService(); void setParticipantService(AcmParticipantService participantService); AcmFolderService getFolderService(); void setFolderService(AcmFolderService folderService); EcmFileParticipantServiceHelper getFileParticipantServiceHelper(); void setFileParticipantServiceHelper(EcmFileParticipantServiceHelper fileParticipantServiceHelper); AcmFolderDao getFolderDao(); void setFolderDao(AcmFolderDao folderDao); EcmFileConfig getEcmFileConfig(); void setEcmFileConfig(EcmFileConfig ecmFileConfig); }
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()); folder.setModified(new Date()); }  @Transactional(rollbackFor = Exception.class) EcmFile setFileParticipantsFromParentFolder(EcmFile file); @Transactional(rollbackFor = Exception.class) void setFolderParticipantsFromParentFolder(AcmFolder folder); List<AcmParticipant> getFolderParticipantsFromParentAssignedObject(String objectType, Long objectId); List<AcmParticipant> getFolderParticipantsFromAssignedObject(List<AcmParticipant> assignedObjectParticipants); @Transactional(rollbackFor = Exception.class) void inheritParticipantsFromAssignedObject(List<AcmParticipant> assignedObjectParticipants,
            List<AcmParticipant> originalAssignedObjectParticipants, AcmContainer acmContainer, boolean restricted); @Transactional(rollbackFor = Exception.class) List<AcmParticipant> setFileParticipants(Long objectId, List<AcmParticipant> participants); @Transactional(rollbackFor = Exception.class) List<AcmParticipant> setFolderParticipants(Long objectId, List<AcmParticipant> participants); EcmFileDao getFileDao(); void setFileDao(EcmFileDao fileDao); AcmParticipantService getParticipantService(); void setParticipantService(AcmParticipantService participantService); AcmFolderService getFolderService(); void setFolderService(AcmFolderService folderService); EcmFileParticipantServiceHelper getFileParticipantServiceHelper(); void setFileParticipantServiceHelper(EcmFileParticipantServiceHelper fileParticipantServiceHelper); AcmFolderDao getFolderDao(); void setFolderDao(AcmFolderDao folderDao); EcmFileConfig getEcmFileConfig(); void setEcmFileConfig(EcmFileConfig ecmFileConfig);  }