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

Public Member Functions

 PreferencesAdapter (WsServer server)
 
WsServer getServer ()
 
AxMemberPreferences getPreferences ()
 
void save ()
 

Detailed Description

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

Definition at line 31 of file PreferencesAdapter.java.

Constructor & Destructor Documentation

◆ PreferencesAdapter()

org.turro.alliance.client.model.PreferencesAdapter.PreferencesAdapter ( WsServer  server)

Definition at line 36 of file PreferencesAdapter.java.

36  {
37  this.server = server;
38  Jsons response = Servers.getData(server, AxConstants.MEMBER_PREFERENCES, Jsons.object());
39  if(!Jsons.isEmpty(response)) {
40  this.preferences = AxMemberPreferences.fromJson(response.getObject("items").getStructure().asValue());
41  } else {
42  this.preferences = null;
43  }
44  }
static AxMemberPreferences fromJson(JsonValue value)
Here is the call graph for this function:

Member Function Documentation

◆ getPreferences()

AxMemberPreferences org.turro.alliance.client.model.PreferencesAdapter.getPreferences ( )

Definition at line 50 of file PreferencesAdapter.java.

50  {
51  return preferences;
52  }
Here is the caller graph for this function:

◆ getServer()

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

Definition at line 46 of file PreferencesAdapter.java.

46  {
47  return server;
48  }

◆ save()

void org.turro.alliance.client.model.PreferencesAdapter.save ( )

Definition at line 54 of file PreferencesAdapter.java.

54  {
55  Servers.getData(server, AxConstants.SAVE_PREFERENCES, Jsons.read(preferences.toJson()));
56  }
Here is the call graph for this function:

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