1 # $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Generic.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
2 # (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
3 # This software is redistributable under the terms of the GNU GPL
7 RT::Action::Generic - a generic baseclass for RT Actions
11 use RT::Action::Generic;
19 ok (require RT::TestHarness);
20 ok (require RT::Action::Generic);
26 package RT::Action::Generic;
31 my $class = ref($proto) || $proto;
33 bless ($self, $class);
42 my %args = ( TransactionObj => undef,
51 $self->{'Argument'} = $args{'Argument'};
52 $self->{'ScripObj'} = $args{'ScripObj'};
53 $self->{'TicketObj'} = $args{'TicketObj'};
54 $self->{'TransactionObj'} = $args{'TransactionObj'};
55 $self->{'TemplateObj'} = $args{'TemplateObj'};
56 $self->{'Type'} = $args{'Type'};
60 # Access Scripwide data
65 return($self->{'Argument'});
72 return($self->{'TicketObj'});
76 # {{{ sub TransactionObj
79 return($self->{'TransactionObj'});
86 return($self->{'TemplateObj'});
93 return($self->{'Type'});
100 #Do what we need to do and send it out.
105 return(0,"Commit Stubbed");
110 #What does this type of Action does
115 return ("No description for " . ref $self);
120 #Parse the templates, get things ready to go.
125 return (0,"Prepare Stubbed");
130 #If this rule applies to this transaction, return true.
132 # {{{ sub IsApplicable
143 # We need to clean up all the references that might maybe get
145 $self->{'TemplateObj'} =undef
146 $self->{'TicketObj'} = undef;
147 $self->{'TransactionObj'} = undef;
148 $self->{'ScripObj'} = undef;