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