1 # $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Condition/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::Condition::Generic - ;
11 use RT::Condition::Generic;
12 my $foo = new RT::Condition::IsApplicable(
13 TransactionObj => $tr,
19 if ($foo->IsApplicable) {
32 ok (require RT::TestHarness);
33 ok (require RT::Condition::Generic);
40 package RT::Condition::Generic;
45 my $class = ref($proto) || $proto;
47 bless ($self, $class);
56 my %args = ( TransactionObj => undef,
61 ApplicableTransTypes => undef,
65 $self->{'Argument'} = $args{'Argument'};
66 $self->{'ScripObj'} = $args{'ScripObj'};
67 $self->{'TicketObj'} = $args{'TicketObj'};
68 $self->{'TransactionObj'} = $args{'TransactionObj'};
69 $self->{'ApplicableTransTypes'} = $args{'ApplicableTransTypes'};
73 # Access Scripwide data
79 Return the optional argument associated with this ScripCondition
85 return($self->{'Argument'});
93 Return the ticket object we're talking about
99 return($self->{'TicketObj'});
103 # {{{ sub TransactionObj
105 =head2 TransactionObj
107 Return the transaction object we're talking about
113 return($self->{'TransactionObj'});
125 sub ApplicableTransTypes {
127 return($self->{'ApplicableTransTypes'});
135 #What does this type of Action does
140 return ("No description for " . ref $self);
145 #Parse the templates, get things ready to go.
147 #If this rule applies to this transaction, return true.
149 # {{{ sub IsApplicable
160 # We need to clean up all the references that might maybe get
162 $self->{'TemplateObj'} =undef
163 $self->{'TicketObj'} = undef;
164 $self->{'TransactionObj'} = undef;
165 $self->{'ScripObj'} = undef;