Creates a new instance of the descriptor.
a logical component group
a logical component type or contract
a component implementation type
a unique component name
a component implementation version
Compares this descriptor to a value. If value is a Descriptor it tries to match them, otherwise the method returns false.
the value to match against this descriptor.
true if the value is matching descriptor and false otherwise.
Matches this descriptor to another descriptor by all fields. No exceptions are made.
the descriptor to match this one against.
true if descriptors match and false otherwise.
Gets the component's logical group.
the component's logical group
Gets the component's implementation type.
the component's implementation type.
Gets the unique component's name.
the unique component's name.
Gets the component's logical type.
the component's logical type.
Gets the component's implementation version.
the component's implementation version.
Checks whether all descriptor fields are set. If descriptor has at least one "*" or null field it is considered "incomplete",
true if all descriptor fields are defined and false otherwise.
Partially matches this descriptor to another descriptor. Fields that contain "*" or null are excluded from the match.
the descriptor to match this one against.
true if descriptors match and false otherwise
Gets a string representation of the object. The result is a colon-separated list of descriptor fields as "mygroup:connector:aws:default:1.0"
a string representation of the object.
Parses colon-separated list of descriptor fields and returns them as a Descriptor.
colon-separated descriptor fields to initialize Descriptor.
a newly created Descriptor.
Generated using TypeDoc
Locator type that most often used in PipServices toolkit. It locates components using several fields:
The locator matching can be done by all or only few selected fields. The fields that shall be excluded from the matching must be set to
"*"
ornull
. That approach allows to implement many interesting scenarios. For instance:Example
let locator1 = new Descriptor("mygroup", "connector", "aws", "default", "1.0"); let locator2 = Descriptor.fromString("mygroup:connector:*:*:1.0"); locator1.match(locator2); // Result: true locator1.equal(locator2); // Result: true locator1.exactMatch(locator2); // Result: false