Advertisement
Guest User

Untitled

a guest
Apr 15th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def getPropertyValueOnNode(propName, nodePath) {
  2. session?.logout()
  3. session = repo.login(new SimpleCredentials(username, password.toCharArray()))
  4.  
  5. def jcrContent = "${nodePath}/jcr:content"
  6. if (session.nodeExists(jcrContent)) {
  7. Node n = session.getNode(jcrContent)
  8. if (n.hasProperty(propName)) {
  9. return n.getProperty(propName).getString()
  10. }
  11. }
  12. return null
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement