Put the gammon joint into a large pan and cover with cold water. Bring to the boil, cook for 5 minutes, then drain.
Put 50 ml of the cranberry juice aside and pour the rest over the gammon - it will not cover the joint fully. Add the onion, bay leaf, star anise and cinnamon stick. Bring to the boil, cover, then simmer over low heat for an hour. Transfer the ham to a plate, let it cool a bit, then remove the skin and the fat.
Preheat the oven to oven to 190°C. Mix the glaze.
Transfer the ham to a baking dish. Pour some of the cooking jus around it.
Using a silicon brush, glaze the ham all over, then put the dish in the middle of the oven for about 15 minutes.
Take it out, turn the ham over and glaze again.
Return the dish to the oven and bake for 15-20 minutes until the ham is golden brown. Keep an eye on it -you might need to turn the ham again, if the top is browning too quickly.
Transfer the ham to a plate and let it rest for 10 minutes, then carve.