Kernel::System::PushEvent::Base

NAME

Kernel::System::PushEvent::Base – Base functionality for the different push event tables.

DESCRIPTION

This is the base class that all push event related classes should inherit from. All the basic methods necessary are implemented here or require, as well as basic parameter validation schema definitions.

PUBLIC INTERFACE

MethodParamValidationSchema()

Add the default param validation schema for the push event modules.

PRIVATE INTERFACE

_GetExpiryTime()

Generated the expiry time for the subscriptions and user messages.

    my $ExpiryTimeString = $PushEventBaseObject->_GetExpiryTime();

Returns

    $ExpiryTimeString = '2019-04-13 12:05:00';

_EntryExists()

Checks if a given value is existing in a given column of a given table. The table parameter must be a string with the table name to search in. The search parameter must be a hash reference, where the keys are the column names and the values are the column values to check for. All columns and corresponding values are concatenated with an 'AND'.

    my $Exists = $PushEventBaseObject->_EntryExists(
        Table  => 'table_name', # required
        Search => {             # required
            'column1' => 'value1',
            'column2' => 'value2',
            'column3' => 'value3',
        },
    );

_BulkInsert()

Add batch entries to the DB into a given table.

    my $Success = $PushEventBaseObject->_BulkInsert(
        Table   => 'table_name',    # (required) Table name
        Columns => [                # (required) Array of column names
            'column_name',
            ...
        ],
        Data    => [                # (required) AoA with data
            [
                'record 1',
                'record 2',
            ],
            [
                ...
            ],
            ...
        ],
    );
Scroll to Top