Examples of findWidgetInstanceByIdKey()


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

      //
      // Check that the request is coming from a valid widget
      //
      IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      IWidgetInstance instance = persistenceManager.findWidgetInstanceByIdKey(request.getParameter("instanceid_key"))
      if(instance == null && !isDefaultGadget(request)){
        response.sendError(HttpServletResponse.SC_FORBIDDEN,"<error>"+UNAUTHORISED_MESSAGE+"</error>")
        return;
      }
View Full Code Here

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

    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();

    // Try using the id_key parameter
    String id_key = request.getParameter("id_key"); //$NON-NLS-1$
    if (id_key != null & id_key != ""){
      instance = persistenceManager.findWidgetInstanceByIdKey(id_key);
      return instance;
    }
   
    // Try using the resource part of the path as an id key e.g. widgetinstances/xyz
    id_key = getResourceId(request);
View Full Code Here

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

    }
   
    // Try using the resource part of the path as an id key e.g. widgetinstances/xyz
    id_key = getResourceId(request);
    if (id_key != null & id_key != ""){
      instance = persistenceManager.findWidgetInstanceByIdKey(id_key);
      return instance;
    }

    //
    // If all else fails, try using instance parameters
View Full Code Here

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

        assertEquals(widgetInstance0, widgetInstance1);
       
        //
        // Get the widget instance created in the previous transaction via instance_idkey
        //
        IWidgetInstance widgetInstance2 = persistenceManager.findWidgetInstanceByIdKey("test");
        assertNotNull(widgetInstance2);
        assertEquals(widgetInstance0, widgetInstance2);
       
        //
        // Get the participant created in the previous transaction by widget instance
View Full Code Here

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

        assertEquals(widgetInstance0, widgetInstance1);
       
        //
        // Get the widget instance created in the previous transaction via instance_idkey
        //
        IWidgetInstance widgetInstance2 = persistenceManager.findWidgetInstanceByIdKey("test");
        assertNotNull(widgetInstance2);
        assertEquals(widgetInstance0, widgetInstance2);
       
        //
        // Get the participant created in the previous transaction by widget instance
View Full Code Here

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

    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();

    // Try using the id_key parameter
    String id_key = request.getParameter("id_key"); //$NON-NLS-1$
    if (id_key != null & id_key != ""){
      instance = persistenceManager.findWidgetInstanceByIdKey(id_key);
      return instance;
    }
   
    // Try using the resource part of the path as an id key e.g. widgetinstances/xyz
    id_key = getResourceId(request);
View Full Code Here

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

    }
   
    // Try using the resource part of the path as an id key e.g. widgetinstances/xyz
    id_key = getResourceId(request);
    if (id_key != null & id_key != ""){
      instance = persistenceManager.findWidgetInstanceByIdKey(id_key);
      return instance;
    }

    //
    // If all else fails, try using instance parameters
View Full Code Here

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

    Messages localizedMessages = LocaleHandler.localizeMessages(request);
    if(id_key == null) return localizedMessages.getString("WidgetAPIImpl.0");
    if(key == null)return localizedMessages.getString("WidgetAPIImpl.1");
    // check if instance is valid
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    //
    IPreference preference = widgetInstance.getPreference(key);
    if (preference == null) return localizedMessages.getString("WidgetAPIImpl.1");
    return preference.getDvalue();
View Full Code Here

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

    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
    if(id_key==null) return localizedMessages.getString("WidgetAPIImpl.0");
    if(key==null) return localizedMessages.getString("WidgetAPIImpl.1");
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    ISharedData data = SharedDataHelper.findSharedData(widgetInstance, key);
    if (data == null) return localizedMessages.getString("WidgetAPIImpl.1");
    return data.getDvalue();
  }
View Full Code Here

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

  public String setSharedDataForKey(String id_key, String key, String value) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetInstance widgetInstance;//
    widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    if(widgetInstance.isLocked()) return localizedMessages.getString("WidgetAPIImpl.2");
    if(ContextListener.useSharedDataInstanceQueues){// 
      QueueManager.getInstance().queueSetSharedDataRequest(id_key, SharedDataHelper.getInternalSharedDataKey(widgetInstance), key, value, false);
    }
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.