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

Public Member Functions

String render (IConstructor constructor)
 
void init (IConstructor constructor)
 
boolean isRequired ()
 
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 FinancialsSummary.java.

Member Function Documentation

◆ compareTo()

int org.turro.financials.command.FinancialsSummary.compareTo ( IUserSummary  o)

Definition at line 100 of file FinancialsSummary.java.

100  {
101  int result = CompareUtil.compare(getOrder(), o.getOrder());
102  if(result == 0) {
103  result = CompareUtil.compare(getClass().getName(), o.getClass().getName());
104  }
105  return result;
106  }
Here is the call graph for this function:

◆ getOrder()

int org.turro.financials.command.FinancialsSummary.getOrder ( )

Implements org.turro.action.IUserSummary.

Definition at line 95 of file FinancialsSummary.java.

95  {
96  return 1;
97  }
Here is the caller graph for this function:

◆ init()

void org.turro.financials.command.FinancialsSummary.init ( IConstructor  constructor)

Implements org.turro.action.IUserSummary.

Definition at line 59 of file FinancialsSummary.java.

59  {
60  Long handshakeCount = (Long) UserSummaries.getAttribute("handshakeCount");
61 
62  if(handshakeCount == null) {
63 
64  IContact contact = Authentication.getIContact();
65 
66  UserSummaries.setAttribute("handshakeCount", Long.valueOf(HandshakeList.count()));
67 
68  if(!contact.isOutsider()) {
69  ContractContentIterator ci = new ContractContentIterator(constructor, null, contact, false, null);
70  DocumentModel dm = new DocumentModel();
71  UserSummaries.setAttribute("contractCount", Long.valueOf(ci.count()));
72  UserSummaries.setAttribute("documentCount", dm.getDocumentsCount(ci.items()));
73  UserSummaries.setAttribute("balanceAmount", Double.valueOf(contractsBalance(ci)));
74  UserSummaries.setAttribute("notPreparedCount", Long.valueOf(FollowUps.countNotPrepared(contact)));
75  UserSummaries.setAttribute("notDeliveredCount", Long.valueOf(FollowUps.countNotDelivered(contact)));
76  }
77 
78  }
79  }
Here is the call graph for this function:

◆ isRequired()

boolean org.turro.financials.command.FinancialsSummary.isRequired ( )

Implements org.turro.action.IUserSummary.

Definition at line 90 of file FinancialsSummary.java.

90  {
91  return false;
92  }

◆ render()

String org.turro.financials.command.FinancialsSummary.render ( IConstructor  constructor)

Implements org.turro.action.IUserSummary.

Definition at line 43 of file FinancialsSummary.java.

43  {
44  ElephantMarker marker = new ElephantMarker(constructor);
45  marker.putAll(UserSummaries.getAttributes());
46 
47  if(UserSummaries.isNotZero("handshakeCount") ||
48  UserSummaries.isNotZero("contractCount") ||
49  UserSummaries.isNotZero("balanceAmount") ||
50  UserSummaries.isNotZero("notPreparedCount") ||
51  UserSummaries.isNotZero("notDeliveredCount")) {
52  return marker.parse("contract", "userSummary");
53  }
54 
55  return "";
56  }
Here is the call graph for this function:

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