Need something with a bit more grunt and security than an LM317. This scales down to 100mA charge current and up to 5A and handles high mains voltages, overloads, shorts, reverse connection, source failure and most importantly protects the £1500 worth of kit connected to it if the regulator or battery fails and dumps more than 15V out. Also it handles CC initial charge, dropping to very precise CV mode once it is done. it can withstand a 95A fault current for ~2 seconds (enough to blow the fuse) and a persistent 15A fault current on all battery connected ports.
Incidentally even a nice TI LM317 doesn't last particularly long if you run it at the line eventually going in/out short hence why you tends to see fat 5W zeners across the output on anything worth more than about a quid.