Micro Focus Content Manager SDK 9.3
HP.HPTRIM.SDK.TrimApplication Class Reference

ApiTrimApplication More...

Inheritance diagram for HP.HPTRIM.SDK.TrimApplication:
HP.HPTRIM.SDK.TrimApplicationBase

Public Member Functions

 TrimApplication ()
 

Static Public Member Functions

static void setAsService ()
 Notifies the SDK that this application is running as a Windows service. Can only be called once in your application. More...
 
static void SetAsWebService (string webServiceWorkPath)
 Notifies the SDK that this application is running as a Web Service. Can only be called once in your application. To run as a web service, you must specify a path for storing temporary per-user work files. If the path parameter is left blank or NULL, TRIM will consult the local machine registry to see if a web service path has been defined there. More...
 
static string GetHelpFileNameForLanguage (Language forLanguage)
 Gets the name of the TRIM help file for the nominated language More...
 
static string GetMessageImpl (Database db, int msgId, StringArray substPercentStrings)
 
static string ProcessMessage (string msg)
 Processes the specified string, replacing any special TRIM substitution string (e.g. B_record%, E_tt_Favorites%, etc) More...
 
static string ProcessMessage (Database db, string msg)
 Processes the specified string, replacing any special TRIM substitution string (e.g. B_record%, E_tt_Favorites%, etc). The supplied database parameter allows any local customized captions to be used instead of standard TRIM captions. More...
 
static bool IsLanguageSupported (short LanguageId)
 Indicates if the current installation of Content Manager has a localization available for the nominated language More...
 
static bool SetDefaultLanguage (short LanguageId)
 Sets the current thread default language to be used for subsequent calls to GetMessage and any other functions that are language specific. Note that this default will not be used if a connected Database object is provided. The function returns false if the specified language is not supported. The language is specified using the standard Windows Language Identifier. More...
 
static bool IsLanguageSupported (Language language)
 Indicates if the current installation of Content Manager has a localization available for the nominated language More...
 
static bool SetDefaultLanguage (Language language)
 Sets the current thread default language to be used for subsequent calls to GetMessage and any other functions that are language specific. Note that this default will not be used if a connected Database object is provided. The function returns false if the specified language is not supported. The language is specified using using the TRIM enumeration for currently supported TRIM languages. More...
 
static StringArray GetDatabaseIds (string servedByWorkgroup, int onPortNumber)
 Gets a list of database ids that are supported by a particular workgroup server. Note that the returned set of database ids are not authenticated, it is possible that the current user may not have access to some or all of them. More...
 
static StringArray GetTimeZones ()
 Gets the list of windows time zone display strings. More...
 
static string MIMETypeToFileType (string mimeTypeString)
 Converts a MIME type to a Windows File Type extension string, according to the list of known file types used by Content Manager. More...
 
- Static Public Member Functions inherited from HP.HPTRIM.SDK.TrimApplicationBase
static void Initialize ()
 Initializes the SDK, by explicitly loading native binaries. Once Initialize() returns successfully, subsequent calls to Initialize() have no effect. If Initialize() is not called by the application, it will be called implicitly by the SDK, when the first native-backed SDK method is called. More...
 
static void EnableSdkLeakTracking (bool enable)
 Enables or disables SDK leak tracking. If leak tracking is enabled, stack traces are collected upon the creation of each Database. If the leak tracker subsequently detects that one of these objects is being disposed by the garbage collector, rather than through explicit disposal, an error will be logged to the Windows Application event log. Such an error will only be logged once. More...
 
static int GetSdkLeakCount ()
 Gets the current number of SDK leaks. Requires SDK leak tracking to be enabled. More...
 
static List< string > GetSdkLeakStackTraces ()
 Gets the current list of SDK leaks. Requires SDK leak tracking to be enabled. More...
 
static int GetSdkObjectCount ()
 Gets the current number of SDK objects that have not yet been disposed. More...
 
static long ToErrorCode (MessageIds msgId)
 Converts the error message enumeration value to an ErrorCode that is used by the TRIMSDK TrimException class. More...
 
static string GetMessage (MessageIds msgId)
 Retrieves a message with the specified message id from the TRIM Messages database. More...
 
static string GetMessage (MessageIds msgId, string substPercent1)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message. More...
 
static string GetMessage (MessageIds msgId, string substPercent1, string substPercent2)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message. More...
 
static string GetMessage (MessageIds msgId, string[] substPercentStrings)
 Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported. More...
 
static string GetMessage (Database db, MessageIds msgId)
 Retrieves a message with the specified message id from the TRIM Messages database. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string substPercent1)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string substPercent1, string substPercent2)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string[] substPercentStrings)
 Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 

Protected Attributes

bool swigCMemOwn
 

Properties

static Environments RuntimeEnvironment [get, set]
 Gets or sets an Environments enum value indicating the type of runtime environment the SDK application is running in. Certain areas of TRIM functionality may be disabled depending on what is appropriate for the runtime environment specified. More...
 
static int SDKVersion [get]
 Gets an integer containing the version number of the HP.HPTRIM.SDK.dll that is currently installed. More...
 
static string SoftwareVersion [get]
 Gets a string containing the Content Manager version number and build number that is currently installed. More...
 
static string WebServerWorkPath [get]
 Gets a string value representing the working folder currently being used by a WebService application. More...
 
static ServiceTypes ServiceType [get]
 Gets a ServiceTypes enum value indicating that the Application is running as a particular type of service. More...
 
static string BinaryPath [get]
 Returns the name of the Windows folder where the Content Manager software is installed More...
 
