Examples of copyResource()


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

        //now copy /db/securityTest2/test.xml to /db/securityTest2/parentCollection/test.xml
        //as "user3:guest", it should inherit the group ownership 'users' from the parent collection which is setGid
        //and it should NOT have its setGid bit set as it is a resource
        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

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

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

                        //XmldbURI resource = XmldbURI.create(resource);
                        service.copyResource( XmldbURI.xmldbUriFor( resource ), XmldbURI.xmldbUriFor( destination ), XmldbURI.xmldbUriFor( name ) );
                    }

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

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

                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.copyResource(doc, destination, null);
            } catch (final XMLDBException e) {
    logger.error("XMLDB exception caught: ", e);
                throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
            }
           
View Full Code Here

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

                getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);

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

        } catch (Exception e) {
            String msg = "Failed to copy 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.