The California Supreme Court decided Monday that local governments can require developers to supply a certain percentage of below-market-rate housing as a condition of building permits. The landmark ruling ends a years-long legal battle for San Jose.