import CircuitManager from "@arcgis/core/networks/CircuitManager.js";
const CircuitManager = await $arcgis.import("@arcgis/core/networks/CircuitManager.js");
@arcgis/core/networks/CircuitManager
A CircuitManager provides access to circuit management capabilities for a telecom domain network in a utility network.
const utilityNetwork = new UtilityNetwork({
layerUrl: "https://host.com/arcgis/rest/services/Test/FeatureServer/0",
});
await utilityNetwork.load();
const domainNetworks = utilityNetwork.dataElement?.domainNetworks;
const telecomDomainNetwork = domainNetworks.find((dn) => dn.isTelecomNetwork);
const circuitManager = await utilityNetwork.getCircuitManager(telecomDomainNetwork.domainNetworkName);
Constructors
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
| Name | Type | Summary | Class |
|---|---|---|---|
A FeatureLayer for the telecom domain network's circuit section table. | CircuitManager | ||
A FeatureLayer for the telecom domain network's circuit table. | CircuitManager | ||
The name of the class. | Accessor | ||
Returns the root feature service URL which the utility network is part of. | CircuitManager | ||
The version of the geodatabase of the feature service data used by the utility network. | CircuitManager | ||
The utility network's historic moment to query. | CircuitManager | ||
The URL of the network server. | CircuitManager | ||
A FeatureLayer for the telecom domain network's subcircuit table. | CircuitManager | ||
An object representing the telecom domain network in the utility network data element. | CircuitManager | ||
The name of the telecom domain network. | CircuitManager | ||
The UtilityNetwork that contains the telecom domain network being managed. | CircuitManager |
Property Details
-
circuitSectionTable
PropertycircuitSectionTable FeatureLayerreadonly -
A FeatureLayer for the telecom domain network's circuit section table.
-
circuitTable
PropertycircuitTable FeatureLayerreadonly -
A FeatureLayer for the telecom domain network's circuit table.
-
featureServiceUrl
PropertyfeatureServiceUrl Stringreadonly -
Returns the root feature service URL which the utility network is part of.
Example`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/FeatureServer/`
-
The version of the geodatabase of the feature service data used by the utility network. Read the Overview of versioning topic for more details about this capability.
-
The utility network's historic moment to query. If this property is not specified, queries will apply to the current features.
-
networkServiceUrl
PropertynetworkServiceUrl Stringreadonly -
The URL of the network server.
Example`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/UtilityNetworkServer/`
-
subcircuitTable
PropertysubcircuitTable FeatureLayerreadonly -
A FeatureLayer for the telecom domain network's subcircuit table.
-
telecomDomainNetwork
PropertytelecomDomainNetwork DomainNetworkJSON -
An object representing the telecom domain network in the utility network data element.
-
telecomDomainNetworkName
PropertytelecomDomainNetworkName Stringreadonly -
The name of the telecom domain network.
-
utilityNetwork
PropertyutilityNetwork UtilityNetwork -
The UtilityNetwork that contains the telecom domain network being managed.
Method Overview
| Name | Return Type | Summary | Class |
|---|---|---|---|
Adds one or more handles which are to be tied to the lifecycle of the object. | Accessor | ||
Promise<void> | Modifies circuit information for an existing circuit in a telecom domain network. | CircuitManager | |
Promise<void> | Creates a circuit in a telecom domain network. | CircuitManager | |
Promise<void> | Logically deletes one or more circuits in a telecom domain network. | CircuitManager | |
Promise<CircuitExportResult[]> | Exports feature and connectivity information about provided circuits in a telecom domain network into JSON files for consumption by external systems. | CircuitManager | |
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | CircuitManager | ||
Returns a Circuit instance with its | CircuitManager | ||
Returns true if a named group of handles exist. | Accessor | ||
Promise<FeatureLayer> | Loads the telecom domain network's circuit section table. | CircuitManager | |
Promise<FeatureLayer> | Loads the telecom domain network's circuit table. | CircuitManager | |
Promise<FeatureLayer> | Loads the telecom domain network's subcircuit table. | CircuitManager | |
Returns the names of circuits in a telecom domain network with specified start/stop locations. | CircuitManager | ||
Returns circuits from a telecom domain network that satisfy a specified query. | CircuitManager | ||
Removes a group of handles owned by the object. | Accessor | ||
Converts an instance of this class to its ArcGIS portal JSON representation. | CircuitManager | ||
Promise<CircuitVerifyResult[]> | Checks the validity of circuits in a telecom domain network. | CircuitManager |
Method Details
-
Inherited from Accessor
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
-
Modifies circuit information for an existing circuit in a telecom domain network. This method replaces the existing circuit definition with the provided circuit. If any properties are excluded from the provided circuit definition, it is removed from the circuit.
To alter an existing circuit, the provided circuit must have a valid
globalIdproperty, else this method will throw an exception.Parametercircuit CircuitThe circuit to be altered.
ReturnsType Description Promise<void> Resolves when the circuit is successfully altered.
-
Creates a circuit in a telecom domain network.
Parametercircuit CircuitThe circuit to create.
ReturnsType Description Promise<void> Resolves when the circuit is successfully created.
-
Logically deletes one or more circuits in a telecom domain network.
ReturnsType Description Promise<void> Resolves when the specified circuits are successfully deleted.
-
export
Methodexport(props){Promise<CircuitExportResult[]>} -
Exports feature and connectivity information about provided circuits in a telecom domain network into JSON files for consumption by external systems. Each circuit exported is output to a separate JSON file.
ReturnsType Description Promise<CircuitExportResult[]> Resolves to an object specifying the export location and status for each circuit.
-
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input
jsonparameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameterjson ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns
-
getCircuit
MethodgetCircuit(circuitName, isSectioned){Circuit} -
Returns a Circuit instance with its
circuitManagerproperty set to the currentCircuitManagerinstance.ParametersReturnsType Description Circuit A Circuitinstance with itscircuitManagerproperty set to the currentCircuitManagerinstance.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}Inherited from Accessor -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType Description Boolean Returns trueif a named group of handles exist.Example// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
loadCircuitSectionTable
MethodloadCircuitSectionTable(){Promise<FeatureLayer>} -
Loads the telecom domain network's circuit section table.
ReturnsType Description Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the circuit section table.
-
loadCircuitTable
MethodloadCircuitTable(){Promise<FeatureLayer>} -
Loads the telecom domain network's circuit table.
ReturnsType Description Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the circuit table.
-
loadSubcircuitTable
MethodloadSubcircuitTable(){Promise<FeatureLayer>} -
Loads the telecom domain network's subcircuit table.
ReturnsType Description Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the subcircuit table.
-
Returns the names of circuits in a telecom domain network with specified start/stop locations.
Parameterprops QueryCircuitPropsThe start/stop location of the circuits to query.
Returns
-
Returns circuits from a telecom domain network that satisfy a specified query. This method accepts two types of input: an array of circuit names, or an object specifying a trace location from which the circuits to query either start or stop.
If specifying a trace location: If
returnConsumingCircuitsis false, only the immediate circuits that pass through the specified feature are returned. Otherwise, all the circuits that consume the immediate circuits are returned.Parameterinput String[]|QueryCircuitPropsThe names or start/stop location of the circuits to query.
Returns
-
Inherited from Accessor
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");
-
toJSON
MethodtoJSON(){Object} -
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
ReturnsType Description Object The ArcGIS portal JSON representation of an instance of this class.
-
verify
Methodverify(circuitNames, synthesizeGeometries){Promise<CircuitVerifyResult[]>} -
Checks the validity of circuits in a telecom domain network. The operation confirms that a circuit can be traced from the starting location to the stopping location and ensures that circuit sections and subcircuits are properly configured.
ParametersReturnsType Description Promise<CircuitVerifyResult[]> Resolves to an array of objects specifying the verification status for each circuit.
Type Definitions
-
CircuitExportResult
Type DefinitionCircuitExportResult Object -
Results returned from the export method.
- Properties
-
circuitName String
The name of the exported circuit.
url StringThe location of the exported circuit JSON file.
circuitHasBeenDeleted BooleanIndicates if the circuit has been logically deleted.
success BooleanIndicates if the export was successful.
optionalerror ObjectOptional error information if the export failed.
-
QueryCircuitProps
Type DefinitionQueryCircuitProps Object -
Describes a start/stop circuit location for circuit queries.
- Properties
-
optionallocation CircuitLocation
The start or stop location of the circuit to query.
optionallocationType StringThe type of location to query circuits by.
Possible Values:"start"|"stop"|"all"
optionalreturnConsumerCircuits BooleanDefault Value:falseIf false, returns only the immediate circuits passing through the specified location. Otherwise, returns all the circuits that consume the immediate circuits.