Boundary Conditions in Extended Thermodynamics and Applications