public static boolean addNewTask(Task newTask, Long userId, Long clientId, Long projectId, 
			Long taskTypeId, Long timestamp) {
		// Get the information of the user
		User user = null;
		try {
			user = DAOFactory.getUserDAO().findById(userId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		if (user == null)
			return false;
		System.out.println(userId);
		
		newTask.setUserId(userId);
		newTask.setLastModifyByClientId(clientId);
		
		if (clientId == null)
			return false;
		
		// If this task belongs to one project
		if (projectId != null) {
			newTask.setProjectId(projectId);
		}
		
		// If this task belongs to one task type
		if (taskTypeId != null) {
			newTask.setTaskTypeId(taskTypeId);
		}
		
		// Final save the task by adding default settings
		newTask.setLastModifyTime(new Timestamp(timestamp));
		newTask.setStatus(SharedConstants.ACTIVE_INTEGER);
		newTask.setLastModifyByClientId(clientId);
		
		try {
			DAOFactory.getTaskDAO().persist(newTask);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return true;
		
	}