Skip to content

UnitIdentifierManager

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

A UnitIdentifierManager provides access to unit identifier 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 unitIdentifierManager = await utilityNetwork.getUnitIdentifierManager();

Constructors

UnitIdentifierManager

Constructor
new UnitIdentifierManager(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

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

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/`

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

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

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

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.

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.

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");
}

insertGap

Method
insertGap(container, firstUnit, numUnits){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.

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.

Parameters
container UnitIdentifier

The unit container to insert a gap into.

firstUnit Number

The first unit for the gap to be introduced.

numUnits Number

The number of units in the gap.

Returns
Type Description
Promise<void> Resolves when the gap is successfully inserted.

query

Method
query(containers){Promise<UnitQueryResult[]>}

Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a telecom domain network.

Parameter
containers UnitIdentifier[]

The unit container features or objects to query.

Returns
Type Description
Promise<UnitQueryResult[]> Resolves to an array of objects describing the unit identifiers and gaps for the specified unit containers.

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");

reset

Method
reset(containers){Promise<void>}

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.

Parameter
containers UnitIdentifier[]

The unit container features or objects to be reset.

Returns
Type Description
Promise<void> Resolves when the containers are successfully reset.

resize

Method
resize(content, numUnits){Promise<void>}

Alters the number of units associated with a unit identifier feature in a telecom domain network.

Parameters
content UnitIdentifier

The unit identifiable feature or object being resized.

numUnits Number

The number of units for the feature or object to be resized to.

Returns
Type Description
Promise<void> Resolves when the feature or object is successfully resized.

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.

Type Definitions

UnitIdentifier

Type Definition
UnitIdentifier Object

Uniquely identifies an element by network source ID and global ID.

Properties
sourceId Number

The element's network source ID.

globalId String

The element's global ID.

UnitRange

Type Definition
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 Number

The number of unit identifiers in the unit identifier range.

isGap Boolean

Whether the unit identifier range is a gap, i.e., is not utilized.

optional

The object consuming the unit identifiers in this range.

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