← Back to plugin index

Database Maintenance Message Persister

Description

Database interface for persisting maintenance messages.

The database model is based on two database tables: the first stores message details such as validity period, system availability, etc and the second stores the translations associated to the messages.

Type name
DatabaseMaintenanceMessagePersister
Class
com.airlock.iam.core.application.configuration.maintenance.message.DatabaseMaintenanceMessagePersisterConfig
May be used by
Properties
SQL Data Source (sqlDataSource)
Description
Defines how connections to the database are obtained.
Attributes
Plugin-Link
Mandatory
Assignable plugins
Cache Timeout [seconds] (cacheTimeout)
Description
Specifies the number of seconds for which fetched maintenance messages are cached, before the underlying database layer is queried again. Consequently, a valid new maintenance message may not be displayed until the cache expires. Setting this property to 0 (zero) or omitting this property results in a direct call to the underlying database layer every time the provider is asked for a maintenance message.
Attributes
Long
Optional
Default value
0
Message Table (messageTable)
Description
The name of the database table containing the maintenance messages.
Attributes
String
Mandatory
Suggested values
medusa_maint_msg
Message Col Name (messageColName)
Description
The name of the column holding the message name.
Attributes
String
Mandatory
Suggested values
name
Message Col System Available (messageColSystemAvailable)
Description
The name of the column that indicates if the system is available for this message.
Attributes
String
Mandatory
Suggested values
system_available
Message Col Active (messageColActive)
Description
The name of the column that indicates if the message is active.
Attributes
String
Mandatory
Suggested values
active
Message Col Valid From (messageColValidFrom)
Description
The name of the column that stores the message's valid-from date.
Attributes
String
Mandatory
Suggested values
valid_from
Message Col Valid To (messageColValidTo)
Description
The name of the column that stores the message's valid-to date.
Attributes
String
Mandatory
Suggested values
valid_to
Message Col Location (messageColLocation)
Description
The name of the column that stores the message's location identifier. A message may have a location or not. Messages with different locations are independent of each other.
Attributes
String
Optional
Suggested values
location
Message Col Version Id (messageColVersionId)
Description
Name of a database column containing a numerical version id that is automatically incremented by one when a record is changed. Such a technical column is used by some applications or libraries (such as Hibernate) to implement optimistic locking.

The column must be of an integer type. Usually a long type is used.

Attributes
String
Optional
Suggested values
rowVersionId
Message Col Record Insertion Date (messageColRecordInsertionDate)
Description
Name of a database column with the date and time this record was created. The timestamp is written by this plugin at the time the record is inserted by this plugin.

The type of the column must be compatible with a timestamp.

Note that - if configured (see separate property) - user information may also be written to the database at the same time.

Attributes
String
Optional
Suggested values
rowInsertDate
Message Col Record Insertion User (messageColRecordInsertionUser)
Description
Name of a database column with the name of the system that inserted the record. The name is determined by configuration property "record-modification-user" and is written by this plugin at the time the record is inserted by this plugin

Note that - if configured (see separate property) - the insertion date may alo be written to the database at the same time.

Attributes
String
Optional
Suggested values
rowInsertUser
Message Col Record Modification Date (messageColRecordModificationDate)
Description
Name of a database column with the date and time this record was modified. The timestamp is written by this plugin at the time the record is modified by this plugin.

The type of column must be compatible with a timestamp.

Note that - if configured (see separate property) - user information may also be written to the database at the same time.

Attributes
String
Optional
Suggested values
rowUpdateDate
Message Col Record Modification User (messageColRecordModificationUser)
Description
Name of a database column with the name of the system that modified the record. The name is determined by configuration property "record-modification-user" and is written by this plugin at the time the record is modified by this plugin.

