BrightSide Workbench Full Report + Source Code
org.turro.ws.WsServer Class Reference
Inheritance diagram for org.turro.ws.WsServer:
Collaboration diagram for org.turro.ws.WsServer:

Public Member Functions

String getServerDomain ()
 
void setServerDomain (String serverDomain)
 
String getService ()
 
void setService (String service)
 
String getContactId ()
 
void setContactId (String contactId)
 
boolean isValidIP (String ip)
 
String getServerStrId ()
 
String getName ()
 
String getStandardPars ()
 
ServiceNamePair getServiceName ()
 
void setServiceName (ServiceNamePair serviceName)
 
IContact getContact ()
 
void setContact (IContact contact)
 
Object entityId ()
 
boolean isEmpty ()
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Static Public Member Functions

static WsServer from (String serverDomain, String service)
 

Detailed Description

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

Definition at line 45 of file WsServer.java.

Member Function Documentation

◆ entityId()

Object org.turro.ws.WsServer.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 126 of file WsServer.java.

126  {
127  return WsServerPK.from(serverDomain, service);
128  }
Here is the call graph for this function:

◆ from()

static WsServer org.turro.ws.WsServer.from ( String  serverDomain,
String  service 
)
static

Definition at line 149 of file WsServer.java.

149  {
150  WsServer server = new WsServer();
151  server.setServerDomain(serverDomain);
152  server.setService(service);
153  return server;
154  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getContact()

IContact org.turro.ws.WsServer.getContact ( )

Definition at line 115 of file WsServer.java.

115  {
116  return Contacts.getContactById(contactId);
117  }
Here is the call graph for this function:

◆ getContactId()

String org.turro.ws.WsServer.getContactId ( )

Definition at line 68 of file WsServer.java.

68  {
69  return contactId;
70  }

◆ getName()

String org.turro.ws.WsServer.getName ( )

Definition at line 92 of file WsServer.java.

92  {
93  return Phrases.start(getContact().getName(), Chars.forward().toString(), getService()).toString();
94  }
IContact getContact()
Definition: WsServer.java:115
Here is the caller graph for this function:

◆ getServerDomain()

String org.turro.ws.WsServer.getServerDomain ( )

Definition at line 52 of file WsServer.java.

52  {
53  return serverDomain;
54  }
Here is the caller graph for this function:

◆ getServerStrId()

String org.turro.ws.WsServer.getServerStrId ( )

Definition at line 88 of file WsServer.java.

88  {
89  return getServerDomain() + getService();
90  }
String getServerDomain()
Definition: WsServer.java:52
Here is the caller graph for this function:

◆ getService()

String org.turro.ws.WsServer.getService ( )

Definition at line 60 of file WsServer.java.

60  {
61  return service;
62  }
Here is the caller graph for this function:

◆ getServiceName()

ServiceNamePair org.turro.ws.WsServer.getServiceName ( )

Definition at line 104 of file WsServer.java.

104  {
105  return serviceName == null ? new ServiceNamePair(service, service) : serviceName;
106  }

◆ getStandardPars()

String org.turro.ws.WsServer.getStandardPars ( )

Definition at line 96 of file WsServer.java.

96  {
97  return "serverDomain=%s&service=%s".formatted(serverDomain, service);
98  }

◆ isEmpty()

boolean org.turro.ws.WsServer.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 131 of file WsServer.java.

131  {
132  return Strings.isBlank(contactId) || Strings.isBlank(serverDomain);
133  }

◆ isValidIP()

boolean org.turro.ws.WsServer.isValidIP ( String  ip)

Definition at line 78 of file WsServer.java.

78  {
79  try {
80  String[] parts = serverDomain.split("[\\:\\/]");
81  return URIs.validIP(parts[0], ip);
82  } catch (UnknownHostException ex) {
83  Logger.getLogger(WsServer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
84  return false;
85  }
86  }
Here is the call graph for this function:

◆ setContact()

void org.turro.ws.WsServer.setContact ( IContact  contact)

Definition at line 119 of file WsServer.java.

119  {
120  contactId = contact == null ? null : contact.getId();
121  }
Here is the call graph for this function:

◆ setContactId()

void org.turro.ws.WsServer.setContactId ( String  contactId)

Definition at line 72 of file WsServer.java.

72  {
73  this.contactId = contactId;
74  }

◆ setServerDomain()

void org.turro.ws.WsServer.setServerDomain ( String  serverDomain)

Definition at line 56 of file WsServer.java.

56  {
57  this.serverDomain = serverDomain;
58  }
Here is the caller graph for this function:

◆ setService()

void org.turro.ws.WsServer.setService ( String  service)

Definition at line 64 of file WsServer.java.

64  {
65  this.service = service;
66  }
Here is the caller graph for this function:

◆ setServiceName()

void org.turro.ws.WsServer.setServiceName ( ServiceNamePair  serviceName)

Definition at line 108 of file WsServer.java.

108  {
109  this.serviceName = serviceName;
110  this.service = serviceName.getService();
111  }
Here is the call graph for this function:

◆ toJson() [1/2]

String org.turro.ws.WsServer.toJson ( )

Definition at line 138 of file WsServer.java.

138  {
139  return toJson(this);
140  }

◆ toJson() [2/2]

String org.turro.ws.WsServer.toJson ( Map< String, Object >  properties)

Definition at line 143 of file WsServer.java.

143  {
144  return toJson(this, properties);
145  }

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