Skip to content

Commit

Permalink
[Update] to CDP4JsonSerializer-CE 1.0.0-rc8
Browse files Browse the repository at this point in the history
[Increase] version to 0.9.0
  • Loading branch information
sam.gerene committed Dec 12, 2017
1 parent cdf03fb commit 2d463c2
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CDP4Authentication/CDP4Authentication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4Authentication-CE</Title>
<Version>0.6.2</Version>
<Version>0.9.0</Version>
<Description>Library to support the implementation of authentication</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4DatabaseAuthentication-CE</Title>
<Version>0.6.0</Version>
<Version>0.9.0</Version>
<Description>CDP4 Database authentication</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Orm.Tests/CDP4Orm.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<TargetFrameworks>net45;net451;net452;net46;net461</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4Orm-CE.Tests</Title>
<Version>0.7.0</Version>
<Version>0.9.0</Version>
<Description>CDP4 Data-Model Object Relational Mapping</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc6" />
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc8" />
<PackageReference Include="Npgsql" Version="3.2.5" />
<PackageReference Include="NUnit" Version="3.8.1" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Orm/CDP4Orm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4Orm-CE</Title>
<Version>0.7.0</Version>
<Version>0.9.0</Version>
<Description>CDP4 Data-Model Object Relational Mapping</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
Expand All @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc6" />
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc8" />
<PackageReference Include="Npgsql" Version="3.2.5" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion CDP4WebServer/CDP4WebServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<Company>RHEA System S.A.</Company>
<Title>CDP4WebServer-CE</Title>
<Version>0.6.2</Version>
<Version>0.9.0</Version>
<Description>CDP4 Services Host</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4WebService-CE.Authentication</Title>
<Version>0.6.2.0</Version>
<Version>0.9.0</Version>
<Description>CDP4WebService.Authentication</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
Expand Down
4 changes: 2 additions & 2 deletions CDP4WebServices.API.Tests/CDP4WebServices.API.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4WebServices-CE.API.Tests</Title>
<Version>0.8.1.0</Version>
<Version>0.9.0</Version>
<Description>Unit tests Library for the CDP4 Services API</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc6" />
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc8" />
<PackageReference Include="DotNetZip" Version="1.10.1" />
<PackageReference Include="Nancy" Version="1.4.4" />
<PackageReference Include="Nancy.Bootstrappers.Autofac" Version="1.4.1" />
Expand Down
3 changes: 1 addition & 2 deletions CDP4WebServices.API.Tests/OperationProcessorTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace CDP4WebServices.API.Tests
using CDP4Common.CommonData;
using CDP4Common.DTO;
using CDP4Common.MetaInfo;
using CDP4Common.Operations;
using CDP4Common.Types;

using CDP4WebServices.API.Services;
Expand Down Expand Up @@ -61,7 +60,7 @@ public class OperationProcessorTestFixture

private OperationProcessor operationProcessor;

private PostOperation operation;
private CdpPostOperation operation;

[SetUp]
public void TestSetup()
Expand Down
4 changes: 2 additions & 2 deletions CDP4WebServices.API/CDP4WebServices.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<TargetFrameworks>net45;net451;net452;net46;net461;net462</TargetFrameworks>
<Company>RHEA System S.A.</Company>
<Title>CDP4WebServices-CE.API</Title>
<Version>0.8.1.0</Version>
<Version>0.9.0</Version>
<Description>Library that contains the CDP4 Services API</Description>
<Copyright>Copyright © RHEA System S.A.</Copyright>
<Authors>Sam, Merlin, Alex, Naron</Authors>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc6" />
<PackageReference Include="CDP4JsonSerializer-CE" Version="1.0.0-rc8" />
<PackageReference Include="DotNetZip" Version="1.10.1" />
<PackageReference Include="Nancy.Bootstrappers.Autofac" Version="1.4.1" />
<PackageReference Include="Npgsql" Version="3.2.5" />
Expand Down
37 changes: 16 additions & 21 deletions CDP4WebServices.API/Services/Operations/Model/CdpPostOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,46 @@ namespace CDP4WebServices.API.Services.Operations

using CDP4Common;
using CDP4Common.DTO;
using CDP4Common.Operations;

using Newtonsoft.Json;

/// <summary>
/// The CDP POST operation.
/// </summary>
public class CdpPostOperation : PostOperation
public class CdpPostOperation
{
/// <summary>
/// Initializes a new instance of <see cref="CdpPostOperation"/>
/// </summary>
public CdpPostOperation()
{
this.Delete = new List<ClasslessDTO>();
this.Create = new List<Thing>();
this.Update = new List<ClasslessDTO>();
this.Copy = new List<ClasslessDTO>();
}

/// <summary>
/// Gets or sets the collection of DTO's that need to be deleted
/// </summary>
[JsonProperty("_delete")]
public override List<ClasslessDTO> Delete { get; set; }
public List<ClasslessDTO> Delete { get; set; }

/// <summary>
/// Gets or sets the collection of DTO's that need to be create
/// </summary>
[JsonProperty("_create")]
public override List<Thing> Create { get; set; }
public List<Thing> Create { get; set; }

/// <summary>
/// Gets or sets the collection of DTO's that need to be updated
/// </summary>
[JsonProperty("_update")]
public override List<ClasslessDTO> Update { get; set; }
public List<ClasslessDTO> Update { get; set; }

/// <summary>
/// Gets or sets the collection of DTO's that need to be copied
/// </summary>
[JsonProperty("_copy")]
public override List<ClasslessDTO> Copy { get; set; }

/// <summary>
/// The construct from operation.
/// </summary>
/// <param name="operation">
/// The operation.
/// </param>
/// <remarks>
/// Not used
/// </remarks>
public override void ConstructFromOperation(Operation operation)
{
// do nothing
}
public List<ClasslessDTO> Copy { get; set; }
}
}
23 changes: 10 additions & 13 deletions CDP4WebServices.API/Services/Operations/OperationProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ namespace CDP4WebServices.API.Services.Operations
using System.Collections.Generic;
using System.IO;
using System.Linq;

using CDP4Common;
using CDP4Common.DTO;
using CDP4Common.MetaInfo;
using CDP4Common.Operations;
using CDP4Common.Types;

using CDP4Orm.Dao;
using CDP4Orm.Dao.Resolve;

Expand Down Expand Up @@ -136,7 +133,7 @@ public void Process(
/// <exception cref="InvalidOperationException">
/// If validation failed
/// </exception>
internal void ValidateDeleteOperations(PostOperation operation)
internal void ValidateDeleteOperations(CdpPostOperation operation)
{
// verify presence of classkind and iid
if (operation.Delete.Any(x => !x.ContainsKey(ClasskindKey) || !x.ContainsKey(IidKey)))
Expand Down Expand Up @@ -172,7 +169,7 @@ internal void ValidateDeleteOperations(PostOperation operation)
/// <exception cref="InvalidOperationException">
/// If validation failed
/// </exception>
internal void ValidateCreateOperations(PostOperation operation, Dictionary<string, Stream> fileStore)
internal void ValidateCreateOperations(CdpPostOperation operation, Dictionary<string, Stream> fileStore)
{
// verify all mandatory properties of the thing supplied (throw),
// defer property validation as per the operationsideeffect
Expand Down Expand Up @@ -259,7 +256,7 @@ internal void ValidateCreateOperations(PostOperation operation, Dictionary<strin
/// <exception cref="InvalidOperationException">
/// If validation failed
/// </exception>
internal void ValidateUpdateOperations(PostOperation operation)
internal void ValidateUpdateOperations(CdpPostOperation operation)
{
// verify presence of classkind and iid (throw)
if (operation.Update.Any(x => !x.ContainsKey(ClasskindKey) || !x.ContainsKey(IidKey)))
Expand All @@ -280,7 +277,7 @@ internal void ValidateUpdateOperations(PostOperation operation)
/// <param name="operation">
/// The operation.
/// </param>
private void RegisterUpdateContainersForResolvement(PostOperation operation)
private void RegisterUpdateContainersForResolvement(CdpPostOperation operation)
{
// register items for resolvement
foreach (var thingInfo in operation.Update.Select(x => x.GetInfoPlaceholder()))
Expand Down Expand Up @@ -347,7 +344,7 @@ private void ValidatePostMessage(CdpPostOperation operation, Dictionary<string,
/// <returns>
/// True if the thing type is contained.
/// </returns>
private bool IsContainerUpdateIncluded(PostOperation operation, Thing thing)
private bool IsContainerUpdateIncluded(CdpPostOperation operation, Thing thing)
{
var thingType = thing.GetType().Name;
var metaInfo = this.RequestUtils.MetaInfoProvider.GetMetaInfo(thingType);
Expand All @@ -371,7 +368,7 @@ private bool IsContainerUpdateIncluded(PostOperation operation, Thing thing)
/// <returns>
/// True if found, which also registers the container in the local operationContainmentCache
/// </returns>
private bool TryFindContainerInUpdates(PostOperation operation, Thing thing, IMetaInfo metaInfo)
private bool TryFindContainerInUpdates(CdpPostOperation operation, Thing thing, IMetaInfo metaInfo)
{
// get the thing info as cachekey
var thingInfo = thing.GetInfoPlaceholder();
Expand Down Expand Up @@ -467,7 +464,7 @@ private bool TryFindContainerInUpdates(PostOperation operation, Thing thing, IMe
/// <returns>
/// True if found, which also registers the container in the local operationContainmentCache
/// </returns>
private bool TryFindContainerInCreateSection(PostOperation operation, Thing thing, IMetaInfo metaInfo)
private bool TryFindContainerInCreateSection(CdpPostOperation operation, Thing thing, IMetaInfo metaInfo)
{
// get the thing info as cachekey
var thingInfo = thing.GetInfoPlaceholder();
Expand Down Expand Up @@ -683,7 +680,7 @@ private Thing GetPersistedItem(NpgsqlTransaction transaction, string partition,
/// <param name="transaction">
/// The current transaction to the database.
/// </param>
private void ApplyDeleteOperations(PostOperation operation, NpgsqlTransaction transaction)
private void ApplyDeleteOperations(CdpPostOperation operation, NpgsqlTransaction transaction)
{
foreach (var deleteInfo in operation.Delete)
{
Expand Down Expand Up @@ -806,7 +803,7 @@ private void ApplyDeleteOperations(PostOperation operation, NpgsqlTransaction tr
/// <exception cref="InvalidOperationException">
/// If the item already exists
/// </exception>
private void ApplyCreateOperations(PostOperation operation, NpgsqlTransaction transaction)
private void ApplyCreateOperations(CdpPostOperation operation, NpgsqlTransaction transaction)
{
foreach (var createInfo in operation.Create.Select(x => x.GetInfoPlaceholder()))
{
Expand Down Expand Up @@ -857,7 +854,7 @@ private void ApplyCreateOperations(PostOperation operation, NpgsqlTransaction tr
/// <param name="transaction">
/// The current transaction to the database.
/// </param>
private void ApplyUpdateOperations(PostOperation operation, NpgsqlTransaction transaction)
private void ApplyUpdateOperations(CdpPostOperation operation, NpgsqlTransaction transaction)
{
foreach (var updateInfo in operation.Update)
{
Expand Down

0 comments on commit 2d463c2

Please sign in to comment.