Interface IViewCollection
Defines an interface for the View Collection.
Namespace: STAIExtensions.Abstractions.Collections
Assembly: STAIExtensions.Abstractions.dll
Syntax
public interface IViewCollection
Properties
DefaultSlidingExpiryTimeSpan
Gets or sets the sliding expiration timespan on the View that will be added on each View Retrieval GetView(String, String) The view is initialised with from the value passed in the options.
Declaration
TimeSpan? DefaultSlidingExpiryTimeSpan { get; }
Property Value
Type | Description |
---|---|
System.Nullable<TimeSpan> |
MaximumViews
Gets a value from the options indicating the total number of allowed views that can be created globally
Declaration
int? MaximumViews { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
UseStrictViews
Gets a value from the options indicating if the owner Id of a view can be blank or empty. This will allow for shared views between users but might have some complications when shared parameters are set.
Declaration
bool UseStrictViews { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ViewCount
Gets the current number of active views in the collection
Declaration
int ViewCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ViewsExpire
Gets a value from the options indicating if Views should expire after a period. The expiration of a view is reset each time the GetView GetView(String, String) is called.
Declaration
bool ViewsExpire { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateView(String, String)
Creates a new user instance view of the specified type
Declaration
IDataSetView CreateView(string viewTypeName, string ownerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewTypeName | The type of of the view to create an instance of |
System.String | ownerId | The optional user/owner Id of this view |
Returns
Type | Description |
---|---|
IDataSetView |
GetExpiredViews()
Gets a list of views that has expired and needs to be removed from the collection
Declaration
IEnumerable<IDataSetView> GetExpiredViews()
Returns
Type | Description |
---|---|
IEnumerable<IDataSetView> |
GetMyViews(String)
Gets a list of views from the internal collection by Owner id
Declaration
IEnumerable<MyViewInformation> GetMyViews(string ownerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | ownerId | The owner Id to find the views for |
Returns
Type | Description |
---|---|
IEnumerable<STAIExtensions.Abstractions.Common.MyViewInformation> |
GetView(String, String)
Retrieves an active view in it's current state. This method will reset the expiration date and will have to be called within the time frame specified to keep the view alive.
Declaration
IDataSetView GetView(string id, string ownerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique Id of the View |
System.String | ownerId | The optional owner identifier that created the view |
Returns
Type | Description |
---|---|
IDataSetView |
GetViewForUpdate(String)
Internal method that will retrieve a view without the Owner id specified. This should only be used to retrieve a view from the collection for update logic
Declaration
IDataSetView GetViewForUpdate(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Returns
Type | Description |
---|---|
IDataSetView |
RemoveView(IDataSetView)
Removes a view from the collection
Declaration
void RemoveView(IDataSetView expiredView)
Parameters
Type | Name | Description |
---|---|---|
IDataSetView | expiredView | The view to remove |
RemoveView(String)
Removes a view from the collection
Declaration
void RemoveView(string viewId)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewId | The unique view Id to remove |
SetViewParameters(String, String, Nullable<Dictionary<String, Object>>)
Sets the View Parameters.
Declaration
void SetViewParameters(string viewId, string ownerId, Dictionary<string, object>? requestViewParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewId | The unique View Id to set the parameters on |
System.String | ownerId | The owner of the view |
System.Nullable<Dictionary<System.String, System.Object>> | requestViewParameters | The parameter values to set on the view |
Events
OnDataSetViewUpdated
Event that is fired when a DataSetView object is updated
Declaration
event IViewCollection.OnDataSetViewUpdatedHandler OnDataSetViewUpdated
Event Type
Type | Description |
---|---|
IViewCollection.OnDataSetViewUpdatedHandler |