A Wisconsin judge ruled Tuesday that state regulators can force factory farms to obtain permits before they discharge pollutants, ensuring protections continue to apply preemptively for lakes, streams and drinking water.