Iterator<Literal> oldPasswordsSha1 = userNode.getLiterals(PERMISSION.passwordSha1);
Literal oldPasswordSha1 = oldPasswordsSha1.next();
// no exception, if there is no value, let it break totally, if more than one - it is broken elsewhere
userNode.addPropertyValue(PERMISSION.passwordSha1, passwordSha1);
// workaround for possible issue in verification re. PlainLiteral vs. xsd:string
// userNode.addProperty(PERMISSION.passwordSha1, new PlainLiteralImpl(passwordSha1));
// most likely not a problem, and the above will work
userNode.deleteProperty(PERMISSION.passwordSha1, oldPasswordSha1);