/** * Add a new file to the deliver * * @param file Path to the file * @return True if the file is correctly added or False otherwise. */ public boolean addFile(DeliverFile file) { if (!file.getAbsolutePath(_rootPath).exists()) { return false; } _files.add(file.clone()); return true; }
/** * Basic copy constructor * * @param deliver Deliver object with data */ public Deliver(Deliver deliver) { _deliverID = new DeliverID(deliver._deliverID); _rootPath = deliver._rootPath; for (DeliverFile file : deliver._files) { _files.add(file.clone()); } _creationDate = deliver._creationDate; _userLabClassroom = deliver._userLabClassroom; _userMainClassroom = deliver._userMainClassroom; }