1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export declare class Descriptor {
|
27 | private _group;
|
28 | private _type;
|
29 | private _kind;
|
30 | private _name;
|
31 | private _version;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | constructor(group: string, type: string, kind: string, name: string, version: string);
|
42 | /**
|
43 | * Gets the component's logical group.
|
44 | *
|
45 | * @returns the component's logical group
|
46 | */
|
47 | getGroup(): string;
|
48 | /**
|
49 | * Gets the component's logical type.
|
50 | *
|
51 | * @returns the component's logical type.
|
52 | */
|
53 | getType(): string;
|
54 | /**
|
55 | * Gets the component's implementation type.
|
56 | *
|
57 | * @returns the component's implementation type.
|
58 | */
|
59 | getKind(): string;
|
60 | /**
|
61 | * Gets the unique component's name.
|
62 | *
|
63 | * @returns the unique component's name.
|
64 | */
|
65 | getName(): string;
|
66 | /**
|
67 | * Gets the component's implementation version.
|
68 | *
|
69 | * @returns the component's implementation version.
|
70 | */
|
71 | getVersion(): string;
|
72 | private matchField;
|
73 | /**
|
74 | * Partially matches this descriptor to another descriptor.
|
75 | * Fields that contain "*" or null are excluded from the match.
|
76 | *
|
77 | * @param descriptor the descriptor to match this one against.
|
78 | * @returns true if descriptors match and false otherwise
|
79 | *
|
80 | * @see [[exactMatch]]
|
81 | */
|
82 | match(descriptor: Descriptor): boolean;
|
83 | private exactMatchField;
|
84 | /**
|
85 | * Matches this descriptor to another descriptor by all fields.
|
86 | * No exceptions are made.
|
87 | *
|
88 | * @param descriptor the descriptor to match this one against.
|
89 | * @returns true if descriptors match and false otherwise.
|
90 | *
|
91 | * @see [[match]]
|
92 | */
|
93 | exactMatch(descriptor: Descriptor): boolean;
|
94 | /**
|
95 | * Checks whether all descriptor fields are set.
|
96 | * If descriptor has at least one "*" or null field it is considered "incomplete",
|
97 | *
|
98 | * @returns true if all descriptor fields are defined and false otherwise.
|
99 | */
|
100 | isComplete(): boolean;
|
101 | /**
|
102 | * Compares this descriptor to a value.
|
103 | * If value is a Descriptor it tries to match them,
|
104 | * otherwise the method returns false.
|
105 | *
|
106 | * @param value the value to match against this descriptor.
|
107 | * @returns true if the value is matching descriptor and false otherwise.
|
108 | *
|
109 | * @see [[match]]
|
110 | */
|
111 | equals(value: any): boolean;
|
112 | /**
|
113 | * Gets a string representation of the object.
|
114 | * The result is a colon-separated list of descriptor fields as
|
115 | * "mygroup:connector:aws:default:1.0"
|
116 | *
|
117 | * @returns a string representation of the object.
|
118 | */
|
119 | toString(): string;
|
120 | /**
|
121 | * Parses colon-separated list of descriptor fields and returns them as a Descriptor.
|
122 | *
|
123 | * @param value colon-separated descriptor fields to initialize Descriptor.
|
124 | * @returns a newly created Descriptor.
|
125 | * @throws a [[ConfigException]] if the descriptor string is of a wrong format.
|
126 | */
|
127 | static fromString(value: String): Descriptor;
|
128 | }
|