Package org.apache.wookie.beans

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


        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

    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

    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

        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

    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

    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

    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

        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

        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

TOP

Related Classes of org.apache.wookie.beans.IParticipant

Copyright © 2018 www.massapicom. 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.