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