Examples of marshallContact()


Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

    try {
      ContactIOFactory factory = Pim.getContactIOFactory();
        ContactMarshaller marshaller = factory.createContactMarshaller();
        marshaller.setEncoding("UTF-8");
        for (SimpleContact contact : contacts) {
          marshaller.marshallContact(out, contact.getContact())
      }
    }
    finally {
      out.close();
    }
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ContactIOFactory factory = Pim.getContactIOFactory();
      ContactMarshaller marshaller = factory.createContactMarshaller();
      marshaller.setEncoding("UTF-8");
      for (SimpleContact contact : contacts) {
        marshaller.marshallContact(out, contact.getContact())
      }
      return new ContactTransferable(new ByteArrayInputStream(out.toByteArray()));
    }

    @Override
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

                saveToDirectory = System.getProperty("ofbiz.home");
            }
            String saveToFilename = fullName + ".vcf";
            file = FileUtil.getFile(saveToDirectory + "/" + saveToFilename);
            FileOutputStream outputStream = new FileOutputStream(file);
            marshaller.marshallContact(outputStream, contact);
            outputStream.close();
        } catch (FileNotFoundException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                    "SfaExportVCardErrorOpeningFile", UtilMisc.toMap("errorString", file.getAbsolutePath()), locale));
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

                saveToDirectory = System.getProperty("ofbiz.home");
            }
            String saveToFilename = fullName + ".vcf";
            file = FileUtil.getFile(saveToDirectory + "/" + saveToFilename);
            FileOutputStream outputStream = new FileOutputStream(file);
            marshaller.marshallContact(outputStream, contact);
            outputStream.close();
        } catch (FileNotFoundException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError("Unable to open file for writing: " + file.getAbsolutePath());
        } catch (IOException e) {
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

                saveToDirectory = System.getProperty("ofbiz.home");
            }
            String saveToFilename = fullName + ".vcf";
            file = FileUtil.getFile(saveToDirectory + "/" + saveToFilename);
            FileOutputStream outputStream = new FileOutputStream(file);
            marshaller.marshallContact(outputStream, contact);
            outputStream.close();
        } catch (FileNotFoundException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError("Unable to open file for writing: " + file.getAbsolutePath());
        } catch (IOException e) {
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

                saveToDirectory = System.getProperty("ofbiz.home");
            }
            String saveToFilename = fullName + ".vcf";
            file = FileUtil.getFile(saveToDirectory + "/" + saveToFilename);
            FileOutputStream outputStream = new FileOutputStream(file);
            marshaller.marshallContact(outputStream, contact);
            outputStream.close();
        } catch (FileNotFoundException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                    "SfaExportVCardErrorOpeningFile", UtilMisc.toMap("errorString", file.getAbsolutePath()), locale));
View Full Code Here

Examples of net.wimpi.pim.contact.io.ContactMarshaller.marshallContact()

                saveToDirectory = System.getProperty("ofbiz.home");
            }
            String saveToFilename = fullName + ".vcf";
            file = new File(saveToDirectory + "/" + saveToFilename);
            FileOutputStream outputStream = new FileOutputStream(file);
            marshaller.marshallContact(outputStream, contact);
            outputStream.close();
        } catch (FileNotFoundException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError("Unable to open file for writing: " + file.getAbsolutePath());
        } catch (IOException e) {
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.