Examples of moveResource()


Examples of org.exist.storage.DBBroker.moveResource()

              }
             
              newName = destinationPath.lastSegment();
 
              transaction = tm.beginTransaction();
              broker.moveResource(transaction, doc, destination, newName);
              tm.commit(transaction);
              return true;
             
          } catch ( final Exception e ) {
            e.printStackTrace();
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

                throw new RemoteException("Destination collection " + destinationPath + " not found");
            }
            if(move)
// TODO check XML/Binary resource
//                broker.moveResource(transaction, doc, destination, newName);
                {broker.moveResource(transaction, doc, destination, newName);}
            else
// TODO check XML/Binary resource
//                broker.copyResource(transaction, doc, destination, newName);
                {broker.copyResource(transaction, doc, destination, newName);}
            transact.commit(transaction);
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

            // Perform actial move/copy
            if (mode == Mode.COPY) {
                broker.copyResource(txn, srcDocument, destCollection, newNameUri);

            } else {
                broker.moveResource(txn, srcDocument, destCollection, newNameUri);
            }


            // Commit change
            txnManager.commit(txn);
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

            if(destination == null) {
                transact.abort(transaction);
                throw new EXistException("Destination collection " + destUri + " not found");
            }
            if(move)
                {broker.moveResource(transaction, doc, destination, newName);}
            else
                {broker.copyResource(transaction, doc, destination, newName);}
            transact.commit(transaction);
            return true;
        } catch (final LockException e) {
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

            final TransactionManager txnManager = pool.getTransactionManager();
            final Txn txn = txnManager.beginTransaction();
          try {
                DocumentImpl doc3 = col1.getDocument(broker, doc3uri.lastSegment());
              broker.moveResource(txn, doc3, col1, doc6uri.lastSegment());
              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
              fail(e.getMessage());
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

          try {
              Collection col2 = broker.getOrCreateCollection(txn, col2uri);
          broker.saveCollection(txn, col2);

                DocumentImpl doc3 = col1.getDocument(broker, doc3uri.lastSegment());
            broker.moveResource(txn, doc3, col2, doc5uri.lastSegment());

              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

            final TransactionManager txnManager = pool.getTransactionManager();
            final Txn txn = txnManager.beginTransaction();
          try {
                final DocumentImpl doc1 = col1.getDocument(broker, doc1uri.lastSegment());
              broker.moveResource(txn, doc1, col, doc2uri.lastSegment());
              txnManager.commit(txn);
          } catch (Exception e) {
                e.printStackTrace();
                txnManager.abort(txn);
              fail(e.getMessage());
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

          try {
              Collection col2 = broker.getOrCreateCollection(txn, col2uri);
          broker.saveCollection(txn, col2);

                DocumentImpl doc1 = col1.getDocument(broker, doc1uri.lastSegment());
              broker.moveResource(txn, doc1, col2, doc4uri.lastSegment());

              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + destinationPath + " not found");
            }
            if (newName == null)
                {newName = resourcePath.lastSegment();}
           
            broker.moveResource(transaction, doc, destination, newName);
            transact.commit(transaction);
        } catch ( final EXistException e ) {
            transact.abort(transaction);
          e.printStackTrace();
            throw new XMLDBException( ErrorCodes.VENDOR_ERROR,
View Full Code Here

Examples of org.exist.storage.DBBroker.moveResource()

              txnManager = pool.getTransactionManager();
              assertNotNull(txnManager);
              txn = txnManager.beginTransaction();
              assertNotNull(txn);
           
              broker.moveResource(txn, doc1, col, doc2uri.lastSegment());

              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.