18 package org.turro.vcard.util;
21 import java.io.IOException;
22 import java.util.List;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.amic.util.file.FileUtil;
26 import org.turro.annotation.ElephantPlugin;
27 import org.turro.contacts.Contact;
28 import org.turro.elephant.context.ElephantContext;
29 import org.turro.plugin.IPlugin;
30 import org.turro.vcard.db.VCardFiles;
31 import org.zkoss.util.media.ContentTypes;
32 import org.zkoss.zul.Filedownload;
38 @ElephantPlugin(label=
"vcard")
44 public void setData(String
id, Object data) {
45 if(
"contact".equals(
id)) {
47 }
else if(
"export".equals(
id)) {
51 Filedownload.save(f, ContentTypes.getContentType(
FileUtil.getExtension(f)));
53 }
catch (IOException ex) {
61 if(
"import".equals(
id)) {
64 }
catch (IOException ex) {
67 }
else if(
"importcsv".equals(
id)) {
70 }
catch (IOException ex) {
73 }
else if(
"importFolder".equals(
id)) {
75 }
else if(
"qrcode".equals(
id)) {
static String logMsg(String msg)
static File getImportFolder()
BufferedImage getQRCode()
List< Contact > importCSV()
List< Contact > importVCard()
Object getData(String id)
void setData(String id, Object data)