public List<MessageDTO> receiveNewMessages(FolderDTO folderDTO)
			throws DataProcessingException {

		Folder folder = folderDAO.getFolder(folderDTO.getId());
		if (folder == null) {
			logger.warn("Folder with name " + folderDTO.getFolderName() + " does not exist");
			throw new DataProcessingException(ExceptionType.folderDoesNotExist);
		}

		List<Message> newMessages = messageDAO.getNewMessages(folder);

		if (newMessages == null) {
			return null;
		}

		List<MessageDTO> listOfMessagesDTO = new ArrayList<MessageDTO>();
		for (Message message : newMessages) {
			message.setMessageReadFlag(true);
			listOfMessagesDTO.add(message.getMessageDTO());
		}
		return listOfMessagesDTO;
	}