
#######
Mapping
#######


****
NAME
****


Kernel::GenericInterface::Mapping - GenericInterface data mapping interface


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


new()
=====


create an object.


.. code-block:: perl

     use Kernel::GenericInterface::Debugger;
     use Kernel::GenericInterface::Mapping;
 
     my $DebuggerObject = Kernel::GenericInterface::Debugger->new(
         DebuggerConfig   => {
             DebugThreshold  => 'debug',
             TestMode        => 0,           # optional, in testing mode the data will not be written to the DB
             # ...
         },
         WebserviceID      => 12,
         CommunicationType => Requester, # Requester or Provider
         RemoteIP          => 192.168.1.1, # optional
     );
     my $MappingObject = Kernel::GenericInterface::Mapping->new(
         DebuggerObject => $DebuggerObject,
         Invoker        => 'TicketLock',            # the name of the invoker in the web service
         InvokerType    => 'Nagios::TicketLock',    # the Invoker backend to use
         Operation      => 'TicketCreate',          # the name of the operation in the web service
         OperationType  => 'Ticket::TicketCreate',  # the local operation backend to use
         MappingConfig => {
             Type => 'MappingSimple',
             Config => {
                 # ...
             },
         },
     );



Map()
=====


perform data mapping in backend


.. code-block:: perl

     my $Result = $MappingObject->Map(
         Data => {              # data payload before mapping
             ...
         },
     );
 
     $Result = {
         Success         => 1,  # 0 or 1
         ErrorMessage    => '', # in case of error
         Data            => {   # data payload of after mapping
             ...
         },
     };





