How can i update a doc with script in java api 1.7