BrightSide Workbench Full Report + Source Code
org.turro.alliance.client.model.ParticipationAdapter Class Reference

Public Member Functions

 ParticipationAdapter (WsServer server, Long callingMember, Jsons axParticipation)
 
WsServer getServer ()
 
Jsons getAxParticipation ()
 
boolean getBeneficiary ()
 
boolean getOfferer ()
 
boolean getConsortium ()
 
Date getCreation ()
 
String getRequesterName ()
 
String getReceiverName ()
 
String getProjectDescription ()
 

Detailed Description

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

Definition at line 36 of file ParticipationAdapter.java.

Constructor & Destructor Documentation

◆ ParticipationAdapter()

org.turro.alliance.client.model.ParticipationAdapter.ParticipationAdapter ( WsServer  server,
Long  callingMember,
Jsons  axParticipation 
)

Definition at line 42 of file ParticipationAdapter.java.

42  {
43  this.server = server;
44  this.callingMember = callingMember;
45  this.axParticipation = axParticipation;
46  }

Member Function Documentation

◆ getAxParticipation()

Jsons org.turro.alliance.client.model.ParticipationAdapter.getAxParticipation ( )

Definition at line 52 of file ParticipationAdapter.java.

52  {
53  return axParticipation;
54  }

◆ getBeneficiary()

boolean org.turro.alliance.client.model.ParticipationAdapter.getBeneficiary ( )

Definition at line 56 of file ParticipationAdapter.java.

56  {
57  return axParticipation.getBoolean("beneficiary");
58  }

◆ getConsortium()

boolean org.turro.alliance.client.model.ParticipationAdapter.getConsortium ( )

Definition at line 64 of file ParticipationAdapter.java.

64  {
65  return axParticipation.getBoolean("consortium");
66  }

◆ getCreation()

Date org.turro.alliance.client.model.ParticipationAdapter.getCreation ( )

Definition at line 68 of file ParticipationAdapter.java.

68  {
69  return axParticipation.getDate("creation");
70  }

◆ getOfferer()

boolean org.turro.alliance.client.model.ParticipationAdapter.getOfferer ( )

Definition at line 60 of file ParticipationAdapter.java.

60  {
61  return axParticipation.getBoolean("offerer");
62  }

◆ getProjectDescription()

String org.turro.alliance.client.model.ParticipationAdapter.getProjectDescription ( )

Definition at line 81 of file ParticipationAdapter.java.

81  {
82  JsonSearch axp = JsonSearch.of(axParticipation);
83  if(Objects.equals(callingMember, axp.read("$.relation.mainMemberId", Long.class))) {
84  return new DossierPU().find(Dossier.class, axp.read("$.relation.mainEntityId", Long.class)).getDescription();
85  } else {
86  return Projects.from(server).project(projectId(axp)).getString("name");
87  }
88  }
Here is the call graph for this function:

◆ getReceiverName()

String org.turro.alliance.client.model.ParticipationAdapter.getReceiverName ( )

Definition at line 76 of file ParticipationAdapter.java.

76  {
77  return Servers.getElephantString(server.getServerDomain(), WsConstants.MEMBER_TRADENAME,
78  Jsons.object().add("memberId", JsonSearch.of(axParticipation).read("$.relation.mainMemberId", Long.class)));
79  }
String getServerDomain()
Definition: WsServer.java:52
Here is the call graph for this function:

◆ getRequesterName()

String org.turro.alliance.client.model.ParticipationAdapter.getRequesterName ( )

Definition at line 72 of file ParticipationAdapter.java.

72  {
73  return axParticipation.getString("memberName");
74  }

◆ getServer()

WsServer org.turro.alliance.client.model.ParticipationAdapter.getServer ( )

Definition at line 48 of file ParticipationAdapter.java.

48  {
49  return server;
50  }

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