
##############
CalendarEvents
##############


****
NAME
****


Kernel::System::CalendarEvents - to manage calendar events


***********
DESCRIPTION
***********


Global module for operations that bases on calendar events


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $CalendarEventsObject = $Kernel::OM->Get('Kernel::System::CalendarEvents');



Parse()
=======


Parses calendar events of specified data.


.. code-block:: perl

     my $CalendarEventsData = $CalendarEventsObject->Parse(
         TicketID    => $Param{TicketID},
         ArticleID   => $Param{ArticleID},
         String      => $ArticleContent, # parse specified text content
         Attachments => { # parse attachments
             Data => {
                 '4' => {
                     'Disposition' => 'attachment',
                     'ContentType' => 'text/calendar; charset=UTF-8; name="Some calendar name.ics"',
                     'Filename'    => 'calendar.ics',
                     'FilesizeRaw' => '949'
                 },
                 '1' => {
                     'Disposition' => 'attachment',
                     'ContentType' => 'text/calendar; charset=UTF-8; name="Some calendar name1.ics"',
                     'Filename'    => 'calendar1.ics',
                     'FilesizeRaw' => '2967'
                 },
             },
             Type => "Article", # specify type of attachments
         },
         ToTimeZone => $UserTimeZone,
     );



FindEvents()
============


Finds supported calendar event from the string.


.. code-block:: perl

     my $Result = $CalendarEventsObject->FindEvents(
         String => [
             {
                 Content =>
                     "Hello! You've got an invitation for a meeting:
                     BEGIN:VCALENDAR
                     ..
                     END:VCALENDAR"
             }
         ],
         Attachments => [
             {
                 Content =>
                     "Hello! You've got an invitation for a meeting:
                     BEGIN:VCALENDAR
                     ..
                     END:VCALENDAR"
             },
             {
                 Content =>
                     "Hello! You've got an invitation for a meeting:
                     BEGIN:VCALENDAR
                     ..
                     END:VCALENDAR"
             },
             ..
         ],
     );



BuildString()
=============


Builds string for data output.


.. code-block:: perl

     my $OutputString = $CalendarEventsObject->BuildString(
         Data => {
           'Type'      => 'Recurrent', # required
           'Interval'  => '5',
           'ByDay'     => 'SU,TU,WE,TH,FR,SA',
           'AllDay'    => 1,
           'Frequency' => 'Weekly'
         },
         Type => 'Frequency',
     );



_FrequencyStringMappingGet()
============================


Get frequency string mapping.


.. code-block:: perl

     my $FrequencyStringMapping = $CalendarEventsObject->_FrequencyStringMappingGet();



_MonthsMappingGet()
===================


Get months mapping.


.. code-block:: perl

     my $MonthsMapping = $CalendarEventsObject->_MonthsMappingGet();



_DaysMappingGet()
=================


Get days mapping


.. code-block:: perl

     my $DaysMapping = $CalendarEventsObject->_DaysMappingGet();



_DaysOrderMappingGet()
======================


Get days order mapping


.. code-block:: perl

     my $DaysOrderMapping = $CalendarEventsObject->_DaysOrderMappingGet();




