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