Package org.apache.wookie.beans.util

Examples of org.apache.wookie.beans.util.IPersistenceManager.findAll()


   */
  public List<UpdateInformation> getAllUpdates(){
    ArrayList<UpdateInformation> updates = new ArrayList<UpdateInformation>();
    // Get all installed widgets
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidget[] widgets = persistenceManager.findAll(IWidget.class);
    for (IWidget widget: widgets){
      // Check for a valid update document; if there is one, create a new UpdateInformation object and add to list
      UpdateDescriptionDocument udd = UpdateUtils.checkForUpdate(widget.getUpdateLocation(), widget.getVersion());
      if (udd != null){
        UpdateInformation info = new UpdateInformation();
View Full Code Here


        persistenceManager.begin();

        //
        // test findAll method for IWidget
        //
        IWidget [] allWidgets = persistenceManager.findAll(IWidget.class);
        assertNotNull(allWidgets);
        assertEquals(1, allWidgets.length);

        //
        // test findById  for IWidget
View Full Code Here

        // Get the first existing API key
        // and first existing Widget to use as the basis of a 
        // new Widget Instance
        //
        String apiKey = "TEST";
        IWidget [] widgets = persistenceManager.findAll(IWidget.class);
        IWidget widget = widgets[0];       
        widgetGuid = widget.getIdentifier();
       
        //
        // check that the Widget Instance does not yet exist
View Full Code Here

        persistenceManager.begin();
       
        //
        // Get the widget instance created in the previous transaction
        //
        widgets = persistenceManager.findAll(IWidget.class);
        widget = widgets[0];
        IWidgetInstance widgetInstance0 = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNotNull(widgetInstance0);
        widgetGuid = widget.getIdentifier();
       
View Full Code Here

        persistenceManager.begin();
       
        //
        // verify test deletes
        //
        IWidgetInstance [] widgetInstances = persistenceManager.findAll(IWidgetInstance.class);
        assertNotNull(widgetInstances);
        assertEquals(0, widgetInstances.length);
        participants = persistenceManager.findAll(IParticipant.class);
        assertNotNull(participants);
       
View Full Code Here

        // verify test deletes
        //
        IWidgetInstance [] widgetInstances = persistenceManager.findAll(IWidgetInstance.class);
        assertNotNull(widgetInstances);
        assertEquals(0, widgetInstances.length);
        participants = persistenceManager.findAll(IParticipant.class);
        assertNotNull(participants);
       
        // TODO - this fails with the result being 1
        // assertEquals(0, participants.length);
       
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.