Package net.sf.jml

Examples of net.sf.jml.MsnContact


    public void sendText(final Email email, final String text) {
        if (email == null || text == null)
            return;
           
        // if contact is offline send as OIM
        MsnContact c = contactList.getContactByEmail(email);
       
        if(c != null && c.getStatus().equals(MsnUserStatus.OFFLINE))
        {
            new OIM(session).sendOfflineMsg(email, text);
            return;
        }
       
View Full Code Here


    public void moveFriend(Email email, String srcGroupId, String destGroupId)
    {
        MsnContactListImpl contactList = (MsnContactListImpl) session
                .getMessenger().getContactList();
        MsnContact contact = contactList.getContactByEmail(email);

        copyFriend(email, destGroupId);
        removeFriend(MsnList.FL, email, contact.getId(), srcGroupId);
    }
View Full Code Here

    @Override
  protected void messageReceived(MsnSession session) {
        super.messageReceived(session);
        MsnContactList contactList = session.getMessenger().getContactList();
        MsnContact contact = contactList.getContactById(getId());
        if (contact != null) {
            String prop = getProperty();
            MsnUserPropertyType propType = getPropertyType();
            MsnUserPropertiesImpl properties = (MsnUserPropertiesImpl) contact.getProperties();
            properties.setProperty(propType, prop);

            if (propType.equals(MsnUserPropertyType.MFN)) {
                ((MsnContactImpl) contact).setFriendlyName(prop);
            }
View Full Code Here

    public void moveFriend(Email email, String srcGroupId, String destGroupId)
    {
        MsnContactListImpl contactList = (MsnContactListImpl) session
                .getMessenger().getContactList();
        MsnContact contact = contactList.getContactByEmail(email);

        copyFriend(email, destGroupId);
        removeFriend(MsnList.FL, email, contact.getId(), srcGroupId);
    }
View Full Code Here

    public void sendText(final Email email, final String text) {
        if (email == null || text == null)
            return;
           
        // if contact is offline send as OIM
        MsnContact c = contactList.getContactByEmail(email);
       
        if(c != null && c.getStatus().equals(MsnUserStatus.OFFLINE))
        {
            new OIM(session).sendOfflineMsg(email, text);
            return;
        }
       
View Full Code Here

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public void addContact(String id) {
        MsnContact contact = getContactList().getContactById(id);
        if (contact != null)
            addContact(contact);
    }
View Full Code Here

        if (contact != null)
            addContact(contact);
    }

    public void removeContact(String id) {
        MsnContact contact = getContactList().getContactById(id);
        if (contact != null)
            removeContact(contact);
    }
View Full Code Here

    public void addContacts(MsnContact[] cs)
    {
        Hashtable domains = new Hashtable();
        for (int i = 0; i < cs.length; i++)
        {
            MsnContact msnContact = cs[i];
            String d = getDomain(msnContact.getEmail().getEmailAddress());

            Vector v = (Vector)domains.get(d);

            if(v == null)
            {
View Full Code Here

        super.messageReceived(session);

        MsnMessenger messenger = session.getMessenger();
        MsnContactList contactList = messenger.getContactList();
        MsnMessageChain incoming = messenger.getIncomingMessageChain();
        MsnContact contact = null;

        for (MsnMessageIterator iter = incoming.iterator(); iter.hasPrevious();) {
            MsnMessage message = iter.previous();
            if (message instanceof IncomingBPR)
                continue;
            if (message instanceof IncomingLST) {
                Email email = ((IncomingLST) message).getEmail();
                contact = contactList.getContactByEmail(email);
            } else if (message instanceof IncomingADC) {
                Email email = ((IncomingADC) message).getEmail();
                if (email == null) {
                    contact = contactList
                            .getContactById(((IncomingADC) message).getId());
                } else {
                    contact = contactList.getContactByEmail(email);
                }
            } else if (message instanceof IncomingADD) {
                Email email = ((IncomingADD) message).getEmail();
                contact = contactList.getContactByEmail(email);
            }
            break;
        }

        if (contact != null) {
            ((MsnUserPropertiesImpl) contact.getProperties()).setProperty(
                    getPropType(), getProperty());
        }
    }
View Full Code Here

            }
        }
    }

    public void removeContactById(String id) {
        MsnContact contact = getContactById(id);
        if (contact != null)
            removeContactByEmail(contact.getEmail());
    }
View Full Code Here

TOP

Related Classes of net.sf.jml.MsnContact

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.