| 1 | package SIAM::Contract; | ||
| 2 | |||
| 3 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | ▶ | use base 'SIAM::Object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | use SIAM::Service; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | SIAM::Contract - Contract object class | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | my $all_contracts = $siam->get_all_contracts(); | ||
| 17 | my $user_contracts = | ||
| 18 | $siam->get_contracts_by_user_privilege($user, 'ViewContract'); | ||
| 19 | |||
| 20 | my $services = $contract->get_services(); | ||
| 21 | |||
| 22 | =head1 METHODS | ||
| 23 | |||
| 24 | =head2 get_services | ||
| 25 | |||
| 26 | Returns arrayref with SIAM::Service objects | ||
| 27 | |||
| 28 | =cut | ||
| 29 | |||
| 30 | sub get_services | ||
| 31 | 1 | ▶ | { |
|
Subroutine
get_services: called CC=1 SCAR=0.0
Pod
documented
| |||
| 32 | 1 | my $self = shift; | |
| 33 | 1 | return $self->get_contained_objects('SIAM::Service'); | |
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | # mandatory attributes | ||
| 38 | |||
| 39 | 3 | my $mandatory_attributes = | |
| 40 | [ 'siam.contract.inventory_id', | ||
| 41 | 'siam.contract.customer_name', | ||
| 42 | 'siam.contract.customer_id',]; | ||
| 43 | |||
| 44 | sub _mandatory_attributes | ||
| 45 | 8 | ▶ | { |
|
Subroutine
_mandatory_attributes: called CC=1 SCAR=0.0
| |||
| 46 | 8 | return $mandatory_attributes; | |
| 47 | } | ||
| 48 | |||
| 49 | sub _manifest_attributes | ||
| 50 | 1 | ▶ | { |
|
Subroutine
_manifest_attributes: called CC=1 SCAR=0.0
| |||
| 51 | 1 | my $ret = []; | |
| 52 | 1 | push(@{$ret}, @{$mandatory_attributes}, | |
| 53 | 1 | @{ SIAM::Service->_manifest_attributes() }); | |
| 54 | |||
| 55 | 1 | return $ret; | |
| 56 | |||
| 57 | } | ||
| 58 | |||
| 59 | 3 | 1; | |
| 60 | |||
| 61 | # Local Variables: | ||
| 62 | # mode: cperl | ||
| 63 | # indent-tabs-mode: nil | ||
| 64 | # cperl-indent-level: 4 | ||
| 65 | # cperl-continued-statement-offset: 4 | ||
| 66 | # cperl-continued-brace-offset: -4 | ||
| 67 | # cperl-brace-offset: 0 | ||
| 68 | # cperl-label-offset: -2 | ||
| 69 | # End: | ||