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

Public Member Functions

void loadData () throws ServletException, IOException
 
void startConstruction () throws ServletException, IOException
 
String getStart ()
 
String getEnd ()
 
- Public Member Functions inherited from org.turro.elephant.impl.abstracts.AbstractElement
 AbstractElement ()
 
String getId ()
 
String getType ()
 
String getTitle ()
 
void setTitle (String title)
 
Collection< String > getMetas ()
 
void setMetas (Collection< String > metas)
 
ElContext getContext ()
 
IConstructor getConstructor ()
 
void setConfiguration (IConstructor constructor, ElContext context)
 
String getStartTitle ()
 
String getEndTitle ()
 
String getStartBody ()
 
String getEndBody ()
 
String getStartFooter ()
 
String getEndFooter ()
 
String getStartOption ()
 
String getEndOption ()
 
boolean canDisplay ()
 
boolean isSelectable ()
 
boolean isInRole ()
 
boolean canPrint ()
 
String getElementFolder ()
 
boolean isOriginalContext ()
 
void setRootCategories (ElContext root)
 
String getTypeName ()
 
AttributeSupport getAttributes ()
 
void applyChanges ()
 
void populateFromParent ()
 
void setDefaultMetas ()
 
void setConfiguration (Element conf, Element factory)
 

Protected Attributes

String sclass
 
int count
 
IContact contact
 
String item
 
String searchValue
 
ContactSortedSet set
 
- Protected Attributes inherited from org.turro.elephant.impl.abstracts.AbstractElement
IConstructor constructor
 
ElContext context
 
AttributeSupport attrSupport
 
Element conf = null
 
String[] types
 
String title
 
Collection< String > metas
 

Detailed Description

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

Definition at line 42 of file MyContactsDashboard.java.

Member Function Documentation

◆ getEnd()

String org.turro.contacts.www.MyContactsDashboard.getEnd ( )

Reimplemented from org.turro.elephant.impl.abstracts.AbstractElement.

Definition at line 111 of file MyContactsDashboard.java.

111  {
112  return "</div>";
113  }

◆ getStart()

String org.turro.contacts.www.MyContactsDashboard.getStart ( )

Reimplemented from org.turro.elephant.impl.abstracts.AbstractElement.

Definition at line 106 of file MyContactsDashboard.java.

106  {
107  return "<div class='" + sclass + "dossier-web'>";
108  }

◆ loadData()

void org.turro.contacts.www.MyContactsDashboard.loadData ( ) throws ServletException, IOException

This method loads element's data. It gets called within IConstructor.startConstruction() and before element's startConstruction() method.

Exceptions
javax.servlet.ServletException
java.io.IOException

Implements org.turro.elephant.context.IElement.

Definition at line 52 of file MyContactsDashboard.java.

52  {
53  sclass = getAttributes().getAttributeValue("attrib:sclass", "");
54  fullTemplate = getAttributes().getAttributeValue("attrib:fullTemplate", "");
55  summaryTemplate = getAttributes().getAttributeValue("attrib:summaryTemplate", "");
56 
57  searchValue = AttributeItem.getFromParameter(getConstructor(), "search-value", "").getValue();
58 
59  item = getConstructor().getParameter("item");
60 
61  if(!Strings.isBlank(item)) {
62  contact = Contacts.getContactById(item);
63  }
64 
65  if(contact != null) {
67  set = null;
68  } else {
69  item = null;
70  set = MyContacts.myContacts(getConstructor(), searchValue);
71  }
72  }
Here is the call graph for this function:

◆ startConstruction()

void org.turro.contacts.www.MyContactsDashboard.startConstruction ( ) throws ServletException, IOException

This method start element's construction. It gets called within IConstructor.startConstruction().

Exceptions
javax.servlet.ServletException
java.io.IOException

Implements org.turro.elephant.context.IElement.

Definition at line 75 of file MyContactsDashboard.java.

75  {
76 
77  ElephantMarker marker = new ElephantMarker(getConstructor());
78  marker.put("searchValue", searchValue);
79  if(!Strings.isBlank(item)) {
80  prepareValues(marker, contact, 0);
81  marker.put("contact", contact.getContact());
82  marker.process("contact", getFullTemplate());
83  } else if(set.isEmpty()) {
84  marker.put("divider", false);
85  marker.put("header", true);
86  marker.put("footer", true);
87  marker.put("empty", true);
88  marker.process("contact", getSummaryTemplate());
89  } else {
90  int index = 0;
91  marker.put("empty", false);
92  for(IContact c : set) {
93  marker.put("divider", index > 0);
94  marker.put("header", index == 0);
95  marker.put("footer", index == set.size() - 1);
96  prepareValues(marker, c, 0);
97  marker.put("contact", c.getContact());
98  marker.process("contact", getSummaryTemplate());
99  index++;
100  }
101  }
102 
103  }
Here is the call graph for this function:

Member Data Documentation

◆ contact

IContact org.turro.contacts.www.MyContactsDashboard.contact
protected

Definition at line 46 of file MyContactsDashboard.java.

◆ count

int org.turro.contacts.www.MyContactsDashboard.count
protected

Definition at line 45 of file MyContactsDashboard.java.

◆ item

String org.turro.contacts.www.MyContactsDashboard.item
protected

Definition at line 47 of file MyContactsDashboard.java.

◆ sclass

String org.turro.contacts.www.MyContactsDashboard.sclass
protected

Definition at line 44 of file MyContactsDashboard.java.

◆ searchValue

String org.turro.contacts.www.MyContactsDashboard.searchValue
protected

Definition at line 48 of file MyContactsDashboard.java.

◆ set

ContactSortedSet org.turro.contacts.www.MyContactsDashboard.set
protected

Definition at line 49 of file MyContactsDashboard.java.


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