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

Public Member Functions

void onBusiness ()
 
void onPosition ()
 
void onStart ()
 
void onEnd ()
 
void onSave ()
 
void onCancel ()
 
String getPath ()
 
void setPath (String path)
 
String getType ()
 
void setType (String type)
 
- Public Member Functions inherited from org.turro.elephant.TemplateControl
void setRootTmpl (String rootTmpl)
 
void setTmpl (String tmpl)
 
void afterCompose ()
 

Protected Member Functions

void doFinally ()
 

Detailed Description

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

Definition at line 50 of file EditRelationControl.java.

Member Function Documentation

◆ doFinally()

void org.turro.contacts.profile.EditRelationControl.doFinally ( )
protected

Reimplemented from org.turro.elephant.TemplateControl.

Definition at line 112 of file EditRelationControl.java.

112  {
113  super.doFinally();
114  KeyValueMap kvm = Actions.getRightNowAction(Application.getApplication().getConstructor());
115  if(kvm != null) {
116  if(kvm.containsKey("relation")) {
117  relation = new ContactsPU().find(BusinessRelation.class, kvm.get("relation"));
118  } else if(kvm.containsKey("element")) {
119  IContact contact;
120  if(kvm != null && kvm.containsKey("contact")) {
121  contact = Contacts.getContactById(kvm.get("contact"));
122  } else {
123  contact = Authentication.getIContact();
124  }
125  relation = new BusinessRelation();
126  relation.setContact((Contact) contact.getContact());
127  relation.setRelationType(RelationType.REL_STAFF.getRelationKey());
128  }
129  }
130  initComponents();
131  }
void setRelationType(String relationType)
Here is the call graph for this function:

◆ getPath()

String org.turro.contacts.profile.EditRelationControl.getPath ( )

Definition at line 95 of file EditRelationControl.java.

95  {
96  return path;
97  }

◆ getType()

String org.turro.contacts.profile.EditRelationControl.getType ( )

Definition at line 103 of file EditRelationControl.java.

103  {
104  return type;
105  }

◆ onBusiness()

void org.turro.contacts.profile.EditRelationControl.onBusiness ( )

Definition at line 62 of file EditRelationControl.java.

62  {
63  relation.setBusiness((Contact) business.getObjectValue());
64  }
Here is the call graph for this function:

◆ onCancel()

void org.turro.contacts.profile.EditRelationControl.onCancel ( )

Definition at line 91 of file EditRelationControl.java.

91  {
92  Application.getApplication().sendRedirect(path);
93  }
Here is the call graph for this function:

◆ onEnd()

void org.turro.contacts.profile.EditRelationControl.onEnd ( )

Definition at line 77 of file EditRelationControl.java.

77  {
78  relation.setEndDate(end.getValue());
79  }
Here is the call graph for this function:

◆ onPosition()

void org.turro.contacts.profile.EditRelationControl.onPosition ( )

Definition at line 67 of file EditRelationControl.java.

67  {
68  relation.setDescription(position.getObjectValue());
69  }
void setDescription(String description)
Here is the call graph for this function:

◆ onSave()

void org.turro.contacts.profile.EditRelationControl.onSave ( )

Definition at line 82 of file EditRelationControl.java.

82  {
83  if(!relation.isEmpty()) {
84  new ContactsPU().saveObject(relation);
85  Application.getApplication().sendRedirect(path);
86  sendNotification(relation);
87  }
88  }
Here is the call graph for this function:

◆ onStart()

void org.turro.contacts.profile.EditRelationControl.onStart ( )

Definition at line 72 of file EditRelationControl.java.

72  {
73  relation.setStartDate(start.getValue());
74  }
Here is the call graph for this function:

◆ setPath()

void org.turro.contacts.profile.EditRelationControl.setPath ( String  path)

Definition at line 99 of file EditRelationControl.java.

99  {
100  this.path = path;
101  }

◆ setType()

void org.turro.contacts.profile.EditRelationControl.setType ( String  type)

Definition at line 107 of file EditRelationControl.java.

107  {
108  this.type = type;
109  }

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