refactor(browse): rename BrowseOpcUaNode* to protocol-agnostic BrowseNode*
Renames BrowseOpcUaNodeCommand/Result -> BrowseNodeCommand/Result and CommunicationService.BrowseOpcUaNodeAsync -> BrowseNodeAsync across Commons, Communication, SiteRuntime, DCL actors, and CentralUI. Wire manifest name follows (BrowseOpcUaNode -> BrowseNode). Browse regression tests green.
This commit is contained in:
@@ -6,7 +6,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Services;
|
||||
/// CentralUI facade over the central-to-site OPC UA browse command. Backs the
|
||||
/// OPC UA Tag Browser dialog: each tree expansion / manual node-id paste calls
|
||||
/// <see cref="BrowseChildrenAsync"/>, which forwards a
|
||||
/// <see cref="BrowseOpcUaNodeCommand"/> to the owning site via
|
||||
/// <see cref="BrowseNodeCommand"/> to the owning site via
|
||||
/// <see cref="ZB.MOM.WW.ScadaBridge.Communication.CommunicationService"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -29,7 +29,7 @@ public interface IOpcUaBrowseService
|
||||
/// <param name="connectionName">Name of the site-local data connection to browse against — the site's <c>DataConnectionManagerActor</c> indexes its children by name.</param>
|
||||
/// <param name="parentNodeId">Node to browse, or <c>null</c> to browse from the server root.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
Task<BrowseOpcUaNodeResult> BrowseChildrenAsync(
|
||||
Task<BrowseNodeResult> BrowseChildrenAsync(
|
||||
string siteId,
|
||||
string connectionName,
|
||||
string? parentNodeId,
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Default <see cref="IOpcUaBrowseService"/> implementation — a thin facade over
|
||||
/// <see cref="CommunicationService.BrowseOpcUaNodeAsync"/> that enforces the
|
||||
/// <see cref="CommunicationService.BrowseNodeAsync"/> that enforces the
|
||||
/// CentralUI-side <c>Design</c>-role trust boundary and translates transport
|
||||
/// exceptions into a typed <see cref="BrowseFailure"/> result.
|
||||
/// </summary>
|
||||
@@ -36,7 +36,7 @@ public sealed class OpcUaBrowseService : IOpcUaBrowseService
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public async Task<BrowseOpcUaNodeResult> BrowseChildrenAsync(
|
||||
public async Task<BrowseNodeResult> BrowseChildrenAsync(
|
||||
string siteId,
|
||||
string connectionName,
|
||||
string? parentNodeId,
|
||||
@@ -47,7 +47,7 @@ public sealed class OpcUaBrowseService : IOpcUaBrowseService
|
||||
var state = await _auth.GetAuthenticationStateAsync();
|
||||
if (!state.User.HasClaim(JwtTokenService.RoleClaimType, "Design"))
|
||||
{
|
||||
return new BrowseOpcUaNodeResult(
|
||||
return new BrowseNodeResult(
|
||||
Array.Empty<BrowseNode>(),
|
||||
Truncated: false,
|
||||
new BrowseFailure(BrowseFailureKind.ServerError, "Not authorized."));
|
||||
@@ -55,9 +55,9 @@ public sealed class OpcUaBrowseService : IOpcUaBrowseService
|
||||
|
||||
try
|
||||
{
|
||||
return await _communication.BrowseOpcUaNodeAsync(
|
||||
return await _communication.BrowseNodeAsync(
|
||||
siteId,
|
||||
new BrowseOpcUaNodeCommand(connectionName, parentNodeId),
|
||||
new BrowseNodeCommand(connectionName, parentNodeId),
|
||||
cancellationToken);
|
||||
}
|
||||
catch (TimeoutException ex)
|
||||
@@ -65,7 +65,7 @@ public sealed class OpcUaBrowseService : IOpcUaBrowseService
|
||||
// Akka Ask timed out — the site (or its OPC UA session) didn't answer
|
||||
// within CommunicationOptions.QueryTimeout. Surface as a typed
|
||||
// Timeout failure so the dialog can render an inline banner.
|
||||
return new BrowseOpcUaNodeResult(
|
||||
return new BrowseNodeResult(
|
||||
Array.Empty<BrowseNode>(),
|
||||
Truncated: false,
|
||||
new BrowseFailure(BrowseFailureKind.Timeout, ex.Message));
|
||||
@@ -80,7 +80,7 @@ public sealed class OpcUaBrowseService : IOpcUaBrowseService
|
||||
{
|
||||
// Any other transport / serialization failure: keep the dialog
|
||||
// alive and let the user fall back to manual node-id paste.
|
||||
return new BrowseOpcUaNodeResult(
|
||||
return new BrowseNodeResult(
|
||||
Array.Empty<BrowseNode>(),
|
||||
Truncated: false,
|
||||
new BrowseFailure(BrowseFailureKind.ServerError, ex.Message));
|
||||
|
||||
Reference in New Issue
Block a user