-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathIAllocateReleaseIdentifiers.cs
30 lines (26 loc) · 1.76 KB
/
IAllocateReleaseIdentifiers.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) The University of Dundee 2018-2019
// This file is part of the Research Data Management Platform (RDMP).
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
using Rdmp.Core.DataExport.Data;
namespace Rdmp.Core.CohortCommitting.Pipeline.Destinations.IdentifierAllocation;
/// <summary>
/// Class responsible for allocating Release Identifiers for a Cohort that is being committed (see <see cref="BasicCohortDestination"/>) when the user has not supplied any in
/// the file/cohort he is uploading.
/// </summary>
public interface IAllocateReleaseIdentifiers
{
/// <summary>
/// Return a new (or existing) anonymous mapping for the provided <paramref name="privateIdentifier"/>. This will be called for
/// novel identifiers only in a given batch being processed so you do not need to track your return values.
/// </summary>
/// <param name="privateIdentifier"></param>
/// <returns></returns>
object AllocateReleaseIdentifier(object privateIdentifier);
/// <summary>
/// Called before any allocation, lets you know what <see cref="IProject"/> etc is involved in the cohort creation attempt.
/// </summary>
/// <param name="request"></param>
void Initialize(ICohortCreationRequest request);
}