Skip to content

Commit

Permalink
- Moved OAPPType enum from STAR ODK to OASIS.API.Core.
Browse files Browse the repository at this point in the history
- Moved ICoronalEjection interface from STAR ODK to OASIS.API.Core.

- Moved IOAPPDNA from OASIS.API.ONODE.Core to OASIS.API.Core.

- Moved CoronalEjection interface from STAR ODK to OASIS.API.Core.

- Upgraded all methods in main STAR class in STAR ODK and STAR CLI.Lib to now allow providerType to be passed in.

- Added OAPPDesc to all Light and LightAsync methods and removed reundant overloads in STAR in STAR ODK.

- Re-wrote some of LightAsync method so now conforms to OASIS best standards (has better error handling/logging etc) and now calls the new CreateOAPPAsync method on the new OAPPManager/OAPP API so new OAPPs generated are now logged in the STARNET lib.

- Added SeedAsync, Seed, UnSeedAsync & UnSeed methods to STAR in STAR ODK, which call the new PublishOAPPAsync and UnPublishOAPPAsync methods on the new OAPPManager/OAPP API.

- Updated ReadyPlayerOne method in STAR CLI Lib for light command so works with the new OAPPDesc field.

- Added a new unseed command to ReadyPlayerOne method and ShowCommands method in STAR CLI.

- Updated LightWizard in STAR.CLI.Lib to work with the new OAPPDesc.
  • Loading branch information
dellams committed Sep 13, 2024
1 parent 772984d commit becfc77
Show file tree
Hide file tree
Showing 21 changed files with 322 additions and 228 deletions.
23 changes: 23 additions & 0 deletions NextGenSoftware.OASIS.API.Core/Enums/OAPPType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@


namespace NextGenSoftware.OASIS.API.Core.Enums
{
public enum OAPPType
{
//CelestialBodies,
GeneratedCodeOnly,
Console,
Blazor,
WebMVC,
MAUI,
Unity,
WinForms,
WPF,
WindowsService,
RESTService,
gRPCService,
GraphQLService,
//ClassLibrary,
Custom
}
}
27 changes: 27 additions & 0 deletions NextGenSoftware.OASIS.API.Core/Interfaces/IOAPPDNA.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;

