File

src/core/smart-message/smart-message.service.ts

Description

A service used for fetching messages strings from the SmartComponent Library Backend.

Index

Methods

Constructor

constructor(http: SmartHttpService, serviceAdapter: SmartServiceAdapter, dialogService: DialogService, logger: SmartLoggerService)
Parameters :
Name Type Optional
http SmartHttpService No
serviceAdapter SmartServiceAdapter No
dialogService DialogService No
logger SmartLoggerService No

Methods

Public displayMessage
displayMessage(message: string | SimpleMessageObject, severity?: string)

Displays a message to the user

Parameters :
Name Type Optional Description
message string | SimpleMessageObject No
  • The message to display
severity string Yes
  • The severity level (optional if message is a SimpleMessageObject)
Returns : DialogRef
Public Async getCCSMessage
getCCSMessage(message: CCSMessage | CCSMessage[])

Returns a formatted message from a CCSMessage object

Parameters :
Name Type Optional
message CCSMessage | CCSMessage[] No
Public Async getFormattedMessage
getFormattedMessage(message: unknown)

Returns formatted message info

Parameters :
Name Type Optional
message unknown No
Public getMessage
getMessage(messageGroup: string, messageNumber: number)

Retrieves a message based on the message group and number.

Parameters :
Name Type Optional Description
messageGroup string No
  • The group identifier of the message.
messageNumber number No
  • The numeric identifier of the message.

An observable containing the message data.

Public Async getMessageFromOtherFormat
getMessageFromOtherFormat(message: string)

Processes messages in other formats and returns a formatted result

Parameters :
Name Type Optional Description
message string No
  • The message to process

The processed message result

Public Async getMessageWithSubstitution
getMessageWithSubstitution(messageTemplate: SmartMessageTemplate)

Returns message with substitution

Parameters :
Name Type Optional
messageTemplate SmartMessageTemplate No
Public getSmartMessageInstance
getSmartMessageInstance(template: SmartMessageTemplate)

Creates a SmartMessage instance from the provided SmartMessageTemplate.

Parameters :
Name Type Optional Description
template SmartMessageTemplate No
  • The template data to create the SmartMessage.
Returns : SmartMessage

The created SmartMessage instance.

Public isCCS
isCCS(message: unknown)

Checks if a message is a CCS message

Parameters :
Name Type Optional Description
message unknown No
  • The message to check
Returns : boolean

Whether the message is a CCS message

results matching ""

    No results matching ""