Examples of Contact


Examples of net.java.sip.communicator.service.protocol.Contact

    {
        String displayName = getPeerAddress().getDisplayName();

        if(displayName == null)
        {
            Contact contact = getContact();

            if (contact != null)
                displayName = contact.getDisplayName();
            else
                displayName = getPeerAddress().getURI().toString();
        }

        if(displayName.startsWith("sip:"))
View Full Code Here

Examples of net.java.ws.addressbook.client.domain.Contact

        book.findContactsByName(query, new AsyncCallback<ContactList>() {
          public void onSuccess(ContactList response) {
            Iterator contactIt = response.getContacts().iterator();
            Collection suggestions = new ArrayList();
            while (contactIt.hasNext()) {
              final Contact contact = (Contact) contactIt.next();

              //add the suggestion.
              suggestions.add(new Suggestion() {
                public String getDisplayString() {
                  return contact.getName();
                }

                public String getReplacementString() {
                  return contact.getName();
                }
              });
            }

            contactGrid.clear(); //clear the grid.
            callback.onSuggestionsReady(request, new Response(suggestions));
          }

          public void onFailure(Throwable throwable) {
            //do nothing if an error occurs while asking for suggestions
          }
        });
      }
    };

    //the suggest box (instantiated with our oracle).
    final SuggestBox suggestBox = new SuggestBox(oracle);

    //The panel that will hold the suggest box and the "find" button.
    HorizontalPanel findForm = new HorizontalPanel();
    findForm.add(suggestBox);

    //the "find" button.
    Button findButton = new Button("find");
    findButton.addClickListener(new ClickListener() {
      public void onClick(Widget widget) {
        //when "find" is clicked, make the query and populate the grid.
        String text = suggestBox.getText();
        book.findContactsByName(text, new AsyncCallback<ContactList>() {
          public void onSuccess(ContactList response) {
            contactGrid.resize(6 * response.getContacts().size(), 2);
            Iterator contactIt = response.getContacts().iterator();
            int i = 0;
            while (contactIt.hasNext()) {
              Contact contact = (Contact) contactIt.next();
              contactGrid.setWidget(++i, 0, new Label("Name:"));
              contactGrid.setWidget(i, 1, new Label(contact.getName()));
              contactGrid.setWidget(++i, 0, new Label("Phone:"));
              contactGrid.setWidget(i, 1, new Label(contact.getPhone()));
              contactGrid.setWidget(++i, 0, new Label("Address:"));
              contactGrid.setWidget(i, 1, new Label(contact.getAddress1()));
              contactGrid.setWidget(++i, 0, new Label("City:"));
              contactGrid.setWidget(i, 1, new Label(contact.getCity()));
              contactGrid.setWidget(++i, 0, new Label("Type:"));
              contactGrid.setWidget(i, 1, new Label(String.valueOf(contact.getContactType())));
              contactGrid.setWidget(++i, 0, new HTML("<hr/>"));
              contactGrid.setWidget(i, 1, new HTML("<hr/>"));
            }
          }

          public void onFailure(Throwable throwable) {
            //if an error while doing a "find," display it in the grid.
            contactGrid.resize(1, 1);
            contactGrid.setWidget(0, 0, new Label("ERROR: " + throwable.getMessage()));
          }
        });
      }
    });

    //add the find button.
    findForm.add(findButton);

    byNamePanel.add(new Label("This demonstrates GWT-RPC"));

    //add the find form to the panel.
    byNamePanel.add(findForm);

    //add the display grid to the panel.
    byNamePanel.add(contactGrid);

    //create the tab panel.
    TabPanel panel = new TabPanel();

    //add the find by name panel to the tab panel.
    panel.add(byNamePanel, "&nbsp;<a href=\"#byname\">by name (RPC)</a>&nbsp;", true);

    final VerticalPanel byIdPanel = new VerticalPanel();

    byIdPanel.add(new Label("This demonstrates using GWT to access a JSON-REST endpoint and using GWT JSON overlays"));

    HorizontalPanel findByIdForm = new HorizontalPanel();
    findByIdForm.add(new Label("id:"));
    final TextBox idBox = new TextBox();
    idBox.setText("1");
    findByIdForm.add(idBox);
    Button findByIdButton = new Button("find");
    findByIdForm.add(findByIdButton);
    findByIdButton.addClickListener(new ClickListener() {
      public void onClick(Widget widget) {
        final RequestBuilder restRequestBuilder = new RequestBuilder(RequestBuilder.GET, GWT.getModuleBaseURL() + "../json/contact/" + idBox.getText());
        try {
          restRequestBuilder.sendRequest(null, new RequestCallback() {
            public void onResponseReceived(Request request, Response response) {
              if (200 == response.getStatusCode()) {
                net.java.ws.addressbook.client.json.domain.Contact contact = net.java.ws.addressbook.client.json.domain.Contact.fromJson(response.getText());
                byIdPanel.add(new Label("Found " + contact.getContactType().toString() + ": " + contact.getName() + ", updated: " + new java.util.Date(contact.getUpdated()) + " (" + contact.getUpdated() + ")."));
              }
              else {
                byIdPanel.add(new Label("ERROR: " + response.getStatusText() + ": REQUEST URL: " + restRequestBuilder.getUrl()));
              }
            }
View Full Code Here

Examples of net.java.ws.addressbook.domain.Contact

public class AddressBookImpl implements AddressBook {

  private static final Map<Integer, Contact> STORE = loadContacts();

  public Contact getContact(Integer id) throws AddressBookException {
    Contact contact = STORE.get(id);
    if (contact == null) {
      throw new AddressBookException("contact not found: " + id);
    }
    return contact;
  }
View Full Code Here

Examples of net.viralpatel.contact.form.Contact

    SessionFactory sf = (SessionFactory)ac.getBean("sessionFactory");
    Session s = sf.openSession();
    System.out.println(s);
    Transaction tx = s.beginTransaction();
   
    Contact c, c2, c3;
    c  = new Contact();
    //c.setId(123);
    c.setEmail("mln_sk@yahoo.com");
    c.setFirstname("LNRMLN");
    c.setLastname("MAJJIGA");
    c.setTelephone("9167072099")
    System.out.println(c);
    s.save(c);
    System.out.println("COntact :: "+c);
   
   
    c2 = new Contact();
    c2.setEmail("mln_sk@yahoo.com");
    c2.setFirstname("Kumar");
    c2.setLastname("jammala");
    c2.setTelephone("1234567899");   
    s.saveOrUpdate(c);
    System.out.println("COntact :: "+c);
   
   
    c3 = new Contact();
    c3.setEmail("mln_sk@mail.com");
    c3.setFirstname("Lakshman");
    c3.setLastname("kuruba");
    c3.setTelephone("9052413024");   
    s.saveOrUpdate(c);
View Full Code Here

Examples of net.virtuemart.www.customers.Contact

    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Contact)) {
            return false;
        }
        Contact other = (Contact) obj;
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
                ((this.businessPartnerId == null && other.getBusinessPartnerId() == null) ||
                (this.businessPartnerId != null &&
                this.businessPartnerId.equals(other.getBusinessPartnerId()))) &&
                ((this.clientId == null && other.getClientId() == null) ||
                (this.clientId != null &&
                this.clientId.equals(other.getClientId()))) &&
                ((this.email == null && other.getEmail() == null) ||
                (this.email != null &&
                this.email.equals(other.getEmail()))) &&
                ((this.fax == null && other.getFax() == null) ||
                (this.fax != null &&
                this.fax.equals(other.getFax()))) &&
                ((this.firstName == null && other.getFirstName() == null) ||
                (this.firstName != null &&
                this.firstName.equals(other.getFirstName()))) &&
                ((this.id == null && other.getId() == null) ||
                (this.id != null &&
                this.id.equals(other.getId()))) &&
                ((this.lastName == null && other.getLastName() == null) ||
                (this.lastName != null &&
                this.lastName.equals(other.getLastName()))) &&
                ((this.phone == null && other.getPhone() == null) ||
                (this.phone != null &&
                this.phone.equals(other.getPhone()))) &&
                ((this.phone2 == null && other.getPhone2() == null) ||
                (this.phone2 != null &&
                this.phone2.equals(other.getPhone2())));
        __equalsCalc = null;
        return _equals;
    }
View Full Code Here

Examples of net.wimpi.pim.contact.model.Contact

        String partyId = (String) context.get("partyId");
        Locale locale = (Locale) context.get("locale");
        File file = null;
        try {
            ContactModelFactory cmf = Pim.getContactModelFactory();
            Contact contact = cmf.createContact();

            PersonalIdentity pid = cmf.createPersonalIdentity();
            String fullName = PartyHelper.getPartyName(delegator, partyId, false);
            String[] name = fullName.split("\\s");
            pid.setFirstname(name[0]);
            pid.setLastname(name[1]);
            contact.setPersonalIdentity(pid);

            GenericValue postalAddress = PartyWorker.findPartyLatestPostalAddress(partyId, delegator);
            Address address = cmf.createAddress();
            address.setStreet(postalAddress.getString("address1"));
            address.setCity(postalAddress.getString("city"));

            address.setPostalCode(postalAddress.getString("postalCode"));
            GenericValue state = postalAddress.getRelatedOne("StateProvinceGeo");
            if (UtilValidate.isNotEmpty(state)) {
                address.setRegion(state.getString("geoName"));
            }
            GenericValue countryGeo = postalAddress.getRelatedOne("CountryGeo");
            if (UtilValidate.isNotEmpty(countryGeo)) {
                String country = postalAddress.getRelatedOne("CountryGeo").getString("geoName");
                address.setCountry(country);
                address.setWork(true); // this can be better set by checking contactMechPurposeTypeId
            }
            contact.addAddress(address);

            Communications communication = cmf.createCommunications();
            contact.setCommunications(communication);

            PhoneNumber number = cmf.createPhoneNumber();
            GenericValue telecomNumber = PartyWorker.findPartyLatestTelecomNumber(partyId, delegator);
            if (UtilValidate.isNotEmpty(telecomNumber)) {
                number.setNumber(telecomNumber.getString("areaCode") + telecomNumber.getString("contactNumber"));
View Full Code Here

Examples of no.ugland.utransprod.model.Contact

  }

  private Order createOrder(final ImportOrderV importOrderV) {
    Order incomingOrder = new Order();
    incomingOrder.setOrderNr(importOrderV.getNumber1());
    Contact contact = getContact(importOrderV);
    incomingOrder.setCustomer(getCustomer(contact));

    setOrderDate(importOrderV, incomingOrder);
    incomingOrder.setAgreementDate(Util.getCurrentDate());
View Full Code Here

Examples of oasis.names.tc.wsrp.v1.types.Contact

     * @param profile
     * @param context
     */
    protected void fill(UserProfile profile, UserContextExtension context) {
        profile.setEmployerInfo(new EmployerInfo());
        profile.setHomeInfo(new Contact());
        profile.setBusinessInfo(new Contact());
    }
View Full Code Here

Examples of org.aburlacu.test.model.Contact

     *
     * @param Integer id - contact id
     * @author Alexandru Burlacu
     */
    public void removeContact(Integer id) {
        Contact contact = (Contact) sessionFactory.getCurrentSession().load(
                Contact.class, id);
        if (null != contact) {
            contact.setIsRemoved(true);
            sessionFactory.getCurrentSession().update(contact);
        }
    }
View Full Code Here

Examples of org.apache.cocoon.forms.samples.Contact

        bean.setPhoneCountry("32");
        bean.setPhoneZone("2");
        bean.setPhoneNumber("123456");
        bean.setBirthday(new java.util.Date());
        bean.setSex(Sex.FEMALE);
        Contact contact = new Contact();
        contact.setId(1);
        contact.setFirstName("Hermann");
        bean.addContact(contact);

        FormInstance form = new FormInstance("forms/form2.xml", "forms/form2-binding.xml");
        form.load(bean);
        form.show("form/form2");
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.