import UnitIdentifierManager from "@arcgis/core/networks/UnitIdentifierManager.js";
const UnitIdentifierManager = await $arcgis.import("@arcgis/core/networks/UnitIdentifierManager.js");
@arcgis/core/networks/UnitIdentifierManager
A UnitIdentifierManager provides access to unit identifier 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 unitIdentifierManager = await utilityNetwork.getUnitIdentifierManager();
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 |
---|---|---|---|
The name of the class. | Accessor | ||
Returns the root feature service URL which the utility network is part of. | UnitIdentifierManager | ||
The version of the geodatabase of the feature service data used by the utility network. | UnitIdentifierManager | ||
The utility network's historic moment to query. | UnitIdentifierManager | ||
The URL of the network server. | UnitIdentifierManager | ||
The UtilityNetwork that contains the telecom domain network being managed. | UnitIdentifierManager |
Property Details
-
featureServiceUrl
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/`
-
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
networkServiceUrl Stringreadonly
-
The URL of the network server.
Example`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/UtilityNetworkServer/`
-
utilityNetwork
utilityNetwork 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 | ||
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | UnitIdentifierManager | ||
Returns true if a named group of handles exist. | Accessor | ||
Promise<void> | Shifts existing records in the containment hierarchy of a unit container's NextUnitID sequence to reserve a range of unit IDs in a telecom domain network. | UnitIdentifierManager | |
Promise<UnitQueryResult[]> | Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a telecom domain network. | UnitIdentifierManager | |
Removes a group of handles owned by the object. | Accessor | ||
Promise<void> | Resets the unit identifiers associated with one or more unit container features in a telecom domain network. | UnitIdentifierManager | |
Promise<void> | Alters the number of units associated with a unit identifier feature in a telecom domain network. | UnitIdentifierManager | |
Converts an instance of this class to its ArcGIS portal JSON representation. | UnitIdentifierManager |
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.
-
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.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
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}
Inherited from Accessor -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType 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"); }
-
Shifts existing records in the containment hierarchy of a unit container's NextUnitID sequence to reserve a range of unit IDs in a telecom domain network.
When a gap is inserted at the end of the sequence, the
NEXTUNITID
attribute value for the unit container increases. If a gap is inserted into the middle of an existing sequence, the system will attempt to shift existing records to accommodate the reserved space. The operation will fail and return an error if the reservation requires regrouping an object or occurs in the middle of a connectivity assignment.Parameterscontainer UnitIdentifierThe unit container to insert a gap into.
firstUnit NumberThe first unit for the gap to be introduced.
numUnits NumberThe number of units in the gap.
ReturnsType Description Promise<void> Resolves when the gap is successfully inserted.
-
query
query(containers){Promise<UnitQueryResult[]>}
-
Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a telecom domain network.
Parametercontainers UnitIdentifier[]The unit container features or objects to query.
ReturnsType Description Promise<UnitQueryResult[]> Resolves to an array of objects describing the unit identifiers and gaps for the specified unit containers.
-
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");
-
Resets the unit identifiers associated with one or more unit container features in a telecom domain network. This is done to condense the unit identifier space or overcome unit identifier sequence exhaustion.
Parametercontainers UnitIdentifier[]The unit container features or objects to be reset.
ReturnsType Description Promise<void> Resolves when the containers are successfully reset.
-
Alters the number of units associated with a unit identifier feature in a telecom domain network.
Parameterscontent UnitIdentifierThe unit identifiable feature or object being resized.
numUnits NumberThe number of units for the feature or object to be resized to.
ReturnsType Description Promise<void> Resolves when the feature or object is successfully resized.
-
toJSON
toJSON(){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.
Type Definitions
-
UnitIdentifier
UnitIdentifier Object
-
Uniquely identifies an element by network source ID and global ID.
-
UnitRange
UnitRange Object
-
A range of unit identifiers in a container feature or object's containment hierarchy.
- Properties
-
firstUnit Number
The unit offset in the grouped object.
numUnits NumberThe number of unit identifiers in the unit identifier range.
isGap BooleanWhether the unit identifier range is a gap, i.e., is not utilized.
content UnitIdentifier|nullThe object consuming the unit identifiers in this range.