Examples of copyResource()


Examples of org.codehaus.enunciate.main.Enunciate.copyResource()

        debug("Default base to be used for documentation base.");
        enunciate.extractBase(loadDefaultBase(), buildDir);

        URL discoveredCss = DocumentationDeploymentModule.class.getResource("/META-INF/enunciate/css/style.css");
        if (discoveredCss != null) {
          enunciate.copyResource(discoveredCss, new File(new File(buildDir, "css"), "style.css"));
        }
        else if (this.css != null) {
          enunciate.copyFile(enunciate.resolvePath(this.css), new File(new File(buildDir, "css"), "style.css"));
        }
      }
View Full Code Here

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

//                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);
//            documentCache.clear();
            return;
        } catch (final LockException e) {
            transact.abort(transaction);
View Full Code Here

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

            }


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

            } else {
                broker.moveResource(txn, srcDocument, destCollection, newNameUri);
            }
View Full Code Here

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

                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) {

            transact.abort(transaction);
View Full Code Here

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

                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + destinationPath + " not found");
            }
          if(newName == null) {
            newName = resourcePath.lastSegment();
          }
            broker.copyResource(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.xmldb.CollectionManagementServiceImpl.copyResource()

        }
        final Resource srcDoc = resolveResource(source);
        if(srcDoc != null) {
            final XmldbURI resourcePath = XmldbURI.create(srcDoc.getParentCollection().getName()).append(srcDoc.getId());
            messageln("Copying resource '" + resourcePath + "' to '" + destination + "'");
            mgtService.copyResource(resourcePath, destination, destName);
        } else {
            messageln("Copying collection '" + source + "' to '" + destination + "'");
            mgtService.copy(source, destination, destName);
        }
    }
View Full Code Here

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

       
        CollectionManagementServiceImpl mgt = (CollectionManagementServiceImpl)
            col.getService("CollectionManagementService", "1.0");
        Collection copy = DBUtils.addCollection(col, "CC" + collectionCnt);
        for (int i = 0; i < resources.length; i++) {
           mgt.copyResource(target.getName() + '/' + resources[i],
                   copy.getName(), null);
        }
       
        System.out.println("Resources in collection " + copy.getName());
        resources = copy.listResources();
View Full Code Here

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

        test.storeResource(resSource);

        //as the 'test3' user copy the resource
        test = DatabaseManager.getCollection(baseUri + "/db/securityTest3", "test3", "test3");
        cms = (CollectionManagementServiceImpl) test.getService("CollectionManagementService", "1.0");
        cms.copyResource("/db/securityTest3/source.xml", "/db/securityTest3", "copy-of-source.xml");

        final UserManagementService ums = (UserManagementService) test.getService("UserManagementService", "1.0");
        final Permission permissions = ums.getPermissions(test.getResource("copy-of-source.xml"));

        //resource should be owned by test3:guest, i.e. permissions were not preserved from the test1 users doc /db/securityTest3/source.xml
View Full Code Here

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

       
        //as the 'test3' user copy the resource
        test = DatabaseManager.getCollection(baseUri + "/db/securityTest3", "test3", "test3");
        cms = (CollectionManagementServiceImpl) test.getService("CollectionManagementService", "1.0");
        cms.copyResource("/db/securityTest3/source.xml", "/db/securityTest3", "copy-of-source.xml");

        //as test3 user!
        ums = (UserManagementService) test.getService("UserManagementService", "1.0");
        final Permission permissions = ums.getPermissions(test.getResource("copy-of-source.xml"));
View Full Code Here

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

        //now copy /db/securityTest2/test.xml to /db/securityTest2/parentCollection/test.xml
        //as user3, it should have it's group set to the primary group of user3 i.e. 'guest'
        //as the collection is NOT setGid and it should not have the setGid bit
        test = DatabaseManager.getCollection(baseUri + "/db/securityTest2", "test3", "test3");
        cms = (CollectionManagementServiceImpl)test.getService("CollectionManagementService", "1.0");
        cms.copyResource("test.xml", "/db/securityTest2/parentCollection", "test.xml");
        ums = (UserManagementService)parentCollection.getService("UserManagementService", "1.0");

        parentCollection = test.getChildCollection("parentCollection");
        resource = parentCollection.getResource("test.xml");
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.