import rt 3.4.6
[freeside.git] / rt / lib / RT / ACE.pm
1 # BEGIN BPS TAGGED BLOCK {{{
2
3 # COPYRIGHT:
4 #  
5 # This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
6 #                                          <jesse@bestpractical.com>
7
8 # (Except where explicitly superseded by other copyright notices)
9
10
11 # LICENSE:
12
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
16 # from www.gnu.org.
17
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.
22
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., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27
28 # CONTRIBUTION SUBMISSION POLICY:
29
30 # (The following paragraph is not intended to limit the rights granted
31 # to you to modify and distribute this software under the terms of
32 # the GNU General Public License and is only of importance to you if
33 # you choose to contribute your changes and enhancements to the
34 # community by submitting them to Best Practical Solutions, LLC.)
35
36 # By intentionally submitting any modifications, corrections or
37 # derivatives to this work, or any other work intended for use with
38 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
39 # you are the copyright holder for those contributions and you grant
40 # Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
41 # royalty-free, perpetual, license to use, copy, create derivative
42 # works based on those contributions, and sublicense and distribute
43 # those contributions and any derivatives thereof.
44
45 # END BPS TAGGED BLOCK }}}
46 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
47 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.  
48
49 # !! DO NOT EDIT THIS FILE !!
50 #
51
52 use strict;
53
54
55 =head1 NAME
56
57 RT::ACE
58
59
60 =head1 SYNOPSIS
61
62 =head1 DESCRIPTION
63
64 =head1 METHODS
65
66 =cut
67
68 package RT::ACE;
69 use RT::Record; 
70
71
72 use vars qw( @ISA );
73 @ISA= qw( RT::Record );
74
75 sub _Init {
76   my $self = shift; 
77
78   $self->Table('ACL');
79   $self->SUPER::_Init(@_);
80 }
81
82
83
84
85
86 =head2 Create PARAMHASH
87
88 Create takes a hash of values and creates a row in the database:
89
90   varchar(25) 'PrincipalType'.
91   int(11) 'PrincipalId'.
92   varchar(25) 'RightName'.
93   varchar(25) 'ObjectType'.
94   int(11) 'ObjectId'.
95   int(11) 'DelegatedBy'.
96   int(11) 'DelegatedFrom'.
97
98 =cut
99
100
101
102
103 sub Create {
104     my $self = shift;
105     my %args = ( 
106                 PrincipalType => '',
107                 PrincipalId => '0',
108                 RightName => '',
109                 ObjectType => '',
110                 ObjectId => '0',
111                 DelegatedBy => '0',
112                 DelegatedFrom => '0',
113
114                   @_);
115     $self->SUPER::Create(
116                          PrincipalType => $args{'PrincipalType'},
117                          PrincipalId => $args{'PrincipalId'},
118                          RightName => $args{'RightName'},
119                          ObjectType => $args{'ObjectType'},
120                          ObjectId => $args{'ObjectId'},
121                          DelegatedBy => $args{'DelegatedBy'},
122                          DelegatedFrom => $args{'DelegatedFrom'},
123 );
124
125 }
126
127
128
129 =head2 id
130
131 Returns the current value of id. 
132 (In the database, id is stored as int(11).)
133
134
135 =cut
136
137
138 =head2 PrincipalType
139
140 Returns the current value of PrincipalType. 
141 (In the database, PrincipalType is stored as varchar(25).)
142
143
144
145 =head2 SetPrincipalType VALUE
146
147
148 Set PrincipalType to VALUE. 
149 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
150 (In the database, PrincipalType will be stored as a varchar(25).)
151
152
153 =cut
154
155
156 =head2 PrincipalId
157
158 Returns the current value of PrincipalId. 
159 (In the database, PrincipalId is stored as int(11).)
160
161
162
163 =head2 SetPrincipalId VALUE
164
165
166 Set PrincipalId to VALUE. 
167 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
168 (In the database, PrincipalId will be stored as a int(11).)
169
170
171 =cut
172
173
174 =head2 RightName
175
176 Returns the current value of RightName. 
177 (In the database, RightName is stored as varchar(25).)
178
179
180
181 =head2 SetRightName VALUE
182
183
184 Set RightName to VALUE. 
185 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
186 (In the database, RightName will be stored as a varchar(25).)
187
188
189 =cut
190
191
192 =head2 ObjectType
193
194 Returns the current value of ObjectType. 
195 (In the database, ObjectType is stored as varchar(25).)
196
197
198
199 =head2 SetObjectType VALUE
200
201
202 Set ObjectType to VALUE. 
203 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
204 (In the database, ObjectType will be stored as a varchar(25).)
205
206
207 =cut
208
209
210 =head2 ObjectId
211
212 Returns the current value of ObjectId. 
213 (In the database, ObjectId is stored as int(11).)
214
215
216
217 =head2 SetObjectId VALUE
218
219
220 Set ObjectId to VALUE. 
221 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
222 (In the database, ObjectId will be stored as a int(11).)
223
224
225 =cut
226
227
228 =head2 DelegatedBy
229
230 Returns the current value of DelegatedBy. 
231 (In the database, DelegatedBy is stored as int(11).)
232
233
234
235 =head2 SetDelegatedBy VALUE
236
237
238 Set DelegatedBy to VALUE. 
239 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
240 (In the database, DelegatedBy will be stored as a int(11).)
241
242
243 =cut
244
245
246 =head2 DelegatedFrom
247
248 Returns the current value of DelegatedFrom. 
249 (In the database, DelegatedFrom is stored as int(11).)
250
251
252
253 =head2 SetDelegatedFrom VALUE
254
255
256 Set DelegatedFrom to VALUE. 
257 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
258 (In the database, DelegatedFrom will be stored as a int(11).)
259
260
261 =cut
262
263
264
265 sub _CoreAccessible {
266     {
267      
268         id =>
269                 {read => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
270         PrincipalType => 
271                 {read => 1, write => 1, sql_type => 12, length => 25,  is_blob => 0,  is_numeric => 0,  type => 'varchar(25)', default => ''},
272         PrincipalId => 
273                 {read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
274         RightName => 
275                 {read => 1, write => 1, sql_type => 12, length => 25,  is_blob => 0,  is_numeric => 0,  type => 'varchar(25)', default => ''},
276         ObjectType => 
277                 {read => 1, write => 1, sql_type => 12, length => 25,  is_blob => 0,  is_numeric => 0,  type => 'varchar(25)', default => ''},
278         ObjectId => 
279                 {read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
280         DelegatedBy => 
281                 {read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
282         DelegatedFrom => 
283                 {read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
284
285  }
286 };
287
288
289         eval "require RT::ACE_Overlay";
290         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Overlay.pm}) {
291             die $@;
292         };
293
294         eval "require RT::ACE_Vendor";
295         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Vendor.pm}) {
296             die $@;
297         };
298
299         eval "require RT::ACE_Local";
300         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Local.pm}) {
301             die $@;
302         };
303
304
305
306
307 =head1 SEE ALSO
308
309 This class allows "overlay" methods to be placed
310 into the following files _Overlay is for a System overlay by the original author,
311 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
312
313 These overlay files can contain new subs or subs to replace existing subs in this module.
314
315 Each of these files should begin with the line 
316
317    no warnings qw(redefine);
318
319 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
320
321 RT::ACE_Overlay, RT::ACE_Vendor, RT::ACE_Local
322
323 =cut
324
325
326 1;