Note that - if configured (see separate property - the modification date may also be written to the database at the same time.

Attributes
String
Optional
Suggested values
rowUpdateUser
Message Additional Where Clause (messageAdditionalWhereClause)
Description
Optional SQL query condition that is added to the where clause when searching for, updating or deleting messages.
The SQL query without an additional where clause is something like SELECT * FROM message_table WHERE VALID_FROM <= now AND VALID_TO >= now.
The SQL query with an additional where clause xyz is: SELECT * FROM message_table WHERE VALID_FROM <= now AND VALID_TO >= now AND (xyz).

Note that this where clause may be overridden for the message lookup using property "Message Lookup Additional Where Clause".

Attributes
String
Optional
Example
GROUP = 'cus1' AND MANDATE = 'abc'
Example
deleted=0
Translation Table (translationTable)
Description
The name of the database table containing the translations for the maintenance messages. Records in this table belong to a message table record (i.e. a foreign key to the message table).
Attributes
String
Mandatory
Suggested values
medusa_maint_msg_tnsl
Translation Col Message Ref (translationColMessageRef)
Description
The name of the column in the translation table that references messages (the referred column in the message table is the one specified by message-col-name
Attributes
String
Mandatory
Suggested values
message_ref
Translation Col Language (translationColLanguage)
Description
The name of the column that holds the language of the translation.
Attributes
String
Mandatory
Suggested values
language
Translation Col Message (translationColMessage)
Description
The name of the column that holds the translated message.
Attributes
String
Mandatory
Suggested values
message
Translation Additional Where Clause (translationAdditionalWhereClause)
Description
Optional SQL query condition that is added to the where clause when searching for translations.
The SQL query without an additional where clause is something like SELECT * FROM translation_table WHERE language = 'en'.
The SQL query with an additional where clause xyz is: SELECT * FROM translation_table WHERE language = 'en' AND xyz.
Attributes
String
Optional
Example
GROUP = 'cus1' AND MANDATE = 'abc'
Example
deleted=0
Record Modification User (recordModificationUser)
Description
Specifies a string (typically the name associated with the system using this plugin) that is written to the database fields specified by properties "message-col-record-insertion-user" and "message-col-record-modification-user" when this plugin creates or modifies a record.
Attributes
String
Optional
Default value
Medusa
Suggested values
Airlock
Additional Insert Data (additionalInsertData)
Description
This property defines a list of name/value pairs used in insert statements when a new record is inserted.

This allows you to add arbitrary fixed or dynamic values when a new record is created. This is useful if some database fields may not be NULL but are not inserted by this plugin by default.

CautionMake sure to appropriately escape values (e.g. use single quotes around strings). They are used as provided in the SQL insert statements. This allows calling database dependent functions (e.g. in order to get a sequence number, system date, etc).

Attributes
Plugin-List
Optional
Assignable plugins
Additional Insert Data Translations (additionalInsertDataTranslations)
Description
This property defines a list of name/value pairs used in insert statements when a new record is inserted.

This allows you to add arbitrary fixed or dynamic values when a new record is created. This is useful if some database fields may not be NULL but are not inserted by this plugin by default.

CautionMake sure to appropriately escape values (e.g. use single quotes around strings). They are used as provided in the SQL insert statements. This allows calling database dependent functions (e.g. in order to get a sequence number, system date, etc).

Attributes
Plugin-List
Optional
Assignable plugins
YAML Template (with default values)

type: DatabaseMaintenanceMessagePersister
id: DatabaseMaintenanceMessagePersister-xxxxxx
displayName: 
comment: 
properties:
  additionalInsertData:
  additionalInsertDataTranslations:
  cacheTimeout: 0
  messageAdditionalWhereClause:
  messageColActive:
  messageColLocation:
  messageColName:
  messageColRecordInsertionDate:
  messageColRecordInsertionUser:
  messageColRecordModificationDate:
  messageColRecordModificationUser:
  messageColSystemAvailable:
  messageColValidFrom:
  messageColValidTo:
  messageColVersionId:
  messageTable:
  recordModificationUser: Medusa
  sqlDataSource:
  translationAdditionalWhereClause:
  translationColLanguage:
  translationColMessage:
  translationColMessageRef:
  translationTable: