BrightSide Workbench Full Report + Source Code
org.turro.contacts.mydata.MyDataList Class Reference
Inheritance diagram for org.turro.contacts.mydata.MyDataList:
Collaboration diagram for org.turro.contacts.mydata.MyDataList:

Public Member Functions

 MyDataList (IContact contact)
 
boolean isValid ()
 
void saveItems ()
 

Detailed Description

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

Definition at line 41 of file MyDataList.java.

Constructor & Destructor Documentation

◆ MyDataList()

org.turro.contacts.mydata.MyDataList.MyDataList ( IContact  contact)

Definition at line 45 of file MyDataList.java.

45  {
46  this.contact = contact;
47  readItems();
48  }

Member Function Documentation

◆ isValid()

boolean org.turro.contacts.mydata.MyDataList.isValid ( )

Definition at line 50 of file MyDataList.java.

50  {
51  for(MyDataItem item : this) {
52  if(item.isRequired()) {
53  if(item.getType().equals(MyDataItemType.MYDATA_NAME)) {
54  if(Strings.isBlank(contact.getName())) return false;
55  } else if(item.getType().equals(MyDataItemType.MYDATA_GIF)) {
56  if(Strings.isBlank(contact.getGlobalId())) return false;
57  } else if(item.getType().equals(MyDataItemType.MYDATA_CONNECTOR)) {
58  if(Strings.isBlank(contact.getConnector(item.getName()))) return false;
59  }
60  }
61  }
62  return true;
63  }
Here is the call graph for this function:

◆ saveItems()

void org.turro.contacts.mydata.MyDataList.saveItems ( )

Definition at line 65 of file MyDataList.java.

65  {
66  formToFields();
67  for(MyDataItem item : this) {
68  if(!Strings.isBlank(item.getValue())) {
69  if(item.getType().equals(MyDataItemType.MYDATA_NAME)) {
70  contact.setName(item.getValue());
71  } else if(item.getType().equals(MyDataItemType.MYDATA_GIF)) {
72  //contact.setGlobalId(item.getValue());
73  } else if(item.getType().equals(MyDataItemType.MYDATA_CONNECTOR)) {
74  contact.setConnector(item.getName(), item.getValue());
75  } else if(item.getType().equals(MyDataItemType.MYDATA_PASSWORD)) {
76  String password = item.getValue();
77  if(!Strings.isBlank(password)) {
78  contact.setPassword(password, password);
79  }
80  }
81  }
82  }
83  contact.applyChanges();
84  }
void setPassword(String newValue, String repeatValue)
void setConnector(String id, String value)
Here is the call graph for this function:
Here is the caller graph for this function:

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