Package org.apache.wookie.beans.util

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


    IWidgetInstance instance = null;
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    if (widgetId != null){
      widgetId = URLDecoder.decode(widgetId, "UTF-8"); //$NON-NLS-1$
      _logger.debug("Looking for widget instance with widgetid of " + widgetId);
      instance = persistenceManager.findWidgetInstanceByGuid(apiKey, userId, sharedDataKey, widgetId);
    }
    return instance;
  }
}
View Full Code Here


      String sharedDataKey = WidgetInstancesController.getSharedDataKey(request);
      String widgetId = request.getParameter("widgetid");
      if (widgetId != null){
        widgetId = URLDecoder.decode(widgetId, "UTF-8"); //$NON-NLS-1$
        _logger.debug("Looking for widget instance with widgetid of " + widgetId);
        instance = persistenceManager.findWidgetInstanceByGuid(apiKey, userId, sharedDataKey, widgetId);
      } else {
        String serviceType = URLDecoder.decode(request.getParameter("servicetype"), "UTF-8"); //$NON-NLS-1$
        _logger.debug("Looking for widget instance of service type " + serviceType);
        instance = persistenceManager.findWidgetInstance(apiKey, userId, sharedDataKey, serviceType);
      }
View Full Code Here

    IWidgetInstance instance = null;
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    if (widgetId != null){
      widgetId = URLDecoder.decode(widgetId, "UTF-8"); //$NON-NLS-1$
      _logger.debug("Looking for widget instance with widgetid of " + widgetId);
      instance = persistenceManager.findWidgetInstanceByGuid(apiKey, userId, sharedDataKey, widgetId);
    }
    return instance;
  }
}
View Full Code Here

        IApiKey [] apiKeys = persistenceManager.findAll(IApiKey.class);
        String apiKey = apiKeys[0].getValue();
        IWidget [] widgets = persistenceManager.findAll(IWidget.class);
        IWidget widget = widgets[0];       
        widgetGuid = widget.getGuid();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNull(widgetInstance);
        widgetInstance = persistenceManager.newInstance(IWidgetInstance.class);
        widgetInstance.setApiKey(apiKey);
        widgetInstance.setWidget(widget);
        widgetInstance.setIdKey("test");
View Full Code Here

        widget = widgets[0];
        String serviceContext = widget.getWidgetTypes().iterator().next().getWidgetContext();
        IWidgetInstance widgetInstance0 = persistenceManager.findWidgetInstance(apiKey, "test", "test-shared-data-key", serviceContext);
        assertNotNull(widgetInstance0);
        widgetGuid = widget.getGuid();
        IWidgetInstance widgetInstance1 = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNotNull(widgetInstance1);
        assertEquals(widgetInstance0, widgetInstance1);
        IWidgetInstance widgetInstance2 = persistenceManager.findWidgetInstanceByIdKey("test");
        assertNotNull(widgetInstance2);
        assertEquals(widgetInstance0, widgetInstance2);
View Full Code Here

        widgetGuid = widget.getGuid();
       
        //
        // check that the Widget Instance does not yet exist
        //
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNull(widgetInstance);
       
        //
        // Create the Widget Instance
        //
View Full Code Here

        widgetGuid = widget.getGuid();
       
        //
        // Get the widget instance created in the previous transaction via "widget GUID"
        //
        IWidgetInstance widgetInstance1 = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNotNull(widgetInstance1);
        assertEquals(widgetInstance0, widgetInstance1);
       
        //
        // Get the widget instance created in the previous transaction via instance_idkey
View Full Code Here

    IWidgetInstance instance = null;
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    if (widgetId != null){
      widgetId = URLDecoder.decode(widgetId, "UTF-8"); //$NON-NLS-1$
      _logger.debug("Looking for widget instance with widgetid of " + widgetId);
      instance = persistenceManager.findWidgetInstanceByGuid(apiKey, userId, sharedDataKey, widgetId);
    }
    return instance;
  }
}
View Full Code Here

        widgetGuid = widget.getIdentifier();
       
        //
        // check that the Widget Instance does not yet exist
        //
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
        assertNull(widgetInstance);
       
        //
        // Create the Widget Instance
        //
View Full Code Here

        //
        // 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();
       
        //
        // Get the widget instance created in the previous transaction via "widget GUID"
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.