C# Класс erminas.SmartAPI.CMS.Session

Session, representing a connection to a Open Text WSM Management Server / RedDot CMS server as a specified user. To open a session you need to use the SessionBuilder.
Наследование: ISession
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
CheckAlreadyLoggedIn string
CheckLoginResponse void
ExtractMessagesWithInnerExceptions string
GetDialogLocales List
GetForceLoginXmlNode System.Xml.XmlElement
GetLocales List
GetLoginResponse System.Xml.XmlDocument
GetServerVersion System.Version
GetUserSessionInfoElement System.Xml.XmlElement
InitConnection void
IsProjectUnavailbaleException bool
LoadSelectedProject void
Login void
LoginToServerManager void
Logout void
ParseLoginResponse void
ParseRQLResult System.Xml.XmlDocument
SendEmail void
SendRQLToServer string
Session System
TryGetSessionInfo bool

Открытые методы

Метод Описание
Dispose ( ) : void

Close session on the server and disconnect

ExecuteRQL ( string query ) : XmlDocument
ExecuteRQL ( string query, RQL format ) : XmlDocument
ExecuteRQLInProjectContext ( string query, System.Guid projectGuid ) : XmlDocument
ExecuteRQLInProjectContextAndEmbeddedInProjectElement ( string query, System.Guid projectGuid ) : XmlDocument
ExecuteRQLRaw ( string query, RQL ioDataFormat ) : string
GetTextContent ( System.Guid projectGuid, ILanguageVariant lang, System.Guid elementGuid, string typeString ) : string

Get the text content of a text element. This method exists, because it needs a different RQL element layout than all other queries.

SelectProject ( System.Guid projectGuid ) : void

Select a project. Subsequent queries will be executed in the context of this project.

SelectProject ( IProject project ) : void

Select a project as active project (RQL queries will be evaluated in the context of this project).

SendMailFromCurrentUserAccount ( EMail mail ) : void
SendMailFromSystemAccount ( EMail mail ) : void
Session ( ServerLogin login, Func sessionReplacementSelector ) : System
Session ( ServerLogin login, System.Guid loginGuid, string sessionKey, System.Guid projectGuid ) : System

Create an session object for an already existing session on the server, e.g. when opening a plugin from within a running session.

SetTextContent ( System.Guid projectGuid, ILanguageVariant languageVariant, System.Guid textElementGuid, string typeString, string content ) : System.Guid

Set the text content of a text element. This method exists, because it needs a different RQL element layout than all other queries.

WaitForAsyncProcess ( System.TimeSpan maxWait, Predicate processPredicate ) : void

Waits for an asynchronous process to finish. This is done by waiting for the process to spawn (or have it available on start) and then waiting for the process to disappear from the process list. The async processes get checked every second, for other retry periods, use instead.

WaitForAsyncProcess ( System.TimeSpan maxWait, System.TimeSpan retry, Predicate processPredicate ) : void

Waits for an asynchronous process to finish. This is done by waiting for the process to spawn (or have it available on start) and then waiting for the process to disappear from the process list.

Приватные методы

Метод Описание
CheckAlreadyLoggedIn ( XmlElement xmlElement ) : string
CheckLoginResponse ( XmlDocument xmlDoc, Func sesssionReplacementSelector ) : void
ExtractMessagesWithInnerExceptions ( Exception e ) : string
GetDialogLocales ( ) : List
GetForceLoginXmlNode ( PasswordAuthentication pa, System.Guid oldLoginGuid ) : XmlElement
GetLocales ( ) : List
GetLoginResponse ( ) : XmlDocument
GetServerVersion ( string baseURL ) : System.Version
GetUserSessionInfoElement ( ) : XmlElement
InitConnection ( ) : void
IsProjectUnavailbaleException ( Exception e ) : bool
LoadSelectedProject ( XmlDocument xmlDoc ) : void
Login ( Func sessionReplacementSelector ) : void
LoginToServerManager ( ) : void
Logout ( System.Guid logonGuid ) : void
ParseLoginResponse ( XmlNodeList xmlNodes, PasswordAuthentication authData, XmlDocument xmlDoc, Func sessionReplacementSelector ) : void
ParseRQLResult ( ISession session, string result ) : XmlDocument
SendEmail ( string fromAddress, EMail mail ) : void
SendRQLToServer ( string rqlQuery, string debugRQLQuery = null ) : string

Send RQL statement to CMS server and return result.

Session ( ) : System
TryGetSessionInfo ( XmlDocument xmlDoc, Func sessionReplacementSelector, RunningSessionInfo &sessionToReplace ) : bool

