Package proseccoCoding.TLN.model
Class Service
java.lang.Object
proseccoCoding.TLN.model.Service
This class represents a Trusted Service with his name, type, status and provider.
It is recommended to not instantiate the Provider object in the constructor of the Service, but to
pass the effective Provider object that contains this service. This parameter is only for having
additional info for this provider, not for deep business logic purposes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the given Service object to this one by comparing both name and typegetName()
Getter for service nameGetter for the service provider, could be null if it is not knownGetter for service statusgetTypes()
Getter for service typeint
hashCode()
Gets the hash code for this service calculated with both name and type
-
Field Details
-
name
Complete name of the service -
types
Type of the service -
status
Status of the service -
provider
Provider that provides this service
-
-
Constructor Details
-
Service
Constructor for a service object- Parameters:
name
- complete name of the servicetypes
- ArrayList containing all ServiceType objects representing the servicestatus
- the status relative to this serviceprovider
- the provider that offers this service (not required)- Throws:
IllegalArgumentException
- if at least one required parameter is null or types is empty
-
-
Method Details
-
getName
Getter for service name- Returns:
- The service name string
-
getTypes
Getter for service type- Returns:
- The ServiceType object
-
getStatus
Getter for service status- Returns:
- The service status string
-
getProvider
Getter for the service provider, could be null if it is not known- Returns:
- The Provider object
-
hashCode
public int hashCode()Gets the hash code for this service calculated with both name and type -
equals
Compares the given Service object to this one by comparing both name and type
-