-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from nsip/develop-events
Develop events
- Loading branch information
Showing
104 changed files
with
86,500 additions
and
76 deletions.
There are no files selected for viewing
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
34 changes: 34 additions & 0 deletions
34
Code/Sif3Framework/Sif.Framework/Model/Events/EventAction.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 2017 Systemic Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* 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 System.ComponentModel; | ||
|
||
namespace Sif.Framework.Model.Events | ||
{ | ||
|
||
/// <summary> | ||
/// The action (type of event) associated with SIF Events. | ||
/// </summary> | ||
public enum EventAction { | ||
CREATE, | ||
DELETE, | ||
[Description("UPDATE")] | ||
UPDATE_FULL, | ||
[Description("UPDATE")] | ||
UPDATE_PARTIAL | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
Code/Sif3Framework/Sif.Framework/Model/Events/IEventIterator.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,43 @@ | ||
/* | ||
* Copyright 2017 Systemic Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* 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. | ||
*/ | ||
|
||
namespace Sif.Framework.Model.Events | ||
{ | ||
|
||
/// <summary> | ||
/// Interface to allow Providers to iterate through SIF Events. | ||
/// </summary> | ||
public interface IEventIterator<TMultiple> | ||
{ | ||
|
||
/// <summary> | ||
/// This method returns the next available SIF Event. | ||
/// </summary> | ||
/// <returns>The next available SIF Event. This must return null if there are no further SIF Events available.</returns> | ||
/// <exception cref="Exceptions.EventException">All errors should be wrapped by this exception.</exception> | ||
SifEvent<TMultiple> GetNext(); | ||
|
||
/// <summary> | ||
/// This method will check whether there are more SIF Events available, i.e. a call to GetNext() will not | ||
/// return null. | ||
/// </summary> | ||
/// <returns>True if there are more SIF Events available; False otherwise.</returns> | ||
/// <exception cref="Exceptions.EventException">All errors should be wrapped by this exception.</exception> | ||
bool HasNext(); | ||
|
||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
Code/Sif3Framework/Sif.Framework/Model/Events/IEventPayloadSerialisable.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,36 @@ | ||
/* | ||
* Copyright 2017 Systemic Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* 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. | ||
*/ | ||
|
||
namespace Sif.Framework.Model.Events | ||
{ | ||
|
||
/// <summary> | ||
/// This interface defines serialisation operations for SIF Event payloads. | ||
/// </summary> | ||
/// <typeparam name="TMultiple">Type that defines a SIF Events entity.</typeparam> | ||
public interface IEventPayloadSerialisable<TMultiple> | ||
{ | ||
|
||
/// <summary> | ||
/// Serialise a SIF Events entity. | ||
/// </summary> | ||
/// <param name="obj">Payload of SIF Events.</param> | ||
/// <returns>XML string representation of the SIF Events.</returns> | ||
string SerialiseEvents(TMultiple obj); | ||
|
||
} | ||
|
||
} |
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,45 @@ | ||
/* | ||
* Copyright 2017 Systemic Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* 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 System; | ||
|
||
namespace Sif.Framework.Model.Events | ||
{ | ||
|
||
/// <summary> | ||
/// A wrapper class for associating a SIF Event with SIF data model objects. | ||
/// </summary> | ||
public class SifEvent<TMultiple> | ||
{ | ||
|
||
/// <summary> | ||
/// The action (type of event) associated with the SIF Event. | ||
/// </summary> | ||
public EventAction EventAction { get; set; } | ||
|
||
/// <summary> | ||
/// Unique identifier for the SIF Event. | ||
/// </summary> | ||
public Guid Id { get; set; } | ||
|
||
/// <summary> | ||
/// The SIF data model objects associated with the SIF Event. | ||
/// </summary> | ||
public TMultiple SifObjects { get; set; } | ||
|
||
} | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
Code/Sif3Framework/Sif.Framework/Model/Exceptions/EventException.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,64 @@ | ||
/* | ||
* Copyright 2017 Systemic Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* 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 System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Sif.Framework.Model.Exceptions | ||
{ | ||
|
||
/// <summary> | ||
/// This exception represents an error from the processing of SIF Events. | ||
/// </summary> | ||
[Serializable] | ||
public class EventException : BaseException | ||
{ | ||
|
||
/// <summary> | ||
/// <see cref="BaseException(string)"/> | ||
/// </summary> | ||
public EventException() | ||
: base("Error occurred processing SIF Events.") | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// <see cref="BaseException(string)"/> | ||
/// </summary> | ||
public EventException(string message) | ||
: base(message) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// <see cref="BaseException(string, Exception)"/> | ||
/// </summary> | ||
public EventException(string message, Exception innerException) | ||
: base(message, innerException) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// <see cref="BaseException(SerializationInfo, StreamingContext)"/> | ||
/// </summary> | ||
protected EventException(SerializationInfo info, StreamingContext context) | ||
: base(info, context) | ||
{ | ||
} | ||
|
||
} | ||
|
||
} |
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
Oops, something went wrong.