Examples of createCollection()


Examples of org.xmldb.api.modules.CollectionManagementService.createCollection()

            DatabaseManager.registerDatabase(database);

            Collection rootCollection = DatabaseManager.getCollection(URI + XmldbURI.ROOT_COLLECTION, "admin", "");
 
            CollectionManagementService cms = (CollectionManagementService) rootCollection.getService("CollectionManagementService", "1.0");
            Collection adminCollection = cms.createCollection(ADMIN_COLLECTION_NAME);
            UserManagementService ums = (UserManagementService) rootCollection.getService("UserManagementService", "1.0");
            if (ums != null) {
                Permission p = ums.getPermissions(adminCollection);
                p.setMode(Permission.USER_STRING + "=+read,+write," + Permission.GROUP_STRING + "=-read,-write," + Permission.OTHER_STRING + "=-read,-write");
                ums.setPermissions(adminCollection, p);
View Full Code Here

Examples of org.xmldb.api.modules.CollectionManagementService.createCollection()

    @Test(expected=XMLDBException.class) // fails since guest has no write permissions
    public void worldCreateCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "guest", "guest");
        final CollectionManagementService cms = (CollectionManagementService)test.getService("CollectionManagementService", "1.0");
        cms.createCollection("createdByGuest");
    }

    @Test(expected=XMLDBException.class) // fails since guest has no write permissions
    public void worldAddResource() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "guest", "guest");
View Full Code Here

Examples of org.xmldb.api.modules.CollectionManagementService.createCollection()

    @Test
    public void groupCreateSubColl() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
        final CollectionManagementService cms = (CollectionManagementService)test.getService("CollectionManagementService", "1.0");
        final Collection newCol = cms.createCollection("createdByTest2");
        assertNotNull(newCol);
    }

    @Test
    public void groupCreateResource() throws XMLDBException {
View Full Code Here

Examples of xbird.storage.DbCollection.createCollection()

    public DocumentTableTest() throws DbException {
        super(DocumentTableTest.class.getName());
        DbCollection rootCol = DbCollection.getRootCollection();
        rootCol.removeCollection("/test");
        DbCollection testCol = rootCol.createCollection("test");
        testCol.createCollection("xmark");
    }

    public void xtestPutDocument() throws XQueryException, DbException, FileNotFoundException {
        DbCollection xmarkCol = DbCollection.getCollection("/test/xmark");
        DbCollection xmark = xmarkCol.createCollection("dtm");
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.