1cm should be long enough as far as I can tell, will just have to adjust the brakes a bit.That solenoid needs ~1.2A as far as I can tell. So it'll put a pretty big load on your batteries. The cells will need to be AA equivalent or bigger. I don't think a AAA-equivalent can cut it.
The pull length of that solenoid is just 1cm. Is that enough? If you need a longer pull, you'll need to lever it up and that will require a larger pull strength.
So if I used 8 AA 1.5v batteries to make the 12v that would be fine?