Examples of removeCollection()


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

        System.out.println("getContent: " + s);
        System.out.println("getContentAsDOM: " + content);
        coll.removeResource(r);
      }

      cms.removeCollection("A");
      DatabaseManager.deregisterDatabase(database);
      DatabaseInstanceManager dim =
        (DatabaseInstanceManager) rootColl.getService(
          "DatabaseInstanceManager",
          "1.0");
View Full Code Here

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

                final Collection child = currentCollection.getChildCollection(name);

                if(child != null) {
                    currentCollection.setTriggersEnabled(false);
                    final CollectionManagementService cmgt = (CollectionManagementService)currentCollection.getService("CollectionManagementService", "1.0");
                    cmgt.removeCollection(name);
                    currentCollection.setTriggersEnabled(true);
                }
            } catch(final XMLDBException e) {
                listener.warn("Failed to remove deleted collection: " + name + ": " + e.getMessage());
            }
View Full Code Here

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

    @After
    public void tearDown() throws XMLDBException {
        //delete the test collection
        Collection root = DatabaseManager.getCollection(ROOT_URI, ADMIN_UID, ADMIN_PWD);
        CollectionManagementService cms = (CollectionManagementService)root.getService("CollectionManagementService", "1.0");
        cms.removeCollection(TEST_COLLECTION);
    }
}
View Full Code Here

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

    @After
    public void tearDown() throws XMLDBException {

        //delete the test collection
        CollectionManagementService service = (CollectionManagementService)testCollection.getParentCollection().getService("CollectionManagementService", "1.0");
        service.removeCollection(TEST_COLLECTION);

        //shutdownDB the db
        DatabaseManager.deregisterDatabase(database);
        DatabaseInstanceManager dim = (DatabaseInstanceManager) testCollection.getService("DatabaseInstanceManager", "1.0");
        dim.shutdown();
View Full Code Here

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

                    fail();
                } catch (XMLDBException e) {

                }

                cms.removeCollection(ADMIN_COLLECTION_NAME);
            }
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

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

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

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

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

    @Test(expected=XMLDBException.class)
    public void groupRemoveCollection_canNotWriteParent() throws XMLDBException {
        final Collection root = DatabaseManager.getCollection(baseUri + "/db", "test2", "test2");
        final CollectionManagementService cms = (CollectionManagementService)root.getService("CollectionManagementService", "1.0");
        cms.removeCollection("securityTest1");
    }

    @Test
    public void groupRemoveCollection_canWriteParent() throws XMLDBException {
        final Collection root = DatabaseManager.getCollection(baseUri + "/db", "admin", "");
View Full Code Here

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

    @Test
    public void groupRemoveCollection_canWriteParent() throws XMLDBException {
        final Collection root = DatabaseManager.getCollection(baseUri + "/db", "admin", "");
        final CollectionManagementService cms = (CollectionManagementService)root.getService("CollectionManagementService", "1.0");
        cms.removeCollection("securityTest1");
    }

    @Test(expected=XMLDBException.class)
    public void groupChmodCollection_asNotOwnerAndNotDBA() throws XMLDBException {
View Full Code Here

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

                }

            } else {
                log( "Removing collection: " + collection, Project.MSG_INFO );
                final CollectionManagementService service = (CollectionManagementService)base.getService( "CollectionManagementService", "1.0" );
                service.removeCollection( collection );
            }

        }
        catch( final XMLDBException e ) {
            final String msg = "XMLDB exception during remove: " + e.getMessage();
View Full Code Here

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

  }
 
  public static void removeCollection(Collection parent, String name) throws XMLDBException {
    CollectionManagementService service = getCollectionManagementService(
        parent);
    service.removeCollection(name);
  }
 
  public static CollectionManagementService getCollectionManagementService(
          Collection col) throws XMLDBException {
          return (CollectionManagementService)col.getService(
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.