| 185 | | # my $tableInfo = $self->tableInfo(); |
| 186 | | if (not $tableInfo->{consolidate}) { |
| 187 | | push @urls, [ domain => $tableInfo->{name}, raw => $rawUrl, ]; |
| 188 | | next; |
| | 186 | |
| | 187 | if (not $tableInfo->{consolidate}) { |
| | 188 | push @urls, [ domain => $tableInfo->{name}, raw => $rawUrl, ]; |
| | 189 | next; |
| | 190 | } |
| | 191 | |
| | 192 | my @consolidateTables = keys %{ $tableInfo->{consolidate} }; |
| | 193 | |
| | 194 | |
| | 195 | my @reportComposites = grep { |
| | 196 | ((ref $_) =~ m/::Report::/) and |
| | 197 | ($self->_compositeUsesDbTable($_, \@consolidateTables) ) |
| | 198 | } @{ $self->composites }; |
| | 199 | |
| | 200 | |
| | 201 | |
| | 202 | (ref $self) =~ m/::(.*?)$/;; |
| | 203 | my $urlModName= $1; |
| | 204 | |
| | 205 | my $first = 1; |
| | 206 | foreach my $comp (@reportComposites) { |
| | 207 | my $compName = $comp->name(); |
| | 208 | my @compUrls =( |
| | 209 | domain => $tableInfo->{name}, |
| | 210 | summary => "/ebox/$urlModName/Composite/$compName", |
| | 211 | ); |
| | 212 | if ($first) { |
| | 213 | push @compUrls, (raw => $rawUrl ); |
| | 214 | $first =0; |
| | 215 | } |
| | 216 | else { |
| | 217 | push @compUrls, ( raw => undef); |
| | 218 | } |
| | 219 | |
| | 220 | push @urls, \@compUrls; |
| | 221 | } |
| | 222 | |
| | 223 | if (not @reportComposites) { |
| | 224 | push @urls, [ domain => $tableInfo->{name}, raw => $rawUrl, ]; |
| | 225 | |
| | 226 | } |
| | 227 | |
| | 228 | |
| | 229 | |
| | 230 | } |
| | 231 | |
| | 232 | return \@urls; |
| | 233 | } |
| | 234 | |
| | 235 | |
| | 236 | sub _compositeUsesDbTable |
| | 237 | { |
| | 238 | my ($self, $composite, $dbTables_r) = @_; |
| | 239 | |
| | 240 | my $usesDbTable = 0; |
| | 241 | foreach my $component (@{ $composite->components() } ) { |
| | 242 | if ($component->can('dbTableName')) { |
| | 243 | if ($component->dbTableName() eq any( @{ $dbTables_r } )) { |
| | 244 | $usesDbTable = 1; |
| | 245 | } |
| | 246 | |
| | 247 | last; |
| | 248 | } |
| 191 | | my @reportComposites = grep { |
| 192 | | (ref $_) =~ m/::Report::/; |
| 193 | | } @{ $self->composites }; |
| 194 | | |
| 195 | | (ref $self) =~ m/::(.*?)$/;; |
| 196 | | my $urlModName= $1; |
| 197 | | |
| 198 | | my $first = 1; |
| 199 | | foreach my $comp (@reportComposites) { |
| 200 | | my $compName = $comp->name(); |
| 201 | | my @compUrls =( |
| 202 | | domain => $tableInfo->{name}, |
| 203 | | summary => "/ebox/$urlModName/Composite/$compName", |
| 204 | | ); |
| 205 | | if ($first) { |
| 206 | | push @compUrls, (raw => $rawUrl ); |
| 207 | | $first =0; |
| 208 | | } |
| 209 | | else { |
| 210 | | push @compUrls, ( raw => undef); |
| 211 | | } |
| 212 | | |
| 213 | | push @urls, \@compUrls; |
| 214 | | } |
| 215 | | |
| 216 | | if (not @reportComposites) { |
| 217 | | push @urls, [ domain => $tableInfo->{name}, raw => $rawUrl, ]; |
| 218 | | |
| 219 | | } |
| 220 | | |
| 221 | | |
| 222 | | |
| 223 | | } |
| 224 | | |
| 225 | | |
| 226 | | |
| 227 | | |
| 228 | | |
| 229 | | return \@urls; |
| 230 | | } |
| 231 | | |
| | 251 | return $usesDbTable; |
| | 252 | } |