- Timestamp:
- 05/29/12 10:25:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm
r1014 r1023 22 22 23 23 =head1 FUNCTIONS 24 25 =cut 26 27 =head2 is_supported 28 29 If exists, must return true or false if the object is supported or not 24 30 25 31 =cut … … 136 142 } 137 143 144 =head2 attribute ($attribute) 145 146 Return L<LATMOS::Accounts::Bases::Attributes> object for C<$attribute> 147 148 =cut 149 138 150 sub attribute { 139 151 my ($self, $attribute) = @_; … … 141 153 my $attrinfo; 142 154 if (! ref $attribute) { 143 $attrinfo = $self-> base->get_attr_schema(144 $self-> type, $attribute145 )or return;155 $attrinfo = $self->_get_attr_schema( 156 $self->base)->{$attribute} 157 or return; 146 158 $attrinfo->{name} = $attribute; 147 159 } else { … … 211 223 return ref $res ? @{ $res } : ($res); 212 224 } 225 226 =head2 get_state ($state) 227 228 Return an on fly computed value 229 230 =cut 213 231 214 232 sub get_state { … … 241 259 } 242 260 261 =head2 queryformat ($fmt) 262 263 Return formated string according C<$fmt> 264 265 =cut 266 243 267 sub queryformat { 244 268 my ($self, $fmt) = @_; … … 263 287 =cut 264 288 289 =head2 check_allowed_values ($attr, $values) 290 291 Check if value C<$values> is allowed for attributes C<$attr> 292 293 =cut 294 265 295 sub check_allowed_values { 266 296 my ($self, $attr, $values) = @_; 267 297 $self->base->check_allowed_values($self->type, $attr, $values); 268 298 } 299 300 =head2 attr_allow_values ($attr) 301 302 Return allowed for attribute C<$attr> 303 304 =cut 269 305 270 306 sub attr_allow_values { … … 377 413 } 378 414 415 =head2 check_password ($password) 416 417 Check given password is secure using L<Crypt::Cracklib> 418 419 =cut 420 379 421 sub check_password { 380 422 my ( $self, $password ) = @_; … … 383 425 return fascist_check($password, $dictionary); 384 426 } 427 428 =head2 search ($base, @filter) 429 430 Search object matching C<@filter> 431 432 =cut 385 433 386 434 sub search { … … 444 492 } 445 493 494 =head2 attributes_summary ($base, $attribute) 495 496 Return list of values existing in base for C<$attribute> 497 498 =cut 446 499 447 500 sub attributes_summary { … … 464 517 } 465 518 519 =head2 find_next_numeric_id ($base, $field, $min, $max) 520 521 Find next free uniq id for attribute C<$field> 522 523 =cut 524 466 525 sub find_next_numeric_id { 467 526 my ($class, $base, $field, $min, $max) = @_; … … 491 550 } 492 551 552 =head2 text_dump ($handle, $options, $base) 553 554 Dump object into C<$handle> 555 556 =cut 557 493 558 sub text_dump { 494 559 my ($self, $handle, $options, $base) = @_; … … 496 561 return 1; 497 562 } 563 564 =head2 dump 565 566 Return dump for tihs object 567 568 =cut 498 569 499 570 sub dump { … … 550 621 __END__ 551 622 552 =head1 CANICALS FIELDS553 554 =head2 User class555 556 =head2 Group class557 623 558 624 =head1 SEE ALSO 559 625 560 Mention other useful documentation such as the documentation of 561 related modules or operating system documentation (such as man pages 562 in UNIX), or any relevant external documentation such as RFCs or 563 standards. 564 565 If you have a mailing list set up for your module, mention it here. 566 567 If you have a web site set up for your module, mention it here. 626 L<LATMOS::Accounts::Bases> 568 627 569 628 =head1 AUTHOR
Note: See TracChangeset
for help on using the changeset viewer.