Package org.springframework.extensions.jcr

Examples of org.springframework.extensions.jcr.JcrCallback


      }
    } );
  }

  public static void move( final JcrTemplate jcrTemplate, final String src, final String dest ) {
    jcrTemplate.execute( new JcrCallback() {
      public Void doInJcr( final Session session ) throws RepositoryException {
        session.move( src, dest );
        session.save();
        return null;
      }
View Full Code Here


      }
    } );
  }

  public static boolean isCheckedOut( final JcrTemplate jcrTemplate, final String absPath ) {
    return (Boolean) jcrTemplate.execute( new JcrCallback() {
      public Object doInJcr( final Session session ) throws RepositoryException {
        Item item = session.getItem( absPath );
        Assert.isTrue( item.isNode() );
        return ( (Node) item ).isCheckedOut();
      }
View Full Code Here

      }
    } );
  }

  public static String getVersionHistoryNodePath( final JcrTemplate jcrTemplate, final String absPath ) {
    return (String) jcrTemplate.execute( new JcrCallback() {
      public Object doInJcr( final Session session ) throws RepositoryException {
        Item item = session.getItem( absPath );
        Assert.isTrue( item.isNode() );
        Node node = ( (Node) item );
        return node.getVersionHistory().getPath();
View Full Code Here

TOP

Related Classes of org.springframework.extensions.jcr.JcrCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.