Base#

NAME#

Kernel::System::CommunicationChannel::Base - base class for communication channels

DESCRIPTION#

This is a base class for communication channels and should not be instantiated directly.

package Kernel::CommunicationChannel::MyChannel;
use parent 'Kernel::CommunicationChannel::Base';

# methods go here

PUBLIC INTERFACE#

new()#

Do not instantiate this class, instead use the real communication channel sub classes. Also, don’t use the constructor directly, use the ObjectManager instead:

my $ChannelObject = $Kernel::OM->Get('Kernel::System::CommunicationChannel::MyChannel');

ArticleDataTables()#

Returns list of communication channel article tables for backend data storage. All backends must implement this method.

my @ArticleDataTables = $ChannelObject->ArticleDataTables();

@ArticleTables = (
    'article_data_mime',
    'article_data_mime_plain',
    'article_data_mime_attachment',
);

ArticleDataArticleIDField()#

Returns the name of the field used to link the channel article tables for backend data storage to the main article table.

my $ArticleIDField = $ChannelObject->ArticleDataArticleIDField();
$ArticleIDField = 'article_id';

ArticleBackend()#

Returns communication channel article backend object. Override this method in your class.

my $ArticleBackend = $ChannelObject->ArticleBackend();

This method will always return a valid object, so that you can chain-call on the return value like:

$ChannelObject->ArticleBackend()->ArticleGet(...);

PackageNameGet()#

Returns name of the package that provides communication channel. Override this method in your class.

my $PackageName = $ChannelObject->PackageNameGet();
$PackageName = 'MyPackage';