Package org.exist.storage

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


            if(destination == null) {
                transact.abort(transaction);
                throw new EXistException("Destination collection " + destinationPath + " not found");
            }
            if(move)
                {broker.moveCollection(transaction, collection, destination, newName);}
            else
                {broker.copyCollection(transaction, collection, destination, newName);}
            transact.commit(transaction);
//            documentCache.clear();
            return true;
View Full Code Here


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

            } else {
                broker.moveCollection(txn, srcCollection, destCollection, newNameUri);
            }

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

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

          System.out.println("MOVE...");

            final TransactionManager txnManager = pool.getTransactionManager();
            final Txn txn = txnManager.beginTransaction();
          try {
              broker.moveCollection(txn, col1, parentCol, col2uri.lastSegment());
              txnManager.commit(txn);
          } catch (Exception e) {
                e.printStackTrace();
                txnManager.abort(txn);
              fail(e.getMessage());
View Full Code Here

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

              txnManager = pool.getTransactionManager();
              assertNotNull(txnManager);
              txn = txnManager.beginTransaction();
              assertNotNull(txn);
             
              broker.moveCollection(txn, col, parent, col3uri.lastSegment());
           
              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
View Full Code Here

              txnManager = pool.getTransactionManager();
              assertNotNull(txnManager);
              txn = txnManager.beginTransaction();
              assertNotNull(txn);
             
              broker.moveCollection(txn, col, parent, col3uri.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.