API / geotoolkit / controls / tools / editors / operations / Registry / Registry
operations.Registry.Registry
Registry that stores node edit operations
Constructors
Methods
▸ applyOperation<T, U>(node, operationType, data): boolean
Tries to apply the operation to the specified node
| Name | Type |
|---|---|
T | extends OperationDataMap |
U | extends keyof OperationDataMap |
| Name | Type | Description |
|---|---|---|
node | Node | the target node |
operationType | U | the operation type |
data | T[U] | the operation data (corresponding to operation callback) |
boolean
true if operation was successfully applied and false otherwise
▸ getOperation<T, U>(node, operationType): OperationCallback<T[U]>
Queries edit operation by its type for the specified node
| Name | Type |
|---|---|
T | extends OperationDataMap |
U | extends keyof OperationDataMap |
| Name | Type | Description |
|---|---|---|
node | Node | the node |
operationType | U | the operation type |
OperationCallback<T[U]>
▸ isRegistered<T, U>(node, operationType): boolean
Determines if the specified operation type is registered for the specified node
| Name | Type |
|---|---|
T | extends OperationDataMap |
U | extends keyof OperationDataMap |
| Name | Type | Description |
|---|---|---|
node | Node | the node |
operationType | U | the operation type |
boolean
▸ register<T, U>(nodeType, operationType, operation): Registry
Registers edit operation for the specified node type
| Name | Type |
|---|---|
T | extends OperationDataMap |
U | extends keyof OperationDataMap |
| Name | Type | Description |
|---|---|---|
nodeType | typeof Node | the node type |
operationType | U | the operation type |
operation | OperationCallback<T[U]> | the edit operation callback |
▸ unregister<T, U>(nodeType, operationType): Registry
Unregisters edit operation for the specified node type
| Name | Type |
|---|---|
T | extends OperationDataMap |
U | extends string | number | symbol |
| Name | Type | Description |
|---|---|---|
nodeType | typeof Node | the node type |
operationType | U | the operation type |
▸ Static getInstance(): Registry
Gets the singleton instance of Registry class