First and second order optimality conditions in vector optimization