Package org.apache.wookie.beans.util

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


      // Otherwise, return default widgets for the defined services. In
      // future we may want
      // to move this into the Services controller.
    } else {
      ArrayList<IWidget> widgetsarr = new ArrayList<IWidget>();
      for (IWidgetDefault widgetDefault : persistenceManager.findAll(IWidgetDefault.class)) {
        widget = widgetDefault.getWidget();
        if (!widget.getGuid().equals("http://notsupported")) {
          widgetsarr.add(widget);
        }
      }
View Full Code Here


  /* (non-Javadoc)
   * @see org.apache.wookie.controller.Controller#index(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  protected void index(HttpServletRequest request, HttpServletResponse response) throws IOException{
      IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetService[] ws = persistenceManager.findAll(IWidgetService.class);
    boolean defaults = (request.getParameter("defaults") != null);
    returnXml(WidgetServiceHelper.createXMLWidgetServicesDocument(ws, getLocalPath(request),defaults, getLocales(request)), response);
  }
 
  /* (non-Javadoc)
 
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

        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.getGuid();
       
        //
        // 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.getGuid();
       
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.