BrightSide Workbench Full Report + Source Code
org.turro.vcard.util.VCardPlugin Class Reference
Inheritance diagram for org.turro.vcard.util.VCardPlugin:
Collaboration diagram for org.turro.vcard.util.VCardPlugin:

Public Member Functions

void setData (String id, Object data)
 
Object getData (String id)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 39 of file VCardPlugin.java.

Member Function Documentation

◆ getData()

Object org.turro.vcard.util.VCardPlugin.getData ( String  id)

Implements org.turro.plugin.IPlugin.

Definition at line 60 of file VCardPlugin.java.

60  {
61  if("import".equals(id)) {
62  try {
63  return new ImportFromVCard().importVCard();
64  } catch (IOException ex) {
65  Logger.getLogger(VCardPlugin.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
66  }
67  } else if("importcsv".equals(id)) {
68  try {
69  return new ImportFromCSV().importCSV();
70  } catch (IOException ex) {
71  Logger.getLogger(VCardPlugin.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
72  }
73  } else if("importFolder".equals(id)) {
74  return VCardFiles.getImportFolder();
75  } else if("qrcode".equals(id)) {
76  return new ExportToVCard(contact).getQRCode();
77  }
78  return null;
79  }
Here is the call graph for this function:

◆ setData()

void org.turro.vcard.util.VCardPlugin.setData ( String  id,
Object  data 
)

Implements org.turro.plugin.IPlugin.

Definition at line 44 of file VCardPlugin.java.

44  {
45  if("contact".equals(id)) {
46  contact = (Contact) data;
47  } else if("export".equals(id)) {
48  try {
49  File f = new ExportToVCard((List<Contact>) data).export();
50  if(f.exists()) {
51  Filedownload.save(f, ContentTypes.getContentType(FileUtil.getExtension(f)));
52  }
53  } catch (IOException ex) {
54  Logger.getLogger(VCardPlugin.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
55  }
56  }
57  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: