
####
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.


.. code-block:: perl

     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:


.. code-block:: perl

     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.


.. code-block:: perl

     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.


.. code-block:: perl

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



ArticleBackend()
================


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


.. code-block:: perl

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


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


.. code-block:: perl

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



PackageNameGet()
================


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


.. code-block:: perl

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





