Examples of IParticipant


Examples of jifx.transactionManager.interfaces.IParticipant

   * in order to maintain a stable state in the
   * system.
   */
  public void run() {
    ctx = new Context(message);
    IParticipant iParticipant;
    IResponseMaker iResponseMaker = null;
    IMessage iMessage;
    try {
      if (ti == null) {
        logger.error(transName+"|No se inicializó el Transaction Information|");
        return;
      }
      if (logger.isDebugEnabled())
        logger.debug(transName+"|Se inicia transacción:|" + ctx.getOriginalMessage());
     
      // Cargo la clase de respuesta
      iResponseMaker = (IResponseMaker) Class.forName(ti.getResponseClass().getClassName()).newInstance();
      iResponseMaker.setProperties(ti.getResponseClass().getProperties());
 
      // Cargo los participantes
      for (ParticipantResponseMakerInformation piPart : ti.getParticipants()) {
        try {
          iParticipant = (IParticipant)Class.forName(piPart.getClassName()).newInstance();
          iParticipant.setProperties(piPart.getProperties());
          partInit.add(iParticipant);
        } catch (Exception e) {
          logger.error(transName+"| No se encontró la clase de un participante: "+e.getMessage()+"|");
          return;
        }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

        persistenceManager.save(widgetInstance);

        //
        // create a participant
        //
        IParticipant participant = persistenceManager.newInstance(IParticipant.class);
        //participant.setWidget(widget);
        participant.setSharedDataKey("test-shared-data-key");
        participant.setParticipantId("test");
        participant.setParticipantDisplayName("");
        participant.setParticipantThumbnailUrl("");
        persistenceManager.save(participant);

        //
        // commit and close persistence manager transaction
        //
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

        persistenceManager.save(widgetInstance);

        //
        // create a participant
        //
        IParticipant participant = persistenceManager.newInstance(IParticipant.class);
        //participant.setWidget(widget);
        participant.setSharedDataKey("test-shared-data-key");
        participant.setParticipantId("test");
        participant.setParticipantDisplayName("");
        participant.setParticipantThumbnailUrl("");
        persistenceManager.save(participant);

        //
        // commit and close persistence manager transaction
        //
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

    map.put("sharedDataKey", SharedDataHelper.getInternalSharedDataKey(instance));//$NON-NLS-1$
    map.put("participantId", participantId);//$NON-NLS-1$
    if (persistenceManager.findByValues(IParticipant.class, map).length != 0) return false;   

    // Add participant
    IParticipant participant = persistenceManager.newInstance(IParticipant.class);
    participant.setParticipantId(participantId);
    participant.setParticipantDisplayName(participantDisplayName);
    participant.setParticipantThumbnailUrl(participantThumbnailUrl);
    participant.setSharedDataKey(SharedDataHelper.getInternalSharedDataKey(instance));
    persistenceManager.save(participant);
    return true;
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

    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 participant = persistenceManager.findParticipantViewer(widgetInstance);
    if (participant != null) return ParticipantHelper.createJSONParticipantDocument(participant); //$NON-NLS-1$
    return null; // no viewer i.e. widget is anonymous
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

        persistenceManager.save(widgetInstance);

        //
        // create a participant
        //
        IParticipant participant = persistenceManager.newInstance(IParticipant.class);
        //participant.setWidget(widget);
        participant.setSharedDataKey("test-shared-data-key");
        participant.setParticipantId("test");
        participant.setParticipantDisplayName("");
        participant.setParticipantThumbnailUrl("");
        persistenceManager.save(participant);

        //
        // create access request
        //
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

    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 participant = new SharedContext(widgetInstance).getViewer(widgetInstance);
    if (participant != null) return ParticipantHelper.createJSONParticipantDocument(participant); //$NON-NLS-1$
    return null; // no viewer i.e. widget is anonymous
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

    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 participant = persistenceManager.findParticipantViewer(widgetInstance);
    if (participant != null) return ParticipantHelper.createJSONParticipantDocument(participant); //$NON-NLS-1$
    return null; // no viewer i.e. widget is anonymous
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

    map.put("widget", instance.getWidget());//$NON-NLS-1$
    map.put("participantId", participantId);//$NON-NLS-1$
    if (persistenceManager.findByValues(IParticipant.class, map).length != 0) return false;   

    // Add participant
    IParticipant participant = persistenceManager.newInstance(IParticipant.class);
    participant.setParticipantId(participantId);
    participant.setParticipantDisplayName(participantDisplayName);
    participant.setParticipantThumbnailUrl(participantThumbnailUrl);
    participant.setSharedDataKey(instance.getSharedDataKey());
    participant.setWidget(instance.getWidget());
    persistenceManager.save(participant);
    return true;
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParticipant

        widgetInstancePreference.setReadOnly(true);
        widgetInstance.getPreferences().add(widgetInstancePreference);
        persistenceManager.save(widgetInstance);

        // create participant
        IParticipant participant = persistenceManager.newInstance(IParticipant.class);
        participant.setWidget(widget);
        participant.setSharedDataKey("test-shared-data-key");
        participant.setParticipantId("test");
        participant.setParticipantDisplayName("");
        participant.setParticipantThumbnailUrl("");
        persistenceManager.save(participant);

        // create server feature
        IServerFeature serverFeature = persistenceManager.newInstance(IServerFeature.class);
        serverFeature.setFeatureName("test-feature-name");
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.