Package org.eclipse.ecf.presence

Examples of org.eclipse.ecf.presence.IPresence$Type


  protected String getRosterEntryLabel(IRosterEntry entry) {
    return entry.getName();
  }

  protected ImageDescriptor getRosterEntryImageDescriptor(IRosterEntry entry) {
    IPresence p = entry.getPresence();
    if (p != null) {
      IPresence.Type pType = p.getType();
      IPresence.Mode pMode = p.getMode();
      // If type is unavailable then we're unavailable
      if (pType.equals(IPresence.Type.AVAILABLE)) {
        // if type and mode are both 'available' then we're actually
        // available
        if (pMode.equals(IPresence.Mode.AVAILABLE))
View Full Code Here


   *         otherwise.
   */
  protected boolean isAvailable(IRosterEntry entry) {
    if (entry == null)
      return false;
    IPresence presence = entry.getPresence();
    boolean type = (presence == null) ? false : presence.getType().equals(IPresence.Type.AVAILABLE);
    boolean mode = (presence == null) ? false : presence.getMode().equals(IPresence.Mode.AVAILABLE);
    return (type && mode);
  }
View Full Code Here

    if (containsChannelParticipant(createIDFromString(name)) != null)
      firePresenceListeners(false, new String[] { name });
  }

  private IPresence createPresence(final boolean available) {
    return new IPresence() {

      private static final long serialVersionUID = -7514227760059471898L;
      Map properties = new HashMap();

      public Mode getMode() {
View Full Code Here

  }

  protected void handlePresenceEvent(PresenceEvent evt) {
    final Presence xmppPresence = evt.getPresence();
    final String from = xmppPresence.getFrom();
    final IPresence newPresence = createIPresence(xmppPresence);
    final XMPPID fromID = createIDFromName(from);
    if (newPresence.getType().equals(IPresence.Type.SUBSCRIBE)
        || newPresence.getType().equals(IPresence.Type.UNSUBSCRIBE)
        || newPresence.getType().equals(IPresence.Type.SUBSCRIBED)
        || newPresence.getType().equals(IPresence.Type.UNSUBSCRIBED)) {
      rosterManager.notifySubscriptionListener(fromID, newPresence);
    } else {
      updatePresence(fromID, newPresence);
      firePresenceListeners(fromID, newPresence);
    }
View Full Code Here

    return IPresence.Mode.AVAILABLE;
  }

  protected IPresence createIPresence(Presence xmppPresence) {
    final String status = xmppPresence.getStatus();
    final IPresence newPresence = new org.eclipse.ecf.presence.Presence(
        createIPresenceType(xmppPresence), status,
        createIPresenceMode(xmppPresence));
    return newPresence;
  }
View Full Code Here

  }

  protected void handlePresenceEvent(PresenceEvent evt) {
    final Presence xmppPresence = evt.getPresence();
    final String from = canonicalizeRoomFrom(xmppPresence.getFrom());
    final IPresence newPresence = createIPresence(xmppPresence);
    final ID fromID = createUserIDFromName(from);
    if (newPresence.getType().equals(IPresence.Type.AVAILABLE)) {
      if (!chatRoomContainerParticipants.contains(fromID))
        chatRoomContainerParticipants.add(fromID);
    } else
      chatRoomContainerParticipants.remove(fromID);
    fireParticipant(fromID, newPresence);
View Full Code Here

                    type,
                    MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
                    true);
            if (modelElement instanceof Type)
            {
                Type element = (Type)modelElement;
                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
View Full Code Here

        }
        boolean isEntityAssociation = true;
        for (Iterator ends = ((Association)this.metaObject).getMemberEnds().iterator(); ends.hasNext();)
        {
            final Property prop = (Property)ends.next();
            final Type propertyType = prop.getType();
            if (propertyType == null || !UmlUtilities.containsStereotype(
                    propertyType,
                    UMLProfile.STEREOTYPE_ENTITY))
            {
                isEntityAssociation = false;
View Full Code Here

        ElementaryDataItem edi = (ElementaryDataItem)level01.getDataItems()[i];
        String attrName = edi.getDataName();
        DataField dataField = (DataField)edi.interpret();
        if (dataField != null) {
          Property attr = (Property)attrs.get(attrName);
          Type type = dataField.getType() == Integer.class ? integerType : stringType;
          if (attr == null) {
            String timestampFormat = "";
            String dateFormat = "";
            String length = "" + dataField.getLength();
            String fraction = "" + dataField.getFraction();
View Full Code Here

            m.visitCode();

            int index=1;
            m.visitVarInsn(ALOAD,0);
            for (Class param : c.getParameterTypes()) {
                Type t = Type.getType(param);
                m.visitVarInsn(t.getOpcode(ILOAD), index);
                index += t.getSize();
            }
            m.visitMethodInsn(INVOKESPECIAL, Type.getInternalName(base), "<init>", methodDescriptor);
            m.visitInsn(RETURN);
            m.visitMaxs(index,index);
            m.visitEnd();
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.presence.IPresence$Type

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.