import of rt 3.0.4
[freeside.git] / rt / lib / RT / ScripAction.pm
1 # BEGIN LICENSE BLOCK
2
3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4
5 # (Except where explictly superceded by other copyright notices)
6
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
10 # from www.gnu.org.
11
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # General Public License for more details.
16
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
21
22
23 # END LICENSE BLOCK
24 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
25 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.  
26
27 # !! DO NOT EDIT THIS FILE !!
28 #
29
30 use strict;
31
32
33 =head1 NAME
34
35 RT::ScripAction
36
37
38 =head1 SYNOPSIS
39
40 =head1 DESCRIPTION
41
42 =head1 METHODS
43
44 =cut
45
46 package RT::ScripAction;
47 use RT::Record; 
48
49
50 use vars qw( @ISA );
51 @ISA= qw( RT::Record );
52
53 sub _Init {
54   my $self = shift; 
55
56   $self->Table('ScripActions');
57   $self->SUPER::_Init(@_);
58 }
59
60
61
62
63
64 =item Create PARAMHASH
65
66 Create takes a hash of values and creates a row in the database:
67
68   varchar(200) 'Name'.
69   varchar(255) 'Description'.
70   varchar(60) 'ExecModule'.
71   varchar(255) 'Argument'.
72
73 =cut
74
75
76
77
78 sub Create {
79     my $self = shift;
80     my %args = ( 
81                 Name => '',
82                 Description => '',
83                 ExecModule => '',
84                 Argument => '',
85
86                   @_);
87     $self->SUPER::Create(
88                          Name => $args{'Name'},
89                          Description => $args{'Description'},
90                          ExecModule => $args{'ExecModule'},
91                          Argument => $args{'Argument'},
92 );
93
94 }
95
96
97
98 =item id
99
100 Returns the current value of id. 
101 (In the database, id is stored as int(11).)
102
103
104 =cut
105
106
107 =item Name
108
109 Returns the current value of Name. 
110 (In the database, Name is stored as varchar(200).)
111
112
113
114 =item SetName VALUE
115
116
117 Set Name to VALUE. 
118 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
119 (In the database, Name will be stored as a varchar(200).)
120
121
122 =cut
123
124
125 =item Description
126
127 Returns the current value of Description. 
128 (In the database, Description is stored as varchar(255).)
129
130
131
132 =item SetDescription VALUE
133
134
135 Set Description to VALUE. 
136 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
137 (In the database, Description will be stored as a varchar(255).)
138
139
140 =cut
141
142
143 =item ExecModule
144
145 Returns the current value of ExecModule. 
146 (In the database, ExecModule is stored as varchar(60).)
147
148
149
150 =item SetExecModule VALUE
151
152
153 Set ExecModule to VALUE. 
154 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
155 (In the database, ExecModule will be stored as a varchar(60).)
156
157
158 =cut
159
160
161 =item Argument
162
163 Returns the current value of Argument. 
164 (In the database, Argument is stored as varchar(255).)
165
166
167
168 =item SetArgument VALUE
169
170
171 Set Argument to VALUE. 
172 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
173 (In the database, Argument will be stored as a varchar(255).)
174
175
176 =cut
177
178
179 =item Creator
180
181 Returns the current value of Creator. 
182 (In the database, Creator is stored as int(11).)
183
184
185 =cut
186
187
188 =item Created
189
190 Returns the current value of Created. 
191 (In the database, Created is stored as datetime.)
192
193
194 =cut
195
196
197 =item LastUpdatedBy
198
199 Returns the current value of LastUpdatedBy. 
200 (In the database, LastUpdatedBy is stored as int(11).)
201
202
203 =cut
204
205
206 =item LastUpdated
207
208 Returns the current value of LastUpdated. 
209 (In the database, LastUpdated is stored as datetime.)
210
211
212 =cut
213
214
215
216 sub _ClassAccessible {
217     {
218      
219         id =>
220                 {read => 1, type => 'int(11)', default => ''},
221         Name => 
222                 {read => 1, write => 1, type => 'varchar(200)', default => ''},
223         Description => 
224                 {read => 1, write => 1, type => 'varchar(255)', default => ''},
225         ExecModule => 
226                 {read => 1, write => 1, type => 'varchar(60)', default => ''},
227         Argument => 
228                 {read => 1, write => 1, type => 'varchar(255)', default => ''},
229         Creator => 
230                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
231         Created => 
232                 {read => 1, auto => 1, type => 'datetime', default => ''},
233         LastUpdatedBy => 
234                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
235         LastUpdated => 
236                 {read => 1, auto => 1, type => 'datetime', default => ''},
237
238  }
239 };
240
241
242         eval "require RT::ScripAction_Overlay";
243         if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_Overlay.pm}) {
244             die $@;
245         };
246
247         eval "require RT::ScripAction_Vendor";
248         if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_Vendor.pm}) {
249             die $@;
250         };
251
252         eval "require RT::ScripAction_Local";
253         if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_Local.pm}) {
254             die $@;
255         };
256
257
258
259
260 =head1 SEE ALSO
261
262 This class allows "overlay" methods to be placed
263 into the following files _Overlay is for a System overlay by the original author,
264 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
265
266 These overlay files can contain new subs or subs to replace existing subs in this module.
267
268 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line 
269
270    no warnings qw(redefine);
271
272 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
273
274 RT::ScripAction_Overlay, RT::ScripAction_Vendor, RT::ScripAction_Local
275
276 =cut
277
278
279 1;