-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* IOrchestrationDescriptionBuilder * Start/schedule handlers * Namespace * Fix naming and design * TODO's * Interface for query handler * Refactor example * Avoid changning NuGet packages
- Loading branch information
1 parent
8be8819
commit d6cad01
Showing
27 changed files
with
224 additions
and
134 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...cessManager.Core/Application/Api/Handlers/IScheduleOrchestrationInstanceCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2020 Energinet DataHub A/S | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License2"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model; | ||
|
||
namespace Energinet.DataHub.ProcessManagement.Core.Application.Api.Handlers; | ||
|
||
/// <summary> | ||
/// Interface for handling a command for scheduling an orchestration instance with an input parameter. | ||
/// </summary> | ||
/// <typeparam name="TCommand">The type of the command.</typeparam> | ||
/// <typeparam name="TInputParameterDto">The type of the input parameter DTO.</typeparam> | ||
public interface IScheduleOrchestrationInstanceCommandHandler<TCommand, TInputParameterDto> | ||
where TCommand : ScheduleOrchestrationInstanceCommand<TInputParameterDto> | ||
where TInputParameterDto : IInputParameterDto | ||
{ | ||
/// <summary> | ||
/// Handles a command for scheduling an orchestration instance. | ||
/// </summary> | ||
/// <param name="command">The command to handle.</param> | ||
/// <returns>The ID of the orchestration instance.</returns> | ||
Task<Guid> HandleAsync(TCommand command); | ||
} |
34 changes: 34 additions & 0 deletions
34
...ProcessManager.Core/Application/Api/Handlers/ISearchOrchestrationInstancesQueryHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2020 Energinet DataHub A/S | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License2"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model; | ||
|
||
namespace Energinet.DataHub.ProcessManagement.Core.Application.Api.Handlers; | ||
|
||
/// <summary> | ||
/// Interface for handling a query for searching orchestration instances. | ||
/// </summary> | ||
/// <typeparam name="TQuery">The type of the query.</typeparam> | ||
/// <typeparam name="TResultItem">The result type of each item returned in the result list from the query. Must be a JSON serializable type.</typeparam> | ||
public interface ISearchOrchestrationInstancesQueryHandler<TQuery, TResultItem> | ||
where TQuery : SearchOrchestrationInstancesByCustomQuery<TResultItem> | ||
where TResultItem : class | ||
{ | ||
/// <summary> | ||
/// Handles a query for searching orchestration instances. | ||
/// </summary> | ||
/// <param name="query">The query to handle.</param> | ||
/// <returns>Returns a result item for each matching orchestration instance.</returns> | ||
Task<IReadOnlyCollection<TResultItem>> HandleAsync(TQuery query); | ||
} |
35 changes: 35 additions & 0 deletions
35
...ProcessManager.Core/Application/Api/Handlers/IStartOrchestrationInstanceCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2020 Energinet DataHub A/S | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License2"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model; | ||
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model.OrchestrationInstance; | ||
|
||
namespace Energinet.DataHub.ProcessManagement.Core.Application.Api.Handlers; | ||
|
||
/// <summary> | ||
/// Interface for handling a command for starting an orchestration instance with an input parameter. | ||
/// </summary> | ||
/// <typeparam name="TCommand">The type of the command.</typeparam> | ||
/// <typeparam name="TInputParameterDto">The type of the input parameter DTO.</typeparam> | ||
public interface IStartOrchestrationInstanceCommandHandler<TCommand, TInputParameterDto> | ||
where TCommand : StartOrchestrationInstanceCommand<UserIdentityDto, TInputParameterDto> | ||
where TInputParameterDto : IInputParameterDto | ||
{ | ||
/// <summary> | ||
/// Handles a command for starting an orchestration instance. | ||
/// </summary> | ||
/// <param name="command">The command to handle.</param> | ||
/// <returns>The ID of the orchestration instance.</returns> | ||
Task<Guid> HandleAsync(TCommand command); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
...rchestrations/Processes/BRS_021/ForwardMeteredData/V1/StartForwardMeteredDataTriggerV1.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.