1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
6 # <jesse@bestpractical.com>
8 # (Except where explicitly superseded by other copyright notices)
13 # This work is made available to you under the terms of Version 2 of
14 # the GNU General Public License. A copy of that license should have
15 # been provided with this software, but in any event can be snarfed
18 # This work is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/copyleft/gpl.html.
30 # CONTRIBUTION SUBMISSION POLICY:
32 # (The following paragraph is not intended to limit the rights granted
33 # to you to modify and distribute this software under the terms of
34 # the GNU General Public License and is only of importance to you if
35 # you choose to contribute your changes and enhancements to the
36 # community by submitting them to Best Practical Solutions, LLC.)
38 # By intentionally submitting any modifications, corrections or
39 # derivatives to this work, or any other work intended for use with
40 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 # you are the copyright holder for those contributions and you grant
42 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
43 # royalty-free, perpetual, license to use, copy, create derivative
44 # works based on those contributions, and sublicense and distribute
45 # those contributions and any derivatives thereof.
47 # END BPS TAGGED BLOCK }}}
48 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
49 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
51 # !! DO NOT EDIT THIS FILE !!
74 use RT::ScripCondition;
79 @ISA= qw( RT::Record );
84 $self->Table('Scrips');
85 $self->SUPER::_Init(@_);
92 =head2 Create PARAMHASH
94 Create takes a hash of values and creates a row in the database:
96 varchar(255) 'Description'.
97 int(11) 'ScripCondition'.
98 int(11) 'ScripAction'.
99 text 'ConditionRules'.
101 text 'CustomIsApplicableCode'.
102 text 'CustomPrepareCode'.
103 text 'CustomCommitCode'.
117 ScripCondition => '0',
119 ConditionRules => '',
121 CustomIsApplicableCode => '',
122 CustomPrepareCode => '',
123 CustomCommitCode => '',
129 $self->SUPER::Create(
130 Description => $args{'Description'},
131 ScripCondition => $args{'ScripCondition'},
132 ScripAction => $args{'ScripAction'},
133 ConditionRules => $args{'ConditionRules'},
134 ActionRules => $args{'ActionRules'},
135 CustomIsApplicableCode => $args{'CustomIsApplicableCode'},
136 CustomPrepareCode => $args{'CustomPrepareCode'},
137 CustomCommitCode => $args{'CustomCommitCode'},
138 Stage => $args{'Stage'},
139 Queue => $args{'Queue'},
140 Template => $args{'Template'},
149 Returns the current value of id.
150 (In the database, id is stored as int(11).)
158 Returns the current value of Description.
159 (In the database, Description is stored as varchar(255).)
163 =head2 SetDescription VALUE
166 Set Description to VALUE.
167 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
168 (In the database, Description will be stored as a varchar(255).)
174 =head2 ScripCondition
176 Returns the current value of ScripCondition.
177 (In the database, ScripCondition is stored as int(11).)
181 =head2 SetScripCondition VALUE
184 Set ScripCondition to VALUE.
185 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
186 (In the database, ScripCondition will be stored as a int(11).)
192 =head2 ScripConditionObj
194 Returns the ScripCondition Object which has the id returned by ScripCondition
199 sub ScripConditionObj {
201 my $ScripCondition = RT::ScripCondition->new($self->CurrentUser);
202 $ScripCondition->Load($self->__Value('ScripCondition'));
203 return($ScripCondition);
208 Returns the current value of ScripAction.
209 (In the database, ScripAction is stored as int(11).)
213 =head2 SetScripAction VALUE
216 Set ScripAction to VALUE.
217 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
218 (In the database, ScripAction will be stored as a int(11).)
224 =head2 ScripActionObj
226 Returns the ScripAction Object which has the id returned by ScripAction
233 my $ScripAction = RT::ScripAction->new($self->CurrentUser);
234 $ScripAction->Load($self->__Value('ScripAction'));
235 return($ScripAction);
238 =head2 ConditionRules
240 Returns the current value of ConditionRules.
241 (In the database, ConditionRules is stored as text.)
245 =head2 SetConditionRules VALUE
248 Set ConditionRules to VALUE.
249 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
250 (In the database, ConditionRules will be stored as a text.)
258 Returns the current value of ActionRules.
259 (In the database, ActionRules is stored as text.)
263 =head2 SetActionRules VALUE
266 Set ActionRules to VALUE.
267 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
268 (In the database, ActionRules will be stored as a text.)
274 =head2 CustomIsApplicableCode
276 Returns the current value of CustomIsApplicableCode.
277 (In the database, CustomIsApplicableCode is stored as text.)
281 =head2 SetCustomIsApplicableCode VALUE
284 Set CustomIsApplicableCode to VALUE.
285 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
286 (In the database, CustomIsApplicableCode will be stored as a text.)
292 =head2 CustomPrepareCode
294 Returns the current value of CustomPrepareCode.
295 (In the database, CustomPrepareCode is stored as text.)
299 =head2 SetCustomPrepareCode VALUE
302 Set CustomPrepareCode to VALUE.
303 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
304 (In the database, CustomPrepareCode will be stored as a text.)
310 =head2 CustomCommitCode
312 Returns the current value of CustomCommitCode.
313 (In the database, CustomCommitCode is stored as text.)
317 =head2 SetCustomCommitCode VALUE
320 Set CustomCommitCode to VALUE.
321 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
322 (In the database, CustomCommitCode will be stored as a text.)
330 Returns the current value of Stage.
331 (In the database, Stage is stored as varchar(32).)
335 =head2 SetStage VALUE
339 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
340 (In the database, Stage will be stored as a varchar(32).)
348 Returns the current value of Queue.
349 (In the database, Queue is stored as int(11).)
353 =head2 SetQueue VALUE
357 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
358 (In the database, Queue will be stored as a int(11).)
366 Returns the Queue Object which has the id returned by Queue
373 my $Queue = RT::Queue->new($self->CurrentUser);
374 $Queue->Load($self->__Value('Queue'));
380 Returns the current value of Template.
381 (In the database, Template is stored as int(11).)
385 =head2 SetTemplate VALUE
388 Set Template to VALUE.
389 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
390 (In the database, Template will be stored as a int(11).)
398 Returns the Template Object which has the id returned by Template
405 my $Template = RT::Template->new($self->CurrentUser);
406 $Template->Load($self->__Value('Template'));
412 Returns the current value of Creator.
413 (In the database, Creator is stored as int(11).)
421 Returns the current value of Created.
422 (In the database, Created is stored as datetime.)
430 Returns the current value of LastUpdatedBy.
431 (In the database, LastUpdatedBy is stored as int(11).)
439 Returns the current value of LastUpdated.
440 (In the database, LastUpdated is stored as datetime.)
447 sub _CoreAccessible {
451 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
453 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
455 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
457 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
459 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
461 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
462 CustomIsApplicableCode =>
463 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
465 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
467 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
469 {read => 1, write => 1, sql_type => 12, length => 32, is_blob => 0, is_numeric => 0, type => 'varchar(32)', default => ''},
471 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
473 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
475 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
477 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
479 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
481 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
487 eval "require RT::Scrip_Overlay";
488 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Overlay.pm}) {
492 eval "require RT::Scrip_Vendor";
493 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Vendor.pm}) {
497 eval "require RT::Scrip_Local";
498 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Local.pm}) {
507 This class allows "overlay" methods to be placed
508 into the following files _Overlay is for a System overlay by the original author,
509 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
511 These overlay files can contain new subs or subs to replace existing subs in this module.
513 Each of these files should begin with the line
515 no warnings qw(redefine);
517 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
519 RT::Scrip_Overlay, RT::Scrip_Vendor, RT::Scrip_Local