BrightSide Workbench Full Report + Source Code
org.turro.contacts.zul.proposal.ProposalListbox Class Reference
Inheritance diagram for org.turro.contacts.zul.proposal.ProposalListbox:
Collaboration diagram for org.turro.contacts.zul.proposal.ProposalListbox:

Public Member Functions

 ProposalListbox ()
 
void setSocialGroups (Collection< SocialGroupValue > socialGroups)
 
void setType (ContactType type)
 
void importVCard () throws InterruptedException, IOException
 
void processSingle (ContactProposal proposal) throws InterruptedException, Exception
 
void processSelected () throws InterruptedException, Exception
 
void deleteSelected () throws InterruptedException
 

Detailed Description

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

Definition at line 47 of file ProposalListbox.java.

Constructor & Destructor Documentation

◆ ProposalListbox()

org.turro.contacts.zul.proposal.ProposalListbox.ProposalListbox ( )

Definition at line 53 of file ProposalListbox.java.

53  {
54  proposals = ProposalSet.deserialize(Application.getApplication());
55  addProposalItems();
56  }
static ProposalSet deserialize(Application app)
Here is the call graph for this function:

Member Function Documentation

◆ deleteSelected()

void org.turro.contacts.zul.proposal.ProposalListbox.deleteSelected ( ) throws InterruptedException

Definition at line 119 of file ProposalListbox.java.

119  {
120  Messages.confirmDeletion().show(() -> {
121  Iterator<Listitem> it = getItems().iterator();
122  while(it.hasNext()) {
123  Listitem li = it.next();
124  if(li.isSelected()) {
125  proposals.remove((ContactProposal) li.getValue());
126  it.remove();
127  }
128  }
129  ProposalSet.serialize(Application.getApplication(), proposals);
130  });
131  }
static void serialize(Application app, ProposalSet instance)
Here is the call graph for this function:

◆ importVCard()

void org.turro.contacts.zul.proposal.ProposalListbox.importVCard ( ) throws InterruptedException, IOException

Definition at line 66 of file ProposalListbox.java.

66  {
67  Application app = Application.getApplication();
68  proposals.loadFromVCards(app, new Command() {
69  @Override
70  public Object execute(Context context) {
71  addProposalItems();
72  ProposalSet.serialize(Application.getApplication(), proposals);
73  return null;
74  }
75  });
76  }
void loadFromVCards(Application app, final Command command)
Here is the call graph for this function:

◆ processSelected()

void org.turro.contacts.zul.proposal.ProposalListbox.processSelected ( ) throws InterruptedException, Exception

Definition at line 97 of file ProposalListbox.java.

97  {
98  Messages.confirmProcess().show(() -> {
99  Iterator<Listitem> it = getItems().iterator();
100  while(it.hasNext()) {
101  Listitem li = it.next();
102  if(li.isSelected()) {
103  ContactProposal cp = (ContactProposal) li.getValue();
104  if(!cp.isNoAction()) {
105  try {
106  processProposal(cp);
107  proposals.remove(cp);
108  it.remove();
109  } catch (Exception ex) {
110  Logger.getLogger(ProposalListbox.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
111  }
112  }
113  }
114  }
115  ProposalSet.serialize(Application.getApplication(), proposals);
116  });
117  }
Here is the call graph for this function:

◆ processSingle()

void org.turro.contacts.zul.proposal.ProposalListbox.processSingle ( ContactProposal  proposal) throws InterruptedException, Exception

Definition at line 78 of file ProposalListbox.java.

78  {
79  Iterator<Listitem> it = getItems().iterator();
80  boolean done = false;
81  while(it.hasNext()) {
82  Listitem li = it.next();
83  if(done) {
84  li.setSelected(true);
85  break;
86  } else if(li.getValue().equals(proposal)) {
87  ContactProposal cp = (ContactProposal) li.getValue();
88  processProposal(cp);
89  proposals.remove(cp);
90  it.remove();
91  done = true;
92  }
93  }
94  ProposalSet.serialize(Application.getApplication(), proposals);
95  }
Here is the call graph for this function:

◆ setSocialGroups()

void org.turro.contacts.zul.proposal.ProposalListbox.setSocialGroups ( Collection< SocialGroupValue socialGroups)

Definition at line 58 of file ProposalListbox.java.

58  {
59  this.socialGroups = socialGroups;
60  }

◆ setType()

void org.turro.contacts.zul.proposal.ProposalListbox.setType ( ContactType  type)

Definition at line 62 of file ProposalListbox.java.

62  {
63  this.type = type;
64  }

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