static string TemporaryPath [get]
 Returns a string containing the name of a Windows folder that is a good place to create temporary files More...
 
static string HelpFileName [get]
 Gets the name of the TRIM help file, based on the current language being used More...
 
static bool HasUserInterface [get, set]
 Returns a boolean value indicating if the running application has access to a user interface. More...
 
- Properties inherited from HP.HPTRIM.SDK.TrimApplicationBase
static string TrimBinariesLoadPath [get, set]
 Set TrimBinariesLoadPath, to force the SDK to load native binaries from a particular path. This will override the searching logic that the SDK would otherwise apply. More...
 
static bool HasBeenInitialized [get]
 

Detailed Description

ApiTrimApplication

Constructor & Destructor Documentation

HP.HPTRIM.SDK.TrimApplication.TrimApplication ( )

Member Function Documentation

static StringArray HP.HPTRIM.SDK.TrimApplication.GetDatabaseIds ( string  servedByWorkgroup,
int  onPortNumber 
)
static

Gets a list of database ids that are supported by a particular workgroup server. Note that the returned set of database ids are not authenticated, it is possible that the current user may not have access to some or all of them.

static string HP.HPTRIM.SDK.TrimApplication.GetHelpFileNameForLanguage ( Language  forLanguage)
static

Gets the name of the TRIM help file for the nominated language

static string HP.HPTRIM.SDK.TrimApplication.GetMessageImpl ( Database  db,
int  msgId,
StringArray  substPercentStrings 
)
static
static StringArray HP.HPTRIM.SDK.TrimApplication.GetTimeZones ( )
static

Gets the list of windows time zone display strings.

static bool HP.HPTRIM.SDK.TrimApplication.IsLanguageSupported ( short  LanguageId)
static

Indicates if the current installation of Content Manager has a localization available for the nominated language

static bool HP.HPTRIM.SDK.TrimApplication.IsLanguageSupported ( Language  language)
static

Indicates if the current installation of Content Manager has a localization available for the nominated language

static string HP.HPTRIM.SDK.TrimApplication.MIMETypeToFileType ( string  mimeTypeString)
static

Converts a MIME type to a Windows File Type extension string, according to the list of known file types used by Content Manager.

static string HP.HPTRIM.SDK.TrimApplication.ProcessMessage ( string  msg)
static

Processes the specified string, replacing any special TRIM substitution string (e.g. B_record%, E_tt_Favorites%, etc)

static string HP.HPTRIM.SDK.TrimApplication.ProcessMessage ( Database  db,
string  msg 
)
static

Processes the specified string, replacing any special TRIM substitution string (e.g. B_record%, E_tt_Favorites%, etc). The supplied database parameter allows any local customized captions to be used instead of standard TRIM captions.

static void HP.HPTRIM.SDK.TrimApplication.setAsService ( )
static

Notifies the SDK that this application is running as a Windows service. Can only be called once in your application.

static void HP.HPTRIM.SDK.TrimApplication.SetAsWebService ( string  webServiceWorkPath)
static

Notifies the SDK that this application is running as a Web Service. Can only be called once in your application. To run as a web service, you must specify a path for storing temporary per-user work files. If the path parameter is left blank or NULL, TRIM will consult the local machine registry to see if a web service path has been defined there.

static bool HP.HPTRIM.SDK.TrimApplication.SetDefaultLanguage ( short  LanguageId)
static

Sets the current thread default language to be used for subsequent calls to GetMessage and any other functions that are language specific. Note that this default will not be used if a connected Database object is provided. The function returns false if the specified language is not supported. The language is specified using the standard Windows Language Identifier.

static bool HP.HPTRIM.SDK.TrimApplication.SetDefaultLanguage ( Language  language)
static

Sets the current thread default language to be used for subsequent calls to GetMessage and any other functions that are language specific. Note that this default will not be used if a connected Database object is provided. The function returns false if the specified language is not supported. The language is specified using using the TRIM enumeration for currently supported TRIM languages.

Member Data Documentation

bool HP.HPTRIM.SDK.TrimApplication.swigCMemOwn
protected

Property Documentation

string HP.HPTRIM.SDK.TrimApplication.BinaryPath
staticget

Returns the name of the Windows folder where the Content Manager software is installed

bool HP.HPTRIM.SDK.TrimApplication.HasUserInterface
staticgetset

Returns a boolean value indicating if the running application has access to a user interface.

string HP.HPTRIM.SDK.TrimApplication.HelpFileName
staticget

Gets the name of the TRIM help file, based on the current language being used

Environments HP.HPTRIM.SDK.TrimApplication.RuntimeEnvironment
staticgetset

Gets or sets an Environments enum value indicating the type of runtime environment the SDK application is running in. Certain areas of TRIM functionality may be disabled depending on what is appropriate for the runtime environment specified.

int HP.HPTRIM.SDK.TrimApplication.SDKVersion
staticget

Gets an integer containing the version number of the HP.HPTRIM.SDK.dll that is currently installed.

ServiceTypes HP.HPTRIM.SDK.TrimApplication.ServiceType
staticget

Gets a ServiceTypes enum value indicating that the Application is running as a particular type of service.

string HP.HPTRIM.SDK.TrimApplication.SoftwareVersion
staticget

Gets a string containing the Content Manager version number and build number that is currently installed.

string HP.HPTRIM.SDK.TrimApplication.TemporaryPath
staticget

Returns a string containing the name of a Windows folder that is a good place to create temporary files

string HP.HPTRIM.SDK.TrimApplication.WebServerWorkPath
staticget

Gets a string value representing the working folder currently being used by a WebService application.