1 # {{{ BEGIN BPS TAGGED BLOCK
5 # This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
6 # <jesse@bestpractical.com>
8 # (Except where explicitly superseded by other copyright notices)
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
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.
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.
28 # CONTRIBUTION SUBMISSION POLICY:
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.)
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.
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.
49 # !! DO NOT EDIT THIS FILE !!
73 @ISA= qw( RT::Record );
79 $self->SUPER::_Init(@_);
86 =head2 Create PARAMHASH
88 Create takes a hash of values and creates a row in the database:
90 varchar(25) 'PrincipalType'.
91 int(11) 'PrincipalId'.
92 varchar(25) 'RightName'.
93 varchar(25) 'ObjectType'.
95 int(11) 'DelegatedBy'.
96 int(11) 'DelegatedFrom'.
112 DelegatedFrom => '0',
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'},
131 Returns the current value of id.
132 (In the database, id is stored as int(11).)
140 Returns the current value of PrincipalType.
141 (In the database, PrincipalType is stored as varchar(25).)
145 =head2 SetPrincipalType VALUE
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).)
158 Returns the current value of PrincipalId.
159 (In the database, PrincipalId is stored as int(11).)
163 =head2 SetPrincipalId VALUE
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).)
176 Returns the current value of RightName.
177 (In the database, RightName is stored as varchar(25).)
181 =head2 SetRightName VALUE
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).)
194 Returns the current value of ObjectType.
195 (In the database, ObjectType is stored as varchar(25).)
199 =head2 SetObjectType VALUE
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).)
212 Returns the current value of ObjectId.
213 (In the database, ObjectId is stored as int(11).)
217 =head2 SetObjectId VALUE
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).)
230 Returns the current value of DelegatedBy.
231 (In the database, DelegatedBy is stored as int(11).)
235 =head2 SetDelegatedBy VALUE
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).)
248 Returns the current value of DelegatedFrom.
249 (In the database, DelegatedFrom is stored as int(11).)
253 =head2 SetDelegatedFrom VALUE
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).)
265 sub _CoreAccessible {
269 {read => 1, type => 'int(11)', default => ''},
271 {read => 1, write => 1, type => 'varchar(25)', default => ''},
273 {read => 1, write => 1, type => 'int(11)', default => '0'},
275 {read => 1, write => 1, type => 'varchar(25)', default => ''},
277 {read => 1, write => 1, type => 'varchar(25)', default => ''},
279 {read => 1, write => 1, type => 'int(11)', default => '0'},
281 {read => 1, write => 1, type => 'int(11)', default => '0'},
283 {read => 1, write => 1, type => 'int(11)', default => '0'},
289 eval "require RT::ACE_Overlay";
290 if ($@ && $@ !~ qr{^Can't locate RT/ACE_Overlay.pm}) {
294 eval "require RT::ACE_Vendor";
295 if ($@ && $@ !~ qr{^Can't locate RT/ACE_Vendor.pm}) {
299 eval "require RT::ACE_Local";
300 if ($@ && $@ !~ qr{^Can't locate RT/ACE_Local.pm}) {
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.
313 These overlay files can contain new subs or subs to replace existing subs in this module.
315 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
317 no warnings qw(redefine);
319 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
321 RT::ACE_Overlay, RT::ACE_Vendor, RT::ACE_Local