C# Class 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.
Inheritance: ISession
Afficher le fichier Open project: erminas/smartapi

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

Dispose() public méthode

Close session on the server and disconnect
public Dispose ( ) : void
Résultat void

ExecuteRQL() public méthode

public ExecuteRQL ( string query ) : XmlDocument
query string
Résultat System.Xml.XmlDocument

ExecuteRQL() public méthode

public ExecuteRQL ( string query, RQL format ) : XmlDocument
query string
format RQL
Résultat System.Xml.XmlDocument

ExecuteRQLInProjectContext() public méthode

public ExecuteRQLInProjectContext ( string query, System.Guid projectGuid ) : XmlDocument
query string
projectGuid System.Guid
Résultat System.Xml.XmlDocument

ExecuteRQLInProjectContextAndEmbeddedInProjectElement() public méthode

public ExecuteRQLInProjectContextAndEmbeddedInProjectElement ( string query, System.Guid projectGuid ) : XmlDocument
query string
projectGuid System.Guid
Résultat System.Xml.XmlDocument

ExecuteRQLRaw() public méthode

public ExecuteRQLRaw ( string query, RQL ioDataFormat ) : string
query string
ioDataFormat RQL
Résultat string

GetTextContent() public méthode

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
Résultat string

SelectProject() public méthode

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
Résultat void

SelectProject() public méthode

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
Résultat void

SendMailFromCurrentUserAccount() public méthode

public SendMailFromCurrentUserAccount ( EMail mail ) : void
mail erminas.SmartAPI.CMS.ServerManagement.EMail
Résultat void

SendMailFromSystemAccount() public méthode

public SendMailFromSystemAccount ( EMail mail ) : void
mail erminas.SmartAPI.CMS.ServerManagement.EMail
Résultat void

Session() public méthode

public Session ( ServerLogin login, Func sessionReplacementSelector ) : System
login erminas.SmartAPI.Utils.ServerLogin
sessionReplacementSelector Func
Résultat System

Session() public méthode

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
Résultat System

SetTextContent() public méthode

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
Résultat System.Guid

WaitForAsyncProcess() public méthode

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)
Résultat void

WaitForAsyncProcess() public méthode

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)
Résultat void