Class ServiceDefinition
Base class of Service Definitions.
A service definition represents configuration that is shared across all Service instances.
Deprecated:
This class is only used with the deprecated ServiceRegistry. Use the LocalServiceRegistry instead, which allows configuration on the Service directly.
API Version:
No longer available as of version 19.10.
FTPServiceDefinition, HTTPFormServiceDefinition, HTTPServiceDefinition, SOAPServiceDefinition
| Property | Description |
|---|---|
configuration: ServiceConfig (read-only) | Returns the Service Configuration stored in the database. |
| mock: Boolean | Returns the status of whether mock mode is enabled for all instances of this definition. |
serviceName: String (read-only) | Returns the name of this service. |
| throwOnError: Boolean | Returns the status of whether the shared throwOnError flag is set. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| configure(Object) | Register a callback to handle custom portions of the service. |
| getConfiguration() | Returns the Service Configuration stored in the database. |
| getServiceName() | Returns the name of this service. |
| isMock() | Returns the status of whether mock mode is enabled for all instances of this definition. |
| isThrowOnError() | Returns the status of whether the shared throwOnError flag is set. |
| setMock() | Sets the mock mode for all Service instances that use this definition. |
| setThrowOnError() | Sets the throwOnError flag to true for all Service instances that use this definition. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- configuration: ServiceConfig
(read-only) Returns the Service Configuration stored in the database.
- mock: Boolean
Returns the status of whether mock mode is enabled for all instances of this definition.
- serviceName: String
(read-only) Returns the name of this service.
- throwOnError: Boolean
Returns the status of whether the shared throwOnError flag is set.
- configure(config: Object): ServiceDefinition
Register a callback to handle custom portions of the service.
This callback may declare multiple methods:
Parameters:
- config - Callback object.
Returns:
- this
- getConfiguration(): ServiceConfig
Returns the Service Configuration stored in the database.
Returns:
- Service Configuration.
- getServiceName(): String
Returns the name of this service.
Returns:
- Service name.
- isMock(): Boolean
Returns the status of whether mock mode is enabled for all instances of this definition.
Returns:
- true for mock mode, false otherwise.
- isThrowOnError(): Boolean
Returns the status of whether the shared throwOnError flag is set.
Returns:
- throwOnError flag.
- setMock(): ServiceDefinition
Sets the mock mode for all Service instances that use this definition.
Returns:
- this Service Definition.
- setThrowOnError(): ServiceDefinition
Sets the throwOnError flag to true for all Service instances that use this definition.
Returns:
- this Service Definition.