Court sentences man to seven years imprisonment for violating protection order