pip_services3_commons
library
Classes
-
AndRule
-
Validation rule to combine rules with AND logical operation.
When all rules returns no errors, than this rule also returns no errors.
When one of the rules return errors, than the rules returns all errors.
-
AnyValue
-
Cross-language implementation of dynamic object what can hold value of any type.
The stored value can be converted to different types using variety of accessor methods.
-
AnyValueArray
-
Cross-language implementation of dynamic object array what can hold values of any type.
The stored values can be converted to different types using variety of accessor methods.
-
AnyValueMap
-
Cross-language implementation of dynamic object map (dictionary) what can hold values of any type.
The stored values can be converted to different types using variety of accessor methods.
-
ApplicationExceptionFactory
-
Factory to recreate exceptions from ErrorDescription values passed through the wire.
-
ArrayConverter
-
Converts arbitrary values into array objects.
-
ArraySchema
-
Schema to validate arrays.
-
AtLeastOneExistsRule
-
Validation rule that check that at least one of the object properties is not null.
-
BooleanConverter
-
Converts arbitrary values to boolean values using extended conversion rules:
-
Cleaner
-
Helper class that cleans stored object state.
-
Closer
-
Helper class that closes previously opened components.
-
Command
-
Concrete implementation of ICommand interface. Command allows to call a method
or function using Command pattern.
-
CommandSet
-
Contains a set of commands and events supported by a
ICommandable commandable
object.
The CommandSet supports command interceptors to extend and the command call chain.
CommandSets can be used as alternative commandable interface to a business object.
It can be used to auto generate multiple external services for the business object
without writing much code.
See Command
See Event
See ICommandable
-
ConfigParams
-
Contains a key-value map with configuration parameters.
All values stored as strings and can be serialized as JSON or string forms.
When retrieved the values can be automatically converted on read using GetAsXXX methods.
The keys are case-sensitive, so it is recommended to use consistent C-style as:
'my_param'
-
DataPage<T>
-
Data transfer object that is used to pass results of paginated queries.
It contains items of retrieved page and optional total number of items.
-
DateTimeConverter
-
Converts arbitrary values into Date values using extended conversion rules:
-
DependencyResolver
-
Helper class for resolving component dependencies.
-
Descriptor
-
Locator type that most often used in PipServices toolkit.
It locates components using several fields:
-
DoubleConverter
-
Converts arbitrary values into double using extended conversion rules:
-
DurationConverter
-
Converts arbitrary values into Date values using extended conversion rules:
-
ErrorCategory
-
Defines standard error categories to application exceptions
supported by PipServices toolkit.
-
ErrorDescription
-
Serializeable error description. It is use to pass information about errors
between microservices implemented in different languages. On the receiving side
ErrorDescription is used to recreate exception object close to its original type
without missing additional details.
-
ErrorDescriptionFactory
-
Factory to create serializeable ErrorDescription from ApplicationException
or from arbitrary errors.
-
Event
-
Concrete implementation of IEvent interface.
It allows to send asynchronous notifications to multiple subscribed listeners.
-
ExcludedRule
-
Validation rule to check that value is excluded from the list of constants.
-
Executor
-
Helper class that executes components.
-
FilterParams
-
Data transfer object used to pass filter parameters as simple key-value pairs.
-
FilterParamsSchema
-
Schema to validate FilterParams.
-
FixedRateTimer
-
Timer that is triggered in equal time intervals.
-
FloatConverter
-
Converts arbitrary values into float using extended conversion rules:
-
IChangeable
-
Interface for data objects that contain their latest change time.
-
ICleanable
-
Interface for components that should clean their state.
-
ICloneable
-
Interface for data objects that are able to create their full binary copy.
-
IClosable
-
Interface for components that require explicit closure.
-
ICommand
-
An interface for Commands, which are part of the Command design pattern.
Each command wraps a method or function and allows to call them in uniform and safe manner.
-
ICommandable
-
An interface for commandable objects, which are part of the command design pattern.
The commandable object exposes its functonality as commands and events groupped
into a CommandSet.
This interface is typically implemented by controllers and is used to auto generate
external interfaces.
See CommandSet
-
ICommandInterceptor
-
An interface for stackable command intercepters, which can extend
and modify the command call chain.
-
IConfigurable
-
An interface to set configuration parameters to an object.
-
IdGenerator
-
Helper class to generate unique object IDs.
It supports two types of IDs: long and short.
-
IEvent
-
An interface for Events, which are part of the Command design pattern.
Events allows to send asynchronious notifications to multiple subscribed listeners.
-
IEventListener
-
An interface for listener objects that receive notifications on fired events.
-
IExecutable
-
Interface for components that can be called to execute work.
-
IIdentifiable<K>
-
Generic interface for data objects that can be uniquely identified by an id.
-
INamed
-
Interface for data objects that have human-readable names.
-
IncludedRule
-
Validation rule to check that value is included into the list of constants.
-
INotifiable
-
Interface for components that can be asynchronously notified.
The notification may include optional argument that describe
the occured event.
-
IntegerConverter
-
Converts arbitrary values into integers using extended conversion rules:
-
InterceptedCommand
-
Implements a
ICommand command
wrapped by an interceptor.
It allows to build command call chains. The interceptor can alter execution
and delegate calls to a next command, which can be intercepted or concrete.
See ICommand
See ICommandInterceptor
-
IOpenable
-
Interface for components that require explicit opening and closing.
-
IParameterized
-
Interface for components that require execution parameters.
-
IReconfigurable
-
An interface to set configuration parameters to an object.
-
IReferenceable
-
Interface for components that depends on other components.
-
IReferences
-
Interface for a map that holds component references and passes them to components
to establish dependencies with each other.
-
IStringIdentifiable
-
Interface for data objects that can be uniquely identifed by a string id.
-
ITrackable
-
Interface for data objects that can track their changes, including logical deletion.
-
IUnreferenceable
-
Interface for components that require explicit clearing of references to dependent components.
-
IValidationRule
-
Interface for validation rules.
-
IVersioned
-
Interface for data objects that can be versioned.
-
JsonConverter
-
Converts arbitrary values from and to JSON (JavaScript Object Notation) strings.
-
LongConverter
-
Converts arbitrary values into longs using extended conversion rules:
-
MapConverter
-
Converts arbitrary values into map objects using extended conversion rules:
-
MapSchema
-
Schema to validate maps.
-
MethodReflector
-
Helper class to perform method introspection and dynamic invocation.
-
MultiString
-
An object that contains string translations for multiple languages.
Language keys use two-varter codes like: 'en', 'sp', 'de', 'ru', 'fr', 'pr'.
When translation for specified language does not exists it defaults to English ('en').
When English does not exists it falls back to the first defined language.
-
NameResolver
-
A helper class that allows to extract component name from configuration parameters.
The name can be defined in 'id', 'name' parameters or inside a component descriptor.
-
Notifier
-
Helper class that notifies components.
-
NotRule
-
Validation rule negate another rule.
When embedded rule returns no errors, than this rule return an error.
When embedded rule return errors, than the rule returns no errors.
-
ObjectComparator
-
Helper class to perform comparison operations over arbitrary values.
-
ObjectReader
-
Helper class to perform property introspection and dynamic reading.
-
ObjectSchema
-
Schema to validate user defined objects.
-
ObjectWriter
-
Helper class to perform property introspection and dynamic writing.
-
OnlyOneExistsRule
-
Validation rule that check that at exactly one of the object properties is not null.
-
Opener
-
Helper class that opens components.
-
OptionResolver
-
A helper class to parameters from 'options' configuration section.
-
OrRule
-
Validation rule to combine rules with OR logical operation.
When one of rules returns no errors, than this rule also returns no errors.
When all rules return errors, than the rule returns all errors.
-
PagingParams
-
Data transfer object to pass paging parameters for queries.
-
PagingParamsSchema
-
Schema to validate PagingParams.
-
Parameters
-
Contains map with execution parameters.
-
ProjectionParams
-
Defines projection parameters with list if fields to include into query results.
-
ProjectionParamsSchema
-
Schema to validate ProjectionParams
-
PropertiesComparisonRule
-
Validation rule that compares two object properties.
-
PropertyReflector
-
Helper class to perform property introspection and dynamic reading and writing.
-
PropertySchema
-
Schema to validate object properties
-
RandomArray
-
Random generator for array objects.
-
RandomBoolean
-
Random generator for boolean values.
-
RandomDateTime
-
Random generator for Date time values.
-
RandomDouble
-
Random generator for double values.
-
RandomFloat
-
Random generator for float values.
-
RandomInteger
-
Random generator for integer values.
-
RandomString
-
Random generator for string values.
-
RandomText
-
Random generator for various text values like names, addresses or phone numbers.
-
RecursiveMapConverter
-
Converts arbitrary values into map objects using extended conversion rules.
This class is similar to MapConverter, but is recursively converts all values
stored in objects and arrays.
-
RecursiveObjectReader
-
Helper class to perform property introspection and dynamic reading.
-
RecursiveObjectWriter
-
Helper class to perform property introspection and dynamic writing.
-
Reference
-
Contains a reference to a component and locator to find it.
It is used by References to store registered component references.
-
Referencer
-
Helper class that sets and unsets references to components.
-
References
-
The most basic implementation of IReferences to store and locate component references.
-
Schema
-
Basic schema that validates values against a set of validation rules.
-
SortField
-
Defines a field name and order used to sort query results.
-
SortParams
-
Defines a field name and order used to sort query results.
-
StringConverter
-
Converts arbitrary values into strings using extended conversion rules:
-
StringValueMap
-
Cross-language implementation of a map (dictionary) where all keys and values are strings.
The stored values can be converted to different types using variety of accessor methods.
-
TagsProcessor
-
Helper class to extract and process search tags from objects.
The search tags can be kept individually or embedded as hash tags inside text
like 'This text has #hash_tag that can be used for search.'
-
TypeConverter
-
Converts arbitrary values into objects specific by TypeCodes.
For each TypeCode this class calls corresponding converter which applies
extended conversion rules to convert the values.
-
TypeDescriptor
-
Descriptor that points to specific object type by it's name
and optional library (or module) where this type is defined.
-
TypeMatcher
-
Helper class matches value types for equality.
-
TypeReflector
-
Helper class to perform object type introspection and object instantiation.
-
ValidationResult
-
Result generated by schema validation
-
ValueComparisonRule
-
Validation rule that compares value to a constant.
Exceptions / Errors
-
ApplicationException
-
Defines a base class to defive various application exceptions.
-
BadRequestException
-
Errors due to improper user requests.
-
ConfigException
-
Errors related to mistakes in the microservice's user-defined configurations.
-
ConflictException
-
Errors raised by conflicts between object versions that were
posted by the user and those that are stored on the server.
-
ConnectionException
-
Errors that occur during connections to remote services.
They can be related to misconfiguration, network issues, or the remote service itself.
-
FileException
-
Errors in read/write local disk operations.
-
InternalException
-
Errors caused by programming mistakes.
-
InvalidStateException
-
Errors related to calling operations, which require the component to be in a specific state.
-
InvocationException
-
Errors returned by remote services or by the network during call attempts.
-
NotFoundException
-
Errors caused by attempts to access missing objects.
-
ReferenceException
-
Error when required component dependency cannot be found.
-
UnauthorizedException
-
Access errors caused by missing user identity (authentication error) or incorrect security permissions (authorization error).
-
UnknownException
-
Unknown or unexpected errors.
-
UnsupportedException
-
Errors caused by calls to unsupported or not yet implemented functionality.
-
ValidationException
-
Errors in schema validation.