IScriptSession

Overview

The IScriptSession interface represents Session object provided to the Business Rules Scripting engine.

Using the IScriptSession interface instead of the ISession interface allows to loose coupling between the Remoting SDK infrastructure and the Business Rules Scripting engine. Furthermore in the most advanced usecases server application could provide its own IScriptSession implementation instead of the general Remoting SDK Session. For example Relativity Server uses this approach to provide own Session implementation to the Business Rules Scripting engine, where more advanced access permissions checks are implemented.

The default implementation of the IScriptSession interface is the ScriptContext class.

Location


 

AddRole

 

method AddRole(role: String)

 

void AddRole(String role)

 

Sub AddRole(role As String)

Parameters:

  • role:

Available

 

property Available: Boolean read;

 

Boolean Available { get; }

 

ReadOnly Property Available() As Boolean

Expired

Gets a flag indicating whether the session has expired or not.

 

property Expired: Boolean read;

 

Boolean Expired { get; }

 

ReadOnly Property Expired() As Boolean

HasRole

 

method HasRole(role: String): Boolean

 

Boolean HasRole(String role)

 

Function HasRole(role As String) As Boolean

Parameters:

  • role:

ID

Gets the ID of the current session.

 

property ID: String read;

 

String ID { get; }

 

ReadOnly Property ID() As String

Item

Gets or sets the value stored in the Session with key aKey.

 

property Item[name: String]: Object read write;

 

Object Item[String name] { get; set; }

 

Property Item(name As String) As Object

Names

Gets collection of Session keys.

 

property Names: ReadOnlyCollection<String> read;

 

ReadOnlyCollection<String> Names { get; }

 

ReadOnly Property Names() As ReadOnlyCollection<String>

New

Gets a flag indicating whether the session is new or not.

 

property New: Boolean read;

 

Boolean New { get; }

 

ReadOnly Property New() As Boolean

RemoveRole

 

method RemoveRole(role: String)

 

void RemoveRole(String role)

 

Sub RemoveRole(role As String)

Parameters:

  • role:

Roles

Gets or sets the collection of Session Roles.

 

property Roles: array of String read write;

 

String[] Roles { get; set; }

 

Property Roles() As String()

Timeout

Gets the timeout (in seconds) since the last access, that can elapse before the session will be expired.

 

property Timeout: Int32 read;

 

Int32 Timeout { get; }

 

ReadOnly Property Timeout() As Int32

 

Available

 

property Available: Boolean read;

 

Boolean Available { get; }

 

ReadOnly Property Available() As Boolean

Expired

Gets a flag indicating whether the session has expired or not.

 

property Expired: Boolean read;

 

Boolean Expired { get; }

 

ReadOnly Property Expired() As Boolean

ID

Gets the ID of the current session.

 

property ID: String read;

 

String ID { get; }

 

ReadOnly Property ID() As String

Item

Gets or sets the value stored in the Session with key aKey.

 

property Item[name: String]: Object read write;

 

Object Item[String name] { get; set; }

 

Property Item(name As String) As Object

Names

Gets collection of Session keys.

 

property Names: ReadOnlyCollection<String> read;

 

ReadOnlyCollection<String> Names { get; }

 

ReadOnly Property Names() As ReadOnlyCollection<String>

New

Gets a flag indicating whether the session is new or not.

 

property New: Boolean read;

 

Boolean New { get; }

 

ReadOnly Property New() As Boolean

Roles

Gets or sets the collection of Session Roles.

 

property Roles: array of String read write;

 

String[] Roles { get; set; }

 

Property Roles() As String()

Timeout

Gets the timeout (in seconds) since the last access, that can elapse before the session will be expired.

 

property Timeout: Int32 read;

 

Int32 Timeout { get; }

 

ReadOnly Property Timeout() As Int32

 

AddRole

 

method AddRole(role: String)

 

void AddRole(String role)

 

Sub AddRole(role As String)

Parameters:

  • role:

HasRole

 

method HasRole(role: String): Boolean

 

Boolean HasRole(String role)

 

Function HasRole(role As String) As Boolean

Parameters:

  • role:

RemoveRole

 

method RemoveRole(role: String)

 

void RemoveRole(String role)

 

Sub RemoveRole(role As String)

Parameters:

  • role: