@Before
  public void setUp() throws RepositoryException {

    JCRNodeWrapper shared = session.getNode("/sites/html-filtering/contents");
    if (!shared.isCheckedOut()) {
      session.checkout(shared);
    }
    if (shared.hasNode("html-filtering")) {
      shared.getNode("html-filtering").remove();
    }

    node = shared.addNode("html-filtering", "jnt:mainContent");
    session.save();
  }
예제 #2
0
 public void save()
     throws AccessDeniedException, ItemExistsException, ConstraintViolationException,
         InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException,
         RepositoryException {
   save(JCRObservationManager.SESSION_SAVE);
 }
 @After
 public void tearDown() throws Exception {
   node.remove();
   session.save();
 }