Tapper Team > Tapper-Cmd-4.1.7 > Tapper::Cmd::Notification

Download:
Tapper-Cmd-4.1.7.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 4.1.7   Source   Latest Release: Tapper-Cmd-4.1.8

NAME ^

Tapper::Cmd::Notification

SYNOPSIS ^

This project offers backend functions for all projects that manipulate notification subscriptions.

    use Tapper::Cmd::Notification;

    my $subscription = Tapper::Cmd::Notification->new();

    my $details = {event      => "testrun_finished",
                   filter  => "testrun('id') == 23",
                   comment    => "Get back to work, testrun 23 is finished",
                   persist    => 0,
                   owner_login => 'anton',
                  };
    my $id = $subscription->add($details);
    $details->{filter} = "testrun('id') == 24";
    my $error = $subscription->update($id, $details);
    $error = $subscription->delete($id);

NAME ^

Tapper::Cmd::Notification - Backend functions for manipluation of notification subscriptions in the database

FUNCTIONS ^

get_user

Make sure the user is given as user id.

@param hash ref - data for notification subscription

@param success - updated hash ref

@throws die

add

Add a new notification subscription. Expects all details as a hash reference.

@param string - preconditions in YAML format OR @param hash ref - notification subscrition data

@return success - subscrition id @return error - undef

@throws Perl die

list

Return a DBIC resultset object that contains a list of notification subscriptions.

update

Update a given notification subscription. The given data has to be a complete hash of what the subscription should look like after the update.

@param int - subscription id @param hash ref - subscription as it should be

@return success - subscription id

@throws die

del

Delete a notification subscription with given id. Its named del instead of delete to prevent confusion with the buildin delete function.

@param int - notification id

@return success - 0

@throws die

AUTHOR ^

AMD OSRC Tapper Team, <tapper at amd64.org>

COPYRIGHT & LICENSE ^

Copyright 2012 AMD OSRC Tapper Team, all rights reserved.

This program is released under the following license: freebsd

AUTHOR ^

AMD OSRC Tapper Team <tapper@amd64.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License
syntax highlighting: