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

Public Member Functions

String render (IConstructor constructor)
 
boolean isRequired ()
 
void init (IConstructor constructor)
 
int getOrder ()
 
int compareTo (IUserSummary o)
 

Detailed Description

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

Definition at line 40 of file ContactSummary.java.

Member Function Documentation

◆ compareTo()

int org.turro.contacts.command.ContactSummary.compareTo ( IUserSummary  o)

Definition at line 85 of file ContactSummary.java.

85  {
86  int result = CompareUtil.compare(getOrder(), o.getOrder());
87  if(result == 0) {
88  result = CompareUtil.compare(getClass().getName(), o.getClass().getName());
89  }
90  return result;
91  }
Here is the call graph for this function:

◆ getOrder()

int org.turro.contacts.command.ContactSummary.getOrder ( )

Implements org.turro.action.IUserSummary.

Definition at line 80 of file ContactSummary.java.

80  {
81  return 4;
82  }
Here is the caller graph for this function:

◆ init()

void org.turro.contacts.command.ContactSummary.init ( IConstructor  constructor)

Implements org.turro.action.IUserSummary.

Definition at line 55 of file ContactSummary.java.

55  {
56  Long commentsCount = (Long) UserSummaries.getAttribute("commentsFullCount");
57  if(commentsCount == null) {
58  Application app = Application.getApplication();
59  IContact contact = Authentication.getIContact();
60  UserSummaries.setAttribute("pendingCommentsCount", Long.valueOf(CommentItUtil.countPending()));
61  UserSummaries.setAttribute("commentsFullCount", Long.valueOf(CommentItUtil.count()));
62  UserSummaries.setAttribute("contactFullCount", new ContactsParser().getCount(constructor, ""));
63  if(!contact.isOutsider()) {
64  UserSummaries.setAttribute("coworkersCount", contact.getCoworkers().size());
65  UserSummaries.setAttribute("logCount", SystemLogger.getInstance().getCountOf(null, null, null));
66  UserSummaries.setAttribute("loginCount", SystemLogger.getInstance().getCountOf(null, "/log/in", null));
67  UserSummaries.setAttribute("studentCount", ProfileContext.countStudents());
68  UserSummaries.setAttribute("possibleStudentCount", ProfileContext.countPossibleStudents());
69  UserSummaries.setAttribute("workerCount", ProfileContext.countStudents());
70  UserSummaries.setAttribute("possibleWorkerCount", ProfileContext.countPossibleWorkers());
71  UserSummaries.setAttribute("companyCount", ProfileContext.countCompanies());
72  UserSummaries.setAttribute("centerCount", ProfileContext.countCenters());
73  UserSummaries.setAttribute("fullStudentCount", ((long) UserSummaries.getAttribute("studentCount")) + ((long) UserSummaries.getAttribute("possibleStudentCount")));
74  UserSummaries.setAttribute("fullWorkerCount", ((long) UserSummaries.getAttribute("workerCount")) + ((long) UserSummaries.getAttribute("possibleWorkerCount")));
75  }
76  }
77  }
Here is the call graph for this function:

◆ isRequired()

boolean org.turro.contacts.command.ContactSummary.isRequired ( )

Implements org.turro.action.IUserSummary.

Definition at line 50 of file ContactSummary.java.

50  {
51  return false;
52  }

◆ render()

String org.turro.contacts.command.ContactSummary.render ( IConstructor  constructor)

Implements org.turro.action.IUserSummary.

Definition at line 43 of file ContactSummary.java.

43  {
44  ElephantMarker marker = new ElephantMarker(constructor);
45  marker.putAll(UserSummaries.getAttributes());
46  return marker.parse("contact", "userSummary");
47  }
Here is the call graph for this function:

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