Skip to content

CircuitManager

ESM: import CircuitManager from "@arcgis/core/networks/CircuitManager.js";
CDN: const CircuitManager = await $arcgis.import("@arcgis/core/networks/CircuitManager.js");
Class: @arcgis/core/networks/CircuitManager
Inheritance: CircuitManagerAccessor
Since: ArcGIS Maps SDK for JavaScript 4.34
beta

A CircuitManager provides access to circuit management capabilities for a telecom domain network in a utility network.

See also
Example
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

CircuitManager

Constructor
new CircuitManager(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
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

Property
circuitSectionTable FeatureLayerreadonly

A FeatureLayer for the telecom domain network's circuit section table.

circuitTable

Property
circuitTable FeatureLayerreadonly

A FeatureLayer for the telecom domain network's circuit table.

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

featureServiceUrl

Property
featureServiceUrl Stringreadonly

Returns the root feature service URL which the utility network is part of.

Example
`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/FeatureServer/`

gdbVersion

Property
gdbVersion String |null |undefinedreadonly

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.

historicMoment

Property
historicMoment Date |null |undefinedreadonly

The utility network's historic moment to query. If this property is not specified, queries will apply to the current features.

networkServiceUrl

Property
networkServiceUrl Stringreadonly

The URL of the network server.

Example
`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/UtilityNetworkServer/`

subcircuitTable

Property
subcircuitTable FeatureLayerreadonly

A FeatureLayer for the telecom domain network's subcircuit table.

telecomDomainNetwork

Property
telecomDomainNetwork DomainNetworkJSON

An object representing the telecom domain network in the utility network data element.

telecomDomainNetworkName

Property
telecomDomainNetworkName Stringreadonly

The name of the telecom domain network.

utilityNetwork

Property
utilityNetwork UtilityNetwork

The UtilityNetwork that contains the telecom domain network being managed.

Method Overview

Show inherited methods Hide inherited methods
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

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 property set to the current CircuitManager instance.

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
Promise<String[]>

Returns the names of circuits in a telecom domain network with specified start/stop locations.

CircuitManager
Promise<Circuit[]>

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

Checks the validity of circuits in a telecom domain network.

CircuitManager

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
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();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key 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.

alter

Method
alter(circuit){Promise<void>}

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 globalId property, else this method will throw an exception.

Parameter
circuit Circuit

The circuit to be altered.

Returns
Type Description
Promise<void> Resolves when the circuit is successfully altered.

create

Method
create(circuit){Promise<void>}

Creates a circuit in a telecom domain network.

Parameter
circuit Circuit

The circuit to create.

Returns
Type Description
Promise<void> Resolves when the circuit is successfully created.

delete

Method
delete(circuitNames){Promise<void>}

Logically deletes one or more circuits in a telecom domain network.

Parameter
circuitNames String[]

The names of the circuit or circuits to be deleted.

Returns
Type Description
Promise<void> Resolves when the specified circuits are successfully deleted.

export

Method
export(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.

Parameters
Specification
props Object

An object specifying configuration settings for the export.

Specification
circuits String[]
optional

The names of the circuit or circuits to be exported.

exportAcknowledgement Boolean
optional
Default Value: false

Specifies whether the export is acknowledged. If true, the default version is required for the utility network's gdbVersion.

Returns
Type Description
Promise<CircuitExportResult[]> Resolves to an object specifying the export location and status for each circuit.

fromJSON

Method
fromJSON(json){* |null |undefined}static

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 json parameter 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.

Parameter
json Object

A 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
Type Description
* | null | undefined Returns a new instance of this class.

getCircuit

Method
getCircuit(circuitName, isSectioned){Circuit}

Returns a Circuit instance with its circuitManager property set to the current CircuitManager instance.

Parameters
circuitName String

The name of the Circuit instance to create.

isSectioned Boolean
optional
Default Value: false

Whether the Circuit instance is sectioned.

Returns
Type Description
Circuit A Circuit instance with its circuitManager property set to the current CircuitManager instance.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if 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

Method
loadCircuitSectionTable(){Promise<FeatureLayer>}

Loads the telecom domain network's circuit section table.

Returns
Type Description
Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the circuit section table.

loadCircuitTable

Method
loadCircuitTable(){Promise<FeatureLayer>}

Loads the telecom domain network's circuit table.

Returns
Type Description
Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the circuit table.

loadSubcircuitTable

Method
loadSubcircuitTable(){Promise<FeatureLayer>}

Loads the telecom domain network's subcircuit table.

Returns
Type Description
Promise<FeatureLayer> Resolves to a loaded FeatureLayer for the subcircuit table.

queryCircuitNames

Method
queryCircuitNames(props){Promise<String[]>}

Returns the names of circuits in a telecom domain network with specified start/stop locations.

Parameter

The start/stop location of the circuits to query.

Returns
Type Description
Promise<String[]> The queried circuit names.

queryCircuits

Method
queryCircuits(input){Promise<Circuit[]>}

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 returnConsumingCircuits is false, only the immediate circuits that pass through the specified feature are returned. Otherwise, all the circuits that consume the immediate circuits are returned.

Parameter

The names or start/stop location of the circuits to query.

Returns
Type Description
Promise<Circuit[]> The queried circuits.

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

toJSON

Method
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

verify

Method
verify(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.

Parameters
circuitNames String[]

The names of the circuit or circuits to be verified.

synthesizeGeometries Boolean
optional
Default Value: false

Specifies whether geometries will be inferred and created (synthesized) for the circuits.

Returns
Type Description
Promise<CircuitVerifyResult[]> Resolves to an array of objects specifying the verification status for each circuit.

Type Definitions

CircuitExportResult

Type Definition
CircuitExportResult Object

Results returned from the export method.

Properties
circuitName String

The name of the exported circuit.

url String

The location of the exported circuit JSON file.

circuitHasBeenDeleted Boolean

Indicates if the circuit has been logically deleted.

success Boolean

Indicates if the export was successful.

error Object
optional

Optional error information if the export failed.

Specification
message String
optional

Error message.

extendedCode Number
optional

Extended error code.

details String[]
optional

Additional error details.

QueryCircuitProps

Type Definition
QueryCircuitProps Object

Describes a start/stop circuit location for circuit queries.

Properties
location CircuitLocation
optional

The start or stop location of the circuit to query.

locationType String
optional

The type of location to query circuits by.

Possible Values:"start"|"stop"|"all"

returnConsumerCircuits Boolean
optional
Default Value:false

If false, returns only the immediate circuits passing through the specified location. Otherwise, returns all the circuits that consume the immediate circuits.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.