public static boolean add(Task task) throws Exception {
		// check whether the task object is null.
		if (task == null) {
			throw new Exception(StringFormat.STR_ERROR_NULL_TASK_OBJECT);
		}
		// check whether task has task name.
		if (task.getTaskName().equals("")) {
			throw new Exception(StringFormat.STR_ERROR_NO_TASK_NAME);
		}
		// check the validity of Start & End time.
		if (task.getStartDateTime() != null && task.getEndDateTime() != null
				&& task.getStartDateTime().after(task.getEndDateTime())) {
			throw new Exception(String.format(
					StringFormat.STR_ERROR_START_TIME_AFTER_END_TIME,
					task.getFormatStartDateTime(), task.getFormatEndDateTime()));
		}
		// check the validity of Start time.
		if (task.getStartDateTime() != null
				&& task.getStartDateTime().before(new Date())) {

			throw new Exception(String.format(
					StringFormat.STR_ERROR_START_TIME_BEFORE_CURRENT_TIME,
					task.getFormatStartDateTime()));
		}
		// check the validity of End time.
		if (task.getEndDateTime() != null
				&& task.getEndDateTime().before(new Date())) {

			throw new Exception(String.format(
					StringFormat.STR_ERROR_END_TIME_BEFORE_CURRENT_TIME,
					task.getFormatEndDateTime()));
		}

		task.setTaskId(obtainNewTaskId());
		mainTaskList.addTask(task);
		setDisplayList(mainTaskList);

		LOGGER.info("==============\n" + "Storage : Add \n"
				+ "\tAdd a new task. " + "	task id : " + task.getTaskId()
				+ "\n" + "====================\n");

		return true;
	}