X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=6f5aedc350792cad3547cb26681259692cf61606;hp=dce2d2a44411bfb143939413ca3467100965c192;hb=90393980e5f2859ee1e186fa461f48f5129e803e;hpb=feef0e4c2b4bd6b776b25f5a1bd6fdbf63fd08b2 diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index dce2d2a44..6f5aedc35 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -10,6 +10,9 @@ use FS::part_svc; use FS::part_export_option; use FS::export_svc; +#for export modules, though they should probably just use it themselves +use FS::queue; + @ISA = qw( FS::option_Common ); @EXPORT_OK = qw(export_info); @@ -47,6 +50,8 @@ fields are currently supported: =item exportnum - primary key +=item exportname - Descriptive name + =item machine - Machine name =item exporttype - Export type @@ -156,6 +161,7 @@ sub check { my $self = shift; my $error = $self->ut_numbern('exportnum') + || $self->ut_textn('exportname') || $self->ut_domain('machine') || $self->ut_alpha('exporttype') ; @@ -223,6 +229,17 @@ sub export_svc { qsearch('export_svc', { 'exportnum' => $self->exportnum } ); } +=item export_device + +Returns a list of associated FS::export_device records. + +=cut + +sub export_device { + my $self = shift; + qsearch('export_device', { 'exportnum' => $self->exportnum } ); +} + =item part_export_option Returns all options as FS::part_export_option objects (see @@ -356,6 +373,23 @@ sub _export_unsuspend { $self->_export_replace( $svc_x, $old ); } +=item export_links SVC_OBJECT ARRAYREF + +Adds a list of web elements to ARRAYREF specific to this export and SVC_OBJECT. +The elements are displayed in the UI to lead the the operator to external +configuration, monitoring, and similar tools. + +=item export_getsettings SVC_OBJECT SETTINGS_HASHREF DEFAUTS_HASHREF + +Adds a hashref of settings to SETTINGSREF specific to this export and +SVC_OBJECT. The elements can be displayed in the UI on the service view. + +DEFAULTSREF is a hashref with the same keys where true values indicate the +setting is a default (and thus can be displayed in the UI with less emphasis, +or hidden by default). + +=cut + =back =head1 SUBROUTINES @@ -400,6 +434,7 @@ sub export_info { # ''; #} +#false laziness w/part_pkg & cdr foreach my $INC ( @INC ) { foreach my $file ( glob("$INC/FS/part_export/*.pm") ) { warn "attempting to load export info from $file\n" if $DEBUG;