Описание методов

Dispose() публичный Метод

Close session on the server and disconnect
public Dispose ( ) : void
Результат void

ExecuteRQL() публичный Метод

public ExecuteRQL ( string query ) : XmlDocument
query string
Результат System.Xml.XmlDocument

ExecuteRQL() публичный Метод

public ExecuteRQL ( string query, RQL format ) : XmlDocument
query string
format RQL
Результат System.Xml.XmlDocument

ExecuteRQLInProjectContext() публичный Метод

public ExecuteRQLInProjectContext ( string query, System.Guid projectGuid ) : XmlDocument
query string
projectGuid System.Guid
Результат System.Xml.XmlDocument

ExecuteRQLInProjectContextAndEmbeddedInProjectElement() публичный Метод

public ExecuteRQLInProjectContextAndEmbeddedInProjectElement ( string query, System.Guid projectGuid ) : XmlDocument
query string
projectGuid System.Guid
Результат System.Xml.XmlDocument

ExecuteRQLRaw() публичный Метод

public ExecuteRQLRaw ( string query, RQL ioDataFormat ) : string
query string
ioDataFormat RQL
Результат string

GetTextContent() публичный Метод

Get the text content of a text element. This method exists, because it needs a different RQL element layout than all other queries.
public GetTextContent ( System.Guid projectGuid, ILanguageVariant lang, System.Guid elementGuid, string typeString ) : string
projectGuid System.Guid Guid of the project containing the element
lang ILanguageVariant Language variant to get the text from
elementGuid System.Guid Guid of the text element
typeString string texttype value
Результат string

SelectProject() публичный Метод

Select a project. Subsequent queries will be executed in the context of this project.
public SelectProject ( System.Guid projectGuid ) : void
projectGuid System.Guid Guid of the project to select
Результат void

SelectProject() публичный Метод

Select a project as active project (RQL queries will be evaluated in the context of this project).
Thrown, if the project could not get selected.
public SelectProject ( IProject project ) : void
project IProject Project to select
Результат void

SendMailFromCurrentUserAccount() публичный Метод

public SendMailFromCurrentUserAccount ( EMail mail ) : void
mail erminas.SmartAPI.CMS.ServerManagement.EMail
Результат void

SendMailFromSystemAccount() публичный Метод

public SendMailFromSystemAccount ( EMail mail ) : void
mail erminas.SmartAPI.CMS.ServerManagement.EMail
Результат void

Session() публичный Метод

public Session ( ServerLogin login, Func sessionReplacementSelector ) : System
login erminas.SmartAPI.Utils.ServerLogin
sessionReplacementSelector Func
Результат System

Session() публичный Метод

Create an session object for an already existing session on the server, e.g. when opening a plugin from within a running session.
public Session ( ServerLogin login, System.Guid loginGuid, string sessionKey, System.Guid projectGuid ) : System
login erminas.SmartAPI.Utils.ServerLogin
loginGuid System.Guid
sessionKey string
projectGuid System.Guid
Результат System

SetTextContent() публичный Метод

Set the text content of a text element. This method exists, because it needs a different RQL element layout than all other queries.
public SetTextContent ( System.Guid projectGuid, ILanguageVariant languageVariant, System.Guid textElementGuid, string typeString, string content ) : System.Guid
projectGuid System.Guid Guid of the project containing the element
languageVariant ILanguageVariant Language variant for setting the text in
textElementGuid System.Guid Guid of the text element
typeString string texttype value
content string new value
Результат System.Guid

WaitForAsyncProcess() публичный Метод

Waits for an asynchronous process to finish. This is done by waiting for the process to spawn (or have it available on start) and then waiting for the process to disappear from the process list. The async processes get checked every second, for other retry periods, use instead.
public WaitForAsyncProcess ( System.TimeSpan maxWait, Predicate processPredicate ) : void
maxWait System.TimeSpan Maximum time span to wait for the process to complete
processPredicate Predicate Gets checked for every process in the list to determine the process to wait for (must return true for it and only for it)
Результат void

WaitForAsyncProcess() публичный Метод

Waits for an asynchronous process to finish. This is done by waiting for the process to spawn (or have it available on start) and then waiting for the process to disappear from the process list.
public WaitForAsyncProcess ( System.TimeSpan maxWait, System.TimeSpan retry, Predicate processPredicate ) : void
maxWait System.TimeSpan Maximum time span to wait for the process to complete
retry System.TimeSpan Determines how often the async processes should be checked
processPredicate Predicate Gets checked for every process in the list to determine the process to wait for (must return true for it and only for it)
Результат void