line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------------------ |
2
|
|
|
|
|
|
|
# OBJET : Module du constructeur CTM::ReadEM::workOnExceptionAlerts() |
3
|
|
|
|
|
|
|
# APPLICATION : Control-M EM + Configuration Manager Alarms (CM) |
4
|
|
|
|
|
|
|
# AUTEUR : Yoann Le Garff |
5
|
|
|
|
|
|
|
# DATE DE CREATION : 27/05/2014 |
6
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------------------ |
7
|
|
|
|
|
|
|
# USAGE / AIDE |
8
|
|
|
|
|
|
|
# perldoc CTM::ReadEM::WorkOnExceptionAlerts |
9
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------------------ |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#-> BEGIN |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#----> ** initialisation ** |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package CTM::ReadEM::WorkOnExceptionAlerts; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
18
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
81
|
use base qw/ |
21
|
|
|
|
|
|
|
CTM::Base |
22
|
|
|
|
|
|
|
CTM::Base::SubClass |
23
|
1
|
|
|
1
|
|
2
|
/; |
|
1
|
|
|
|
|
2
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
40
|
use Carp qw/ |
26
|
|
|
|
|
|
|
croak |
27
|
1
|
|
|
1
|
|
4
|
/; |
|
1
|
|
|
|
|
1
|
|
28
|
1
|
|
|
|
|
4
|
use Hash::Util qw/ |
29
|
|
|
|
|
|
|
unlock_hash |
30
|
1
|
|
|
1
|
|
4
|
/; |
|
1
|
|
|
|
|
1
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#----> ** variables de classe ** |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
our $VERSION = 0.181; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#----> ** methodes publiques ** |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub resetAndRefresh { |
39
|
0
|
|
|
0
|
0
|
|
return shift->SUPER::_resetAndRefresh(CTM::Base::_exceptionAlertsWorkMethod); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub handle { |
43
|
0
|
|
|
0
|
0
|
|
return shift->SUPER::_setSerials((caller 0)[3], "UPDATE exception_alerts SET status = '2'", { |
44
|
|
|
|
|
|
|
'status' => 2 |
45
|
|
|
|
|
|
|
}, @_); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub unhandle { |
49
|
0
|
|
|
0
|
0
|
|
return shift->SUPER::_setSerials((caller 0)[3], "UPDATE exception_alerts SET status = '1'", { |
50
|
|
|
|
|
|
|
'status' => 1 |
51
|
|
|
|
|
|
|
}, @_); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub detete { |
55
|
0
|
|
|
0
|
0
|
|
return shift->SUPER::_setSerials((caller 0)[3], 'DELETE FROM exception_alerts', {}, @_); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub setNote { |
59
|
0
|
|
|
0
|
0
|
|
my ($self, $note, $serialID) = @_; |
60
|
0
|
|
|
|
|
|
my $subName = (caller 0)[3]; |
61
|
0
|
0
|
|
|
|
|
croak(CTM::Base::_myErrorMessage($subName, CTM::Base::_myUsageMessage('$obj->' . $subName, '$definedNote'))) unless (defined $note); |
62
|
0
|
|
|
|
|
|
return shift->SUPER::_setSerials($subName, "UPDATE exception_alerts SET note = '" . $note . "'", { |
63
|
|
|
|
|
|
|
'note' => $note |
64
|
|
|
|
|
|
|
}, $serialID); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
#-> Perl BuiltIn |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
BEGIN { |
70
|
1
|
|
|
1
|
|
285
|
*AUTOLOAD = \&CTM::Base::AUTOLOAD; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub DESTROY { |
74
|
0
|
|
|
0
|
|
|
unlock_hash(%{+shift}); |
|
0
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
#-> END |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |