/** * * @param apiPhoneList * @param modelPhoneList * @param modelContact * @param businessKey * @throws DispositionReportFaultMessage */ public static void mapContactPhones(List<org.uddi.api_v3.Phone> apiPhoneList, List<org.apache.juddi.model.Phone> modelPhoneList, org.apache.juddi.model.Contact modelContact, String businessKey) throws DispositionReportFaultMessage { modelPhoneList.clear(); for (org.uddi.api_v3.Phone apiPhone : apiPhoneList) { modelPhoneList.add(new org.apache.juddi.model.Phone(modelContact, apiPhone.getUseType(), apiPhone.getValue())); } }
/** * * @param apiPhoneList * @param modelPhoneList * @param modelContact * @param businessKey * @throws DispositionReportFaultMessage */ public static void mapContactPhones(List<org.uddi.api_v3.Phone> apiPhoneList, List<org.apache.juddi.model.Phone> modelPhoneList, org.apache.juddi.model.Contact modelContact, String businessKey) throws DispositionReportFaultMessage { modelPhoneList.clear(); for (org.uddi.api_v3.Phone apiPhone : apiPhoneList) { modelPhoneList.add(new org.apache.juddi.model.Phone(modelContact, apiPhone.getUseType(), apiPhone.getValue())); } }
private static List<Phone> MapPhone(List<org.uddi.api_v3.Phone> phone) { List<Phone> r = new ArrayList<Phone>(); if (phone == null) { return r; } for (int i = 0; i < phone.size(); i++) { Phone x = new Phone(); x.setUseType(phone.get(i).getUseType()); x.setValue(phone.get(i).getValue()); r.add(x); } return r; }
private void validatePhone(List<Phone> phone) throws ValueNotAllowedException { if (phone != null) { for (int i = 0; i < phone.size(); i++) { validateUseType(phone.get(i).getUseType()); if (phone.get(i).getValue() == null || phone.get(i).getValue().length() == 0) { throw new ValueNotAllowedException(new ErrorMessage("errors.phone.noinput")); } if (phone.get(i).getValue().length() > ValidationConstants.MAX_phone) { throw new ValueNotAllowedException(new ErrorMessage("errors.phone.TooLong")); } } } }
private void validatePhone(List<Phone> phone) throws ValueNotAllowedException { if (phone != null) { for (int i = 0; i < phone.size(); i++) { validateUseType(phone.get(i).getUseType()); if (phone.get(i).getValue() == null || phone.get(i).getValue().length() == 0) { throw new ValueNotAllowedException(new ErrorMessage("errors.phone.noinput")); } if (phone.get(i).getValue().length() > ValidationConstants.MAX_phone) { throw new ValueNotAllowedException(new ErrorMessage("errors.phone.TooLong")); } } } }
public static void PrintContacts(Contacts contacts) { if (contacts == null) { return; } for (int i = 0; i < contacts.getContact().size(); i++) { System.out.println("Contact " + i + " type:" + contacts.getContact().get(i).getUseType()); for (int k = 0; k < contacts.getContact().get(i).getPersonName().size(); k++) { System.out.println("Name: " + contacts.getContact().get(i).getPersonName().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) { System.out.println("Email: " + contacts.getContact().get(i).getEmail().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) { System.out.println("Address sort code " + contacts.getContact().get(i).getAddress().get(k).getSortCode()); System.out.println("Address use type " + contacts.getContact().get(i).getAddress().get(k).getUseType()); System.out.println("Address tmodel key " + contacts.getContact().get(i).getAddress().get(k).getTModelKey()); for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) { System.out.println("Address line value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue()); System.out.println("Address line key name " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName()); System.out.println("Address line key value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue()); } } for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) { System.out.println("Desc: " + contacts.getContact().get(i).getDescription().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) { System.out.println("Phone: " + contacts.getContact().get(i).getPhone().get(k).getValue()); } } }
TelephoneNumberImpl tni = new TelephoneNumberImpl(); tni.setType(phone.getUseType()); tni.setNumber(phone.getValue()); tempPhones.add(tni);