This commit was generated by cvs2svn to compensate for changes in r4407,
[freeside.git] / rt / lib / RT / ACE.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::ACE
36
37
38 =head1 SYNOPSIS
39
40 =head1 DESCRIPTION
41
42 =head1 METHODS
43
44 =cut
45
46 package RT::ACE;
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('ACL');
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(25) 'PrincipalType'.
69   int(11) 'PrincipalId'.
70   varchar(25) 'RightName'.
71   varchar(25) 'ObjectType'.
72   int(11) 'ObjectId'.
73   int(11) 'DelegatedBy'.
74   int(11) 'DelegatedFrom'.
75
76 =cut
77
78
79
80
81 sub Create {
82     my $self = shift;
83     my %args = ( 
84                 PrincipalType => '',
85                 PrincipalId => '0',
86                 RightName => '',
87                 ObjectType => '',
88                 ObjectId => '0',
89                 DelegatedBy => '0',
90                 DelegatedFrom => '0',
91
92                   @_);
93     $self->SUPER::Create(
94                          PrincipalType => $args{'PrincipalType'},
95                          PrincipalId => $args{'PrincipalId'},
96                          RightName => $args{'RightName'},
97                          ObjectType => $args{'ObjectType'},
98                          ObjectId => $args{'ObjectId'},
99                          DelegatedBy => $args{'DelegatedBy'},
100                          DelegatedFrom => $args{'DelegatedFrom'},
101 );
102
103 }
104
105
106
107 =item id
108
109 Returns the current value of id. 
110 (In the database, id is stored as int(11).)
111
112
113 =cut
114
115
116 =item PrincipalType
117
118 Returns the current value of PrincipalType. 
119 (In the database, PrincipalType is stored as varchar(25).)
120
121
122
123 =item SetPrincipalType VALUE
124
125
126 Set PrincipalType to VALUE. 
127 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
128 (In the database, PrincipalType will be stored as a varchar(25).)
129
130
131 =cut
132
133
134 =item PrincipalId
135
136 Returns the current value of PrincipalId. 
137 (In the database, PrincipalId is stored as int(11).)
138
139
140
141 =item SetPrincipalId VALUE
142
143
144 Set PrincipalId to VALUE. 
145 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
146 (In the database, PrincipalId will be stored as a int(11).)
147
148
149 =cut
150
151
152 =item RightName
153
154 Returns the current value of RightName. 
155 (In the database, RightName is stored as varchar(25).)
156
157
158
159 =item SetRightName VALUE
160
161
162 Set RightName to VALUE. 
163 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
164 (In the database, RightName will be stored as a varchar(25).)
165
166
167 =cut
168
169
170 =item ObjectType
171
172 Returns the current value of ObjectType. 
173 (In the database, ObjectType is stored as varchar(25).)
174
175
176
177 =item SetObjectType VALUE
178
179
180 Set ObjectType to VALUE. 
181 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
182 (In the database, ObjectType will be stored as a varchar(25).)
183
184
185 =cut
186
187
188 =item ObjectId
189
190 Returns the current value of ObjectId. 
191 (In the database, ObjectId is stored as int(11).)
192
193
194
195 =item SetObjectId VALUE
196
197
198 Set ObjectId to VALUE. 
199 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
200 (In the database, ObjectId will be stored as a int(11).)
201
202
203 =cut
204
205
206 =item DelegatedBy
207
208 Returns the current value of DelegatedBy. 
209 (In the database, DelegatedBy is stored as int(11).)
210
211
212
213 =item SetDelegatedBy VALUE
214
215
216 Set DelegatedBy to VALUE. 
217 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
218 (In the database, DelegatedBy will be stored as a int(11).)
219
220
221 =cut
222
223
224 =item DelegatedFrom
225
226 Returns the current value of DelegatedFrom. 
227 (In the database, DelegatedFrom is stored as int(11).)
228
229
230
231 =item SetDelegatedFrom VALUE
232
233
234 Set DelegatedFrom to VALUE. 
235 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
236 (In the database, DelegatedFrom will be stored as a int(11).)
237
238
239 =cut
240
241
242
243 sub _ClassAccessible {
244     {
245      
246         id =>
247                 {read => 1, type => 'int(11)', default => ''},
248         PrincipalType => 
249                 {read => 1, write => 1, type => 'varchar(25)', default => ''},
250         PrincipalId => 
251                 {read => 1, write => 1, type => 'int(11)', default => '0'},
252         RightName => 
253                 {read => 1, write => 1, type => 'varchar(25)', default => ''},
254         ObjectType => 
255                 {read => 1, write => 1, type => 'varchar(25)', default => ''},
256         ObjectId => 
257                 {read => 1, write => 1, type => 'int(11)', default => '0'},
258         DelegatedBy => 
259                 {read => 1, write => 1, type => 'int(11)', default => '0'},
260         DelegatedFrom => 
261                 {read => 1, write => 1, type => 'int(11)', default => '0'},
262
263  }
264 };
265
266
267         eval "require RT::ACE_Overlay";
268         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Overlay.pm}) {
269             die $@;
270         };
271
272         eval "require RT::ACE_Vendor";
273         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Vendor.pm}) {
274             die $@;
275         };
276
277         eval "require RT::ACE_Local";
278         if ($@ && $@ !~ qr{^Can't locate RT/ACE_Local.pm}) {
279             die $@;
280         };
281
282
283
284
285 =head1 SEE ALSO
286
287 This class allows "overlay" methods to be placed
288 into the following files _Overlay is for a System overlay by the original author,
289 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
290
291 These overlay files can contain new subs or subs to replace existing subs in this module.
292
293 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line 
294
295    no warnings qw(redefine);
296
297 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
298
299 RT::ACE_Overlay, RT::ACE_Vendor, RT::ACE_Local
300
301 =cut
302
303
304 1;