Examples of findWidgetInstanceByIdKey()


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

   */
  public String setPreferenceForKey(String id_key, String key, String value) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    //
    PropertiesController.updatePreference(widgetInstance, key, value);
    return "okay"; //$NON-NLS-1$
  }
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 = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    if(widgetInstance.isLocked()) return localizedMessages.getString("WidgetAPIImpl.2");
    //
    PropertiesController.updateSharedDataEntry(widgetInstance, key, value, false);
    Notifier.notifySiblings(widgetInstance);
View Full Code Here

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

   */
  public String appendSharedDataForKey(String id_key, String key, String value) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    if(widgetInstance.isLocked()) return localizedMessages.getString("WidgetAPIImpl.2");
    //
    PropertiesController.updateSharedDataEntry(widgetInstance, key, value, true);
    Notifier.notifySiblings(widgetInstance);
View Full Code Here

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

   */
  public String lock(String id_key) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    //
    String sharedDataKey = widgetInstance.getSharedDataKey();
    WidgetInstancesController.lockWidgetInstance(widgetInstance);
    Notifier.callSiblings(widgetInstance,"Widget.onLocked(\""+sharedDataKey+"\");");//$NON-NLS-1$
View Full Code Here

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

   */
  public String unlock(String id_key) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance==null) return localizedMessages.getString("WidgetAPIImpl.0");
    //
    String sharedDataKey = widgetInstance.getSharedDataKey();
    WidgetInstancesController.unlockWidgetInstance(widgetInstance);
    Notifier.callSiblings(widgetInstance,"Widget.onUnlocked(\""+sharedDataKey+"\");");//$NON-NLS-1$
View Full Code Here

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

   */
  public String hide(String id_key){
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
    //
    Notifier.callSiblings(widgetInstance,"window.onHide()");//$NON-NLS-1$
      return "okay"; //$NON-NLS-1$
  }
View Full Code Here

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

   */
  public String show(String id_key){
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance==null) return localizedMessages.getString("WidgetAPIImpl.0");
    Notifier.callSiblings(widgetInstance,"window.onShow()"); //$NON-NLS-1$
      return "okay"; //$NON-NLS-1$
  }

View Full Code Here

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()

      state.put("message", localizedMessages.getString("WidgetAPIImpl.0"));   //$NON-NLS-1$
      return state;
    }
    // check if instance is valid
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if (widgetInstance == null){
      state.put("message", localizedMessages.getString("WidgetAPIImpl.0"));   //$NON-NLS-1$
      return state;     
    }
    //
View Full Code Here

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

  public String getParticipants(String id_key) {
    HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
    Messages localizedMessages = LocaleHandler.localizeMessages(request);
    if(id_key == null) return localizedMessages.getString("WidgetAPIImpl.0"); //$NON-NLS-1$
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
    if(widgetInstance==null) return localizedMessages.getString("WidgetAPIImpl.0"); //$NON-NLS-1$
    IParticipant[] participants = new SharedContext(widgetInstance).getParticipants();
    return ParticipantHelper.createJSONParticipantsDocument(participants);
  }
 
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.