Examples of moveResource()


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

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

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

Examples of org.exist.xmldb.CollectionManagementServiceImpl.moveResource()

                    } else {
                        log( msg, Project.MSG_ERR );
                    }

                } else {
                    service.moveResource( XmldbURI.xmldbUriFor( resource ), XmldbURI.xmldbUriFor( destination ), XmldbURI.xmldbUriFor( name ) );
                }

            } else {
                log( "Moving collection: " + collection, Project.MSG_INFO );
                service.move( XmldbURI.xmldbUriFor( collection ), XmldbURI.xmldbUriFor( destination ), XmldbURI.xmldbUriFor( name ) );
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.moveResource()

        assertNotNull(f);
      Resource res = test2.createResource("test3.xml", "XMLResource");
      res.setContent(f);
      test2.storeResource(res);

      mgr.moveResource(XmldbURI.create(XmldbURI.ROOT_COLLECTION +  "/test2/test3.xml"),
                TestConstants.TEST_COLLECTION_URI, XmldbURI.create("new_test3.xml"));
  }

  private void doXmldbRead() throws XMLDBException {
    BrokerPool.FORCE_CORRUPTION = false;
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.moveResource()

                if (resource == null) {
                    logger.error( "Resource " + doc + " not found");
                    throw new XPathException(this, "Resource " + doc + " not found");
                }
                final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
                service.moveResource(doc, destination, null);
            } catch (final XMLDBException e) {
                logger.error(e.getMessage());
                throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
            }
        } else {
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.moveResource()

          throw new XPathException(this, "Resource " + doc + " not found");
                }
               final String newName = args[2].itemAt(0).getStringValue();
         final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl)
          collection.getService("CollectionManagementService", "1.0");
        service.moveResource(doc, (XmldbURI) null,
                        XmldbURI.xmldbUriFor(newName));
      } catch (final XMLDBException e) {
                logger.error(e.getMessage());

        throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
View Full Code Here

Examples of org.wso2.carbon.registry.resource.ui.clients.ResourceServiceClient.moveResource()

                getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);

        try {
            ResourceServiceClient client =
                    new ResourceServiceClient(cookie, config, request.getSession());
            client.moveResource(parentPath, oldResourcePath, destinationPath, resourceName);

        } catch (Exception e) {
            String msg = "Failed to move resource " + oldResourcePath +
                    " to the path " + destinationPath + ". " + e.getMessage();
            log.error(msg, e);
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.