namespace NextGenSoftware.OASIS.API.Core.Interfaces
{
public interface IOAPPDNA
{
ICelestialBody CelestialBody { get; set; } //optional
Guid CelestialBodyId { get; set; }
string CelestialBodyName { get; set; }
HolonType CelestialBodyType { get; set; }
IEnumerable<IZome> Zomes { get; set; }
Guid CreatedByAvatarId { get; set; }
DateTime CreatedOn { get; set; }
string Description { get; set; }
GenesisType GenesisType { get; set; }
Guid OAPPId { get; set; }
string OAPPName { get; set; }
OAPPType OAPPType { get; set; }
Guid PublishedByAvatarId { get; set; }
DateTime PublishedOn { get; set; }
bool PublishedOnSTARNET { get; set; }
string Version { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using NextGenSoftware.OASIS.Common;
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Events;
using NextGenSoftware.OASIS.API.Core.Objects;

namespace NextGenSoftware.OASIS.API.Core.Interfaces.STAR
{
Expand Down Expand Up @@ -48,7 +47,7 @@ public interface ICelestialBody : ICelestialHolon
void Dim();
void Emit();
void Evolve();
CoronalEjection Flare();
ICoronalEjection Flare();
List<IHolon> GetHolonsThatBelongToZome(IZome zome);
IZome GetZomeById(Guid id);
IZome GetZomeByName(string name);
Expand All @@ -65,8 +64,8 @@ public interface ICelestialBody : ICelestialHolon
void Mutate();
void Radiate();
void Reflect();
OASISResult<API.Core.Interfaces.STAR.ICelestialBody> Save(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
Task<OASISResult<API.Core.Interfaces.STAR.ICelestialBody>> SaveAsync(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
OASISResult<ICelestialBody> Save(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
Task<OASISResult<ICelestialBody>> SaveAsync(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
OASISResult<IEnumerable<IZome>> SaveZomes(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
Task<OASISResult<IEnumerable<IZome>>> SaveZomesAsync(bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default);
void Seed();
Expand Down
12 changes: 12 additions & 0 deletions NextGenSoftware.OASIS.API.Core/Interfaces/STAR/ICoronalEjection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections.Generic;

namespace NextGenSoftware.OASIS.API.Core.Interfaces.STAR
{
public interface ICoronalEjection
{
ICelestialBody CelestialBody { get; set; }
ICelestialSpace CelestialSpace { get; set; }
IOAPPDNA OAPPDNA { get; set; }
IEnumerable<IZome> Zomes { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

<ItemGroup>
<Folder Include="Interfaces\STAR\CelestialHolons\" />
<Folder Include="Objects\Star" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

using System.Collections.Generic;
using NextGenSoftware.OASIS.API.Core.Interfaces;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using System.Collections.Generic;

namespace NextGenSoftware.OASIS.API.Core.Objects
{
public class CoronalEjection
public class CoronalEjection : ICoronalEjection
{
//public string Message { get; set; }
//public bool ErrorOccured { get; set; }
public List<IZome> Zomes { get; set; } //Will only be set if GenesisType is ZomesAndHolonsOnly.
public IEnumerable<IZome> Zomes { get; set; } //Will only be set if GenesisType is ZomesAndHolonsOnly.
public ICelestialBody CelestialBody { get; set; } //Will be null if GenesisType is ZomesAndHolonsOnly.
public ICelestialSpace CelestialSpace { get; set; } //Will be null if GenesisType is ZomesAndHolonsOnly.
public IOAPPDNA OAPPDNA { get; set; }
}
}
}
42 changes: 21 additions & 21 deletions NextGenSoftware.OASIS.API.ONODE.Core/Enums/OAPPType.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@


namespace NextGenSoftware.OASIS.API.ONode.Core.Enums
{
public enum OAPPType
{
//CelestialBodies,
GeneratedCodeOnly,
Console,
Blazor,
WebMVC,
MAUI,
Unity,
WinForms,
WPF,
WindowsService,
RESTService,
gRPCService,
GraphQLService,
//ClassLibrary,
Custom
}
}
//namespace NextGenSoftware.OASIS.API.ONode.Core.Enums
//{
// public enum OAPPType
// {
// //CelestialBodies,
// GeneratedCodeOnly,
// Console,
// Blazor,
// WebMVC,
// MAUI,
// Unity,
// WinForms,
// WPF,
// WindowsService,
// RESTService,
// gRPCService,
// GraphQLService,
// //ClassLibrary,
// Custom
// }
//}
3 changes: 1 addition & 2 deletions NextGenSoftware.OASIS.API.ONODE.Core/Holons/InstalledOAPP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.CustomAttrbiutes;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Holons;
using System;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects;
using NextGenSoftware.OASIS.API.Core.Interfaces;

namespace NextGenSoftware.OASIS.API.ONode.Core.Holons
{
Expand Down
1 change: 0 additions & 1 deletion NextGenSoftware.OASIS.API.ONODE.Core/Holons/OAPP.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using NextGenSoftware.OASIS.API.Core.Holons;
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.ONode.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Holons;
using NextGenSoftware.OASIS.API.Core.CustomAttrbiutes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Interfaces;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using NextGenSoftware.OASIS.API.ONode.Core.Enums;

namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Holons
{
Expand Down
56 changes: 27 additions & 29 deletions NextGenSoftware.OASIS.API.ONODE.Core/Interfaces/Objects/IOAPPDNA.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
using System;
using System.Collections;
using System.Collections.Generic;
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using NextGenSoftware.OASIS.API.ONode.Core.Enums;
using NextGenSoftware.OASIS.STAR.CelestialBodies;
//using System;
//using System.Collections.Generic;
//using NextGenSoftware.OASIS.API.Core.Enums;
//using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
//using NextGenSoftware.OASIS.API.ONode.Core.Enums;

namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects
{
public interface IOAPPDNA
{
ICelestialBody CelestialBody { get; set; } //optional
Guid CelestialBodyId { get; set; }
string CelestialBodyName { get; set; }
HolonType CelestialBodyType { get; set; }
IEnumerable<IZome> Zomes { get; set; }
Guid CreatedByAvatarId { get; set; }
DateTime CreatedOn { get; set; }
string Description { get; set; }
GenesisType GenesisType { get; set; }
Guid OAPPId { get; set; }
string OAPPName { get; set; }
OAPPType OAPPType { get; set; }
Guid PublishedByAvatarId { get; set; }
DateTime PublishedOn { get; set; }
bool PublishedOnSTARNET { get; set; }
string Version { get; set; }
}
}
//namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects
//{
// public interface IOAPPDNA
// {
// ICelestialBody CelestialBody { get; set; } //optional
// Guid CelestialBodyId { get; set; }
// string CelestialBodyName { get; set; }
// HolonType CelestialBodyType { get; set; }
// IEnumerable<IZome> Zomes { get; set; }
// Guid CreatedByAvatarId { get; set; }
// DateTime CreatedOn { get; set; }
// string Description { get; set; }
// GenesisType GenesisType { get; set; }
// Guid OAPPId { get; set; }
// string OAPPName { get; set; }
// OAPPType OAPPType { get; set; }
// Guid PublishedByAvatarId { get; set; }
// DateTime PublishedOn { get; set; }
// bool PublishedOnSTARNET { get; set; }
// string Version { get; set; }
// }
//}
4 changes: 1 addition & 3 deletions NextGenSoftware.OASIS.API.ONODE.Core/Managers/OAPPManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
using NextGenSoftware.OASIS.API.Core.Helpers;
using NextGenSoftware.OASIS.API.Core.Interfaces;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using NextGenSoftware.OASIS.API.ONode.Core.Enums;
using NextGenSoftware.OASIS.API.ONode.Core.Holons;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Holons;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects;

namespace NextGenSoftware.OASIS.API.ONode.Core.Managers
{
Expand Down Expand Up @@ -260,7 +258,7 @@ public async Task<OASISResult<IOAPPDNA>> CreateOAPPAsync(string OAPPName, string
return result;
}

public OASISResult<IOAPPDNA> CreateOAPP(string OAPPName, string OAPPDescription, OAPPType OAPPType, GenesisType genesisType, Guid avatarId, ICelestialBody celestialBody = null, , IEnumerable<IZome> zomes = null, ProviderType providerType = ProviderType.Default)
public OASISResult<IOAPPDNA> CreateOAPP(string OAPPName, string OAPPDescription, OAPPType OAPPType, GenesisType genesisType, Guid avatarId, ICelestialBody celestialBody = null, IEnumerable<IZome> zomes = null, ProviderType providerType = ProviderType.Default)
{
OASISResult<IOAPPDNA> result = new OASISResult<IOAPPDNA>();
string errorMessage = "Error occured in OAPPManager.CreateOAPP, Reason:";
Expand Down
3 changes: 1 addition & 2 deletions NextGenSoftware.OASIS.API.ONODE.Core/Objects/OAPPDNA.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using NextGenSoftware.OASIS.API.Core.Enums;
using NextGenSoftware.OASIS.API.Core.Interfaces;
using NextGenSoftware.OASIS.API.Core.Interfaces.STAR;
using NextGenSoftware.OASIS.API.ONode.Core.Enums;
using NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects;

namespace NextGenSoftware.OASIS.API.ONode.Core.Holons
{
Expand Down
Loading

0 comments on commit becfc77

Please sign in to comment.