Examples of removeResource()


Examples of org.rhq.enterprise.gui.legacy.WebUserPreferences.AlertsPortletPreferences.removeResource()

        String forwardStr = RetCodeConstants.SUCCESS_URL;
        if (pForm.isRemoveClicked()) {
            AlertsPortletPreferences alertPrefs = preferences.getAlertsPortletPreferences();
            for (Integer doomedResourceId : pForm.getIds()) {
                alertPrefs.removeResource(doomedResourceId);
            }
            preferences.setAlertsPortletPreferences(alertPrefs);
            forwardStr = "review";
        } else if (pForm.isOkClicked()) {
            AlertsPortletPreferences alertPrefs = preferences.getAlertsPortletPreferences();
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

                }
           
                if (table.get(XMLTools.NAME_OF) != null) {
                     Resource colresource = col.getResource((String)table.get(XMLTools.NAME_OF));
                       
                     col.removeResource(colresource);
                     System.out.println("DELETED: " + table.get(XMLTools.COLLECTION) + "/" + table.get(XMLTools.NAME_OF));
                }
               
                else {
                    // User did not supply document name
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

                              String name)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      XMLResource document = (XMLResource) col.getResource(name);

      col.removeResource(document);
   }

}
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

        String[] resources = collection.listResources();
        assertNotNull("Can not be null", resources);
        assertEquals("Should have one resource", 1, resources.length);
        assertEquals("Resource ID should match", id, resources[0]);

        collection.removeResource(newResource);
    }

  public void testRemove() throws Exception {
    Collection collection = client.getCollection(TEST_COLLECTION_PATH);
    if (collection == null) {
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

    String id = newResource.getId();

    Resource foundResource = collection.getResource(id);
    assertNotNull("It should be in there", foundResource);

        collection.removeResource(foundResource);
        foundResource = collection.getResource(id);
        assertNull("It should not be in there anymore", foundResource);
  }
}
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        XMLResource document = (XMLResource) col.getResource(name);

        col.removeResource(document);
    }
}
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

                }

                if (table.get(XMLTools.NAME_OF) != null) {
                    Resource colresource = col.getResource((String) table.get(XMLTools.NAME_OF));

                    col.removeResource(colresource);
                    System.out.println("DELETED: " + table.get(XMLTools.COLLECTION) + "/" + table.get(XMLTools.NAME_OF));
                } else {
                    // User did not supply document name
                    System.out.println("ERROR : Document Key and switch required");
                }
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

    try {

      collection = getCollection("xmldb:xindice:///db/addressbook");

      Resource document = collection.getResource(args[0]);
      collection.removeResource(document);
      System.out.println("Document " + args[0] + " removed");
    }
    catch (XMLDBException e) {
      System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
    }
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

        
         // Get the documentKey for this particular Person
         String dockey = person.getDocKey();
        
         // Delete the document
         col.removeResource(col.getResource(dockey) );
        
      } catch (Exception e) {
         e.printStackTrace();

    // there's not much else we can do if the response is committed
View Full Code Here

Examples of org.xmldb.api.base.Collection.removeResource()

        String[] resources = collection.listResources();
        assertNotNull("Can not be null", resources);
        assertEquals("Should have one resource", 1, resources.length);
        assertEquals("Resource ID should match", id, resources[0]);

        collection.removeResource(newResource);
    }

  public void testBinaryRemove() throws Exception {
    Collection collection = client.getCollection(TEST_COLLECTION_PATH);
    if (collection == null) {
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.