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

Public Member Functions

Contact getContact ()
 
void setContact (Contact contact)
 
String getKey ()
 
void setKey (String key)
 
void afterCompose ()
 

Detailed Description

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

Definition at line 31 of file CommentLabel.java.

Member Function Documentation

◆ afterCompose()

void org.turro.contacts.zul.label.CommentLabel.afterCompose ( )

Definition at line 53 of file CommentLabel.java.

53  {
54  String lang = key + "_" + Application.getUsedLocale().getLanguage();
55  if(contact != null) {
56  for(Comment c : contact.getComments()) {
57  if(!Strings.isBlank(c.getComment()) && c.getComment().startsWith(lang)) {
58  setValue(c.getComment().substring(lang.length()));
59  break;
60  }
61  }
62  }
63  if(Strings.isBlank(getValue())) {
64  lang = key + "#";
65  if(contact != null) {
66  for(Comment c : contact.getComments()) {
67  if(!Strings.isBlank(c.getComment()) && c.getComment().startsWith(lang)) {
68  setValue(c.getComment().substring(lang.length()));
69  break;
70  }
71  }
72  }
73  }
74  }
Set< Comment > getComments()
Definition: Contact.java:415
Here is the call graph for this function:

◆ getContact()

Contact org.turro.contacts.zul.label.CommentLabel.getContact ( )

Definition at line 36 of file CommentLabel.java.

36  {
37  return contact;
38  }

◆ getKey()

String org.turro.contacts.zul.label.CommentLabel.getKey ( )

Definition at line 44 of file CommentLabel.java.

44  {
45  return key;
46  }

◆ setContact()

void org.turro.contacts.zul.label.CommentLabel.setContact ( Contact  contact)

Definition at line 40 of file CommentLabel.java.

40  {
41  this.contact = contact;
42  }

◆ setKey()

void org.turro.contacts.zul.label.CommentLabel.setKey ( String  key)

Definition at line 48 of file CommentLabel.java.

48  {
49  this.key = key;
50  }

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