xref: /AOO41X/main/solenv/bin/modules/SourceConfigHelper.pm (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir#*************************************************************************
29*cdf0e10cSrcweir#
30*cdf0e10cSrcweir# SourceConfigHelper - Perl extension for parsing general info databases
31*cdf0e10cSrcweir#
32*cdf0e10cSrcweir# usage: see below
33*cdf0e10cSrcweir#
34*cdf0e10cSrcweir#*************************************************************************
35*cdf0e10cSrcweir
36*cdf0e10cSrcweirpackage SourceConfigHelper;
37*cdf0e10cSrcweir
38*cdf0e10cSrcweiruse strict;
39*cdf0e10cSrcweir
40*cdf0e10cSrcweiruse RepositoryHelper;
41*cdf0e10cSrcweiruse SourceConfig;
42*cdf0e10cSrcweiruse Cwd qw (cwd);
43*cdf0e10cSrcweiruse Carp;
44*cdf0e10cSrcweir
45*cdf0e10cSrcweirmy $debug = 0;
46*cdf0e10cSrcweirmy @source_config_list; # array of sourceconfig objects
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir#-----------------------------------------------------------------------
49*cdf0e10cSrcweir#	Constants
50*cdf0e10cSrcweir#-----------------------------------------------------------------------
51*cdf0e10cSrcweir
52*cdf0e10cSrcweiruse constant SOURCE_CONFIG_NONE => 0;
53*cdf0e10cSrcweiruse constant SOURCE_CONFIG_CURRENT_FIRST => 1;
54*cdf0e10cSrcweiruse constant SOURCE_CONFIG_ENVIRONMENT_FIRST => 2;
55*cdf0e10cSrcweiruse constant SOURCE_CONFIG_CURRENT_ONLY => 3;
56*cdf0e10cSrcweiruse constant SOURCE_CONFIG_ENVIRONMENT_ONLY => 4;
57*cdf0e10cSrcweir
58*cdf0e10cSrcweiruse constant SOURCE_CONFIG_DEFAULT => SOURCE_CONFIG_CURRENT_FIRST;
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir#####  profiling #####
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir##### ctor #####
63*cdf0e10cSrcweir
64*cdf0e10cSrcweirsub new {
65*cdf0e10cSrcweir    my $proto = shift;
66*cdf0e10cSrcweir    my $class = ref($proto) || $proto;
67*cdf0e10cSrcweir    my $init_action = shift;
68*cdf0e10cSrcweir    my $self = {};
69*cdf0e10cSrcweir    my $SourceConfigCurrent;
70*cdf0e10cSrcweir    my $SourceConfigEnvironment;
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir    $init_action = SOURCE_CONFIG_DEFAULT if (!defined ($init_action));
73*cdf0e10cSrcweir    if (!eval ($init_action) or ($init_action < SOURCE_CONFIG_NONE) or ($init_action > SOURCE_CONFIG_ENVIRONMENT_ONLY)) {
74*cdf0e10cSrcweir		croak("wrong initial parameter: $init_action\n");
75*cdf0e10cSrcweir    }
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir    if ($init_action != SOURCE_CONFIG_NONE) {
78*cdf0e10cSrcweir		my $repositoryHash_ref = {};
79*cdf0e10cSrcweir		if ($init_action != SOURCE_CONFIG_ENVIRONMENT_ONLY) {
80*cdf0e10cSrcweir			my $initial_directory = cwd();
81*cdf0e10cSrcweir			my $result = is_repository($initial_directory, $repositoryHash_ref);
82*cdf0e10cSrcweir			if ($result) {
83*cdf0e10cSrcweir				$SourceConfigCurrent = SourceConfig->new($repositoryHash_ref->{REPOSITORY_ROOT});
84*cdf0e10cSrcweir			}
85*cdf0e10cSrcweir		}
86*cdf0e10cSrcweir		if ($init_action != SOURCE_CONFIG_CURRENT_ONLY) {
87*cdf0e10cSrcweir		    my $source_config = $ENV{SOURCE_ROOT_DIR} . '/' . SourceConfig::SOURCE_CONFIG_FILE_NAME;
88*cdf0e10cSrcweir		    if (-f $source_config) {
89*cdf0e10cSrcweir				$SourceConfigEnvironment = SourceConfig->new($source_config);
90*cdf0e10cSrcweir			}
91*cdf0e10cSrcweir		}
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir		# fill array
94*cdf0e10cSrcweir
95*cdf0e10cSrcweir		if (($init_action == SOURCE_CONFIG_CURRENT_FIRST) or ($init_action == SOURCE_CONFIG_CURRENT_ONLY)) {
96*cdf0e10cSrcweir			if (defined ($SourceConfigCurrent)) {
97*cdf0e10cSrcweir				push (@source_config_list, $SourceConfigCurrent);
98*cdf0e10cSrcweir			}
99*cdf0e10cSrcweir			if ($init_action == SOURCE_CONFIG_CURRENT_FIRST) {
100*cdf0e10cSrcweir				if (defined ($SourceConfigEnvironment)) {
101*cdf0e10cSrcweir					push (@source_config_list, $SourceConfigEnvironment);
102*cdf0e10cSrcweir				}
103*cdf0e10cSrcweir			}
104*cdf0e10cSrcweir		}
105*cdf0e10cSrcweir		elsif (($init_action == SOURCE_CONFIG_ENVIRONMENT_FIRST) or ($init_action == SOURCE_CONFIG_ENVIRONMENT_ONLY)) {
106*cdf0e10cSrcweir			if (defined ($SourceConfigEnvironment)) {
107*cdf0e10cSrcweir				push (@source_config_list, $SourceConfigEnvironment);
108*cdf0e10cSrcweir			}
109*cdf0e10cSrcweir			if ($init_action == SOURCE_CONFIG_ENVIRONMENT_FIRST) {
110*cdf0e10cSrcweir				if (defined ($SourceConfigCurrent)) {
111*cdf0e10cSrcweir					push (@source_config_list, $SourceConfigCurrent);
112*cdf0e10cSrcweir				}
113*cdf0e10cSrcweir			}
114*cdf0e10cSrcweir		}
115*cdf0e10cSrcweir    }
116*cdf0e10cSrcweir
117*cdf0e10cSrcweir    $self->{SOURCE_CONFIG_LIST} = \@source_config_list;
118*cdf0e10cSrcweir
119*cdf0e10cSrcweir    bless($self, $class);
120*cdf0e10cSrcweir    return $self;
121*cdf0e10cSrcweir}
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir##### methods #####
124*cdf0e10cSrcweir
125*cdf0e10cSrcweir############################################################################################
126*cdf0e10cSrcweir
127*cdf0e10cSrcweirsub add_SourceConfig {
128*cdf0e10cSrcweir    my $self = shift;
129*cdf0e10cSrcweir    my $source_config = shift;
130*cdf0e10cSrcweir    push (@{$self->{SOURCE_CONFIG_LIST}}, $source_config);
131*cdf0e10cSrcweir}
132*cdf0e10cSrcweir
133*cdf0e10cSrcweir############################################################################################
134*cdf0e10cSrcweir
135*cdf0e10cSrcweirsub get_SourceConfigList {
136*cdf0e10cSrcweir	my $self = shift;
137*cdf0e10cSrcweir	return @{$self->{SOURCE_CONFIG_LIST}};
138*cdf0e10cSrcweir}
139*cdf0e10cSrcweir
140*cdf0e10cSrcweir############################################################################################
141*cdf0e10cSrcweir
142*cdf0e10cSrcweirsub has_SourceConfig {
143*cdf0e10cSrcweir	my $self = shift;
144*cdf0e10cSrcweir	my $result = 0;
145*cdf0e10cSrcweir	my $count = @{$self->{SOURCE_CONFIG_LIST}};
146*cdf0e10cSrcweir	$result = 1 if ($count > 0);
147*cdf0e10cSrcweir	return $result;
148*cdf0e10cSrcweir}
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir############################################################################################
151*cdf0e10cSrcweir
152*cdf0e10cSrcweirsub get_module_path {
153*cdf0e10cSrcweir	my $self = shift;
154*cdf0e10cSrcweir	my $module = shift;
155*cdf0e10cSrcweir	my $function = \&SourceConfig::get_module_path;
156*cdf0e10cSrcweir	my $result;
157*cdf0e10cSrcweir	$result = $self->get_StringResult ($function, $module);
158*cdf0e10cSrcweir	return $result;
159*cdf0e10cSrcweir}
160*cdf0e10cSrcweir
161*cdf0e10cSrcweir############################################################################################
162*cdf0e10cSrcweir
163*cdf0e10cSrcweirsub get_active_modules {
164*cdf0e10cSrcweir	my $self = shift;
165*cdf0e10cSrcweir	my $parameter; # empty
166*cdf0e10cSrcweir	my $function = \&SourceConfig::get_active_modules;
167*cdf0e10cSrcweir	my $array_ref;
168*cdf0e10cSrcweir	$array_ref = $self->get_ArrayResult ($function, $parameter);
169*cdf0e10cSrcweir	return @$array_ref;
170*cdf0e10cSrcweir}
171*cdf0e10cSrcweir
172*cdf0e10cSrcweir############################################################################################
173*cdf0e10cSrcweir
174*cdf0e10cSrcweirsub get_repositories {
175*cdf0e10cSrcweir	my $self = shift;
176*cdf0e10cSrcweir	my $parameter; # empty
177*cdf0e10cSrcweir	my $function = \&SourceConfig::get_repositories;
178*cdf0e10cSrcweir	my $array_ref;
179*cdf0e10cSrcweir	$array_ref = $self->get_ArrayResult ($function, $parameter);
180*cdf0e10cSrcweir	return @$array_ref;
181*cdf0e10cSrcweir}
182*cdf0e10cSrcweir
183*cdf0e10cSrcweir############################################################################################
184*cdf0e10cSrcweir
185*cdf0e10cSrcweirsub get_module_repository {
186*cdf0e10cSrcweir	my $self = shift;
187*cdf0e10cSrcweir	my $module = shift;
188*cdf0e10cSrcweir	my $function = \&SourceConfig::get_module_repository;
189*cdf0e10cSrcweir	my $result;
190*cdf0e10cSrcweir	$result = $self->get_StringResult ($function, $module);
191*cdf0e10cSrcweir	return $result;
192*cdf0e10cSrcweir}
193*cdf0e10cSrcweir
194*cdf0e10cSrcweir############################################################################################
195*cdf0e10cSrcweir
196*cdf0e10cSrcweirsub is_active {
197*cdf0e10cSrcweir	my $self = shift;
198*cdf0e10cSrcweir	my $module = shift;
199*cdf0e10cSrcweir	my $function = \&SourceConfig::is_active;
200*cdf0e10cSrcweir	my $result_ref;
201*cdf0e10cSrcweir	my $is_active = 0;
202*cdf0e10cSrcweir	$result_ref = $self->get_ResultOfList ($function, $module);
203*cdf0e10cSrcweir	my $count = @$result_ref;
204*cdf0e10cSrcweir	if ($count>0) {
205*cdf0e10cSrcweir	    foreach my $active (@$result_ref) {
206*cdf0e10cSrcweir			if ($active) {
207*cdf0e10cSrcweir				$is_active = $active;
208*cdf0e10cSrcweir			}
209*cdf0e10cSrcweir	    }
210*cdf0e10cSrcweir	}
211*cdf0e10cSrcweir	return $is_active;
212*cdf0e10cSrcweir}
213*cdf0e10cSrcweir
214*cdf0e10cSrcweir##### private methods #####
215*cdf0e10cSrcweir
216*cdf0e10cSrcweir############################################################################################
217*cdf0e10cSrcweir#
218*cdf0e10cSrcweir# is_repository () : check if the directory is a valid repository
219*cdf0e10cSrcweir#
220*cdf0e10cSrcweir# input: - directory
221*cdf0e10cSrcweir#        - hash reference, where the output will be stored
222*cdf0e10cSrcweir#
223*cdf0e10cSrcweir# output: 0 = FALSE, the directory is no valid repository
224*cdf0e10cSrcweir#         1 = TRUE, the repository root can be found in $repositoryHash_ref->{REPOSITORY_ROOT}
225*cdf0e10cSrcweir#
226*cdf0e10cSrcweir############################################################################################
227*cdf0e10cSrcweir
228*cdf0e10cSrcweirsub is_repository {
229*cdf0e10cSrcweir	my $directory = shift;
230*cdf0e10cSrcweir    my $repositoryHash_ref = shift;
231*cdf0e10cSrcweir    $repositoryHash_ref->{INITIAL_DIRECTORY} = $directory;
232*cdf0e10cSrcweir	$repositoryHash_ref->{REPOSITORY_ROOT} = undef;
233*cdf0e10cSrcweir	$repositoryHash_ref->{REPOSITORY_NAME} = undef;
234*cdf0e10cSrcweir    my $result = RepositoryHelper::search_via_build_lst($repositoryHash_ref);
235*cdf0e10cSrcweir    chdir $repositoryHash_ref->{INITIAL_DIRECTORY};
236*cdf0e10cSrcweir    if (!$result) {
237*cdf0e10cSrcweir        $result = RepositoryHelper::search_for_hg($repositoryHash_ref);
238*cdf0e10cSrcweir    }
239*cdf0e10cSrcweir    return $result;
240*cdf0e10cSrcweir}
241*cdf0e10cSrcweir
242*cdf0e10cSrcweir############################################################################################
243*cdf0e10cSrcweir#
244*cdf0e10cSrcweir# get_ResultOfList(): give back an array reference from all SourceConfig Objects results
245*cdf0e10cSrcweir#
246*cdf0e10cSrcweir# input: - function : reference to the called function of each SourceConfig Object
247*cdf0e10cSrcweir#        - parameter : parameter for the called function
248*cdf0e10cSrcweir#
249*cdf0e10cSrcweir# output: result : array of all results
250*cdf0e10cSrcweir#
251*cdf0e10cSrcweir############################################################################################
252*cdf0e10cSrcweir
253*cdf0e10cSrcweirsub get_ResultOfList {
254*cdf0e10cSrcweir	my $self = shift;
255*cdf0e10cSrcweir	my $function = shift;
256*cdf0e10cSrcweir	my $parameter = shift;
257*cdf0e10cSrcweir	my @result;
258*cdf0e10cSrcweir	foreach my $source_config (@{$self->{SOURCE_CONFIG_LIST}}) {
259*cdf0e10cSrcweir		push (@result, &$function ($source_config, $parameter));
260*cdf0e10cSrcweir	}
261*cdf0e10cSrcweir	return \@result;
262*cdf0e10cSrcweir}
263*cdf0e10cSrcweir
264*cdf0e10cSrcweir############################################################################################
265*cdf0e10cSrcweir#
266*cdf0e10cSrcweir# get_StringResult(): give back the first defined result from all SourceConfig Objects
267*cdf0e10cSrcweir#
268*cdf0e10cSrcweir# input: - function : reference to the called function of each SourceConfig Object
269*cdf0e10cSrcweir#        - parameter : parameter for the called function
270*cdf0e10cSrcweir#
271*cdf0e10cSrcweir# output: result : scalar variable (string), undef if no result
272*cdf0e10cSrcweir#
273*cdf0e10cSrcweir############################################################################################
274*cdf0e10cSrcweir
275*cdf0e10cSrcweirsub get_StringResult {
276*cdf0e10cSrcweir	my $self = shift;
277*cdf0e10cSrcweir	my $function = shift;
278*cdf0e10cSrcweir	my $parameter = shift;
279*cdf0e10cSrcweir	my $result_ref;
280*cdf0e10cSrcweir	$result_ref = $self->get_ResultOfList ($function, $parameter);
281*cdf0e10cSrcweir	my $count = @$result_ref;
282*cdf0e10cSrcweir	if ($count>0) {
283*cdf0e10cSrcweir		my $value;
284*cdf0e10cSrcweir		my $i = 0;
285*cdf0e10cSrcweir		while (($i < $count) and !defined ($value)) { # search the first defined result
286*cdf0e10cSrcweir			$value = $$result_ref[$i];
287*cdf0e10cSrcweir			$i++;
288*cdf0e10cSrcweir	    }
289*cdf0e10cSrcweir		return $value;
290*cdf0e10cSrcweir	}
291*cdf0e10cSrcweir	return undef;
292*cdf0e10cSrcweir}
293*cdf0e10cSrcweir
294*cdf0e10cSrcweir############################################################################################
295*cdf0e10cSrcweir#
296*cdf0e10cSrcweir# get_StringResult(): give back a sorted and uniqe array reference of the results
297*cdf0e10cSrcweir#                     from all SourceConfig Objects
298*cdf0e10cSrcweir#
299*cdf0e10cSrcweir# input: - function : reference to the called function of each SourceConfig Object
300*cdf0e10cSrcweir#        - parameter : parameter for the called function
301*cdf0e10cSrcweir#
302*cdf0e10cSrcweir# output: result : sorted and uniqe array reference
303*cdf0e10cSrcweir#
304*cdf0e10cSrcweir############################################################################################
305*cdf0e10cSrcweir
306*cdf0e10cSrcweirsub get_ArrayResult {
307*cdf0e10cSrcweir	my $self = shift;
308*cdf0e10cSrcweir	my $function = shift;
309*cdf0e10cSrcweir	my $parameter = shift;
310*cdf0e10cSrcweir	my $result_ref;
311*cdf0e10cSrcweir	my @modules;
312*cdf0e10cSrcweir	$result_ref = $self->get_ResultOfList ($function, $parameter);
313*cdf0e10cSrcweir	my $count = @$result_ref;
314*cdf0e10cSrcweir	if ($count>0) {
315*cdf0e10cSrcweir	    my %moduleHash;
316*cdf0e10cSrcweir	    foreach my $module (@$result_ref) {
317*cdf0e10cSrcweir			$moduleHash{$module}++;
318*cdf0e10cSrcweir	    }
319*cdf0e10cSrcweir	    @modules = sort keys %moduleHash;
320*cdf0e10cSrcweir	}
321*cdf0e10cSrcweir	return \@modules;
322*cdf0e10cSrcweir}
323*cdf0e10cSrcweir
324*cdf0e10cSrcweir ##### finish #####
325*cdf0e10cSrcweir
326*cdf0e10cSrcweir1; # needed by use or require
327*cdf0e10cSrcweir
328*cdf0e10cSrcweir__END__
329*cdf0e10cSrcweir
330*cdf0e10cSrcweir=head1 NAME
331*cdf0e10cSrcweir
332*cdf0e10cSrcweirSourceConfigHelper - Perl extension for handling with SourceConfigObjetcs
333*cdf0e10cSrcweir
334*cdf0e10cSrcweir=head1 SYNOPSIS
335*cdf0e10cSrcweir
336*cdf0e10cSrcweir    # example that will read source_config file and return the active repositories
337*cdf0e10cSrcweir
338*cdf0e10cSrcweir    use SourceConfigHelper;
339*cdf0e10cSrcweir
340*cdf0e10cSrcweir    # Create a new instance:
341*cdf0e10cSrcweir    $a = SourceConfigHelper->new();
342*cdf0e10cSrcweir
343*cdf0e10cSrcweir    # Get repositories for the actual workspace:
344*cdf0e10cSrcweir    $a->get_repositories();
345*cdf0e10cSrcweir
346*cdf0e10cSrcweir=head1 DESCRIPTION
347*cdf0e10cSrcweir
348*cdf0e10cSrcweirSourceConfigHelper is a perl extension to handle more than one objects of SourceConfig
349*cdf0e10cSrcweirto set up a search order for modules.
350*cdf0e10cSrcweir
351*cdf0e10cSrcweirMethods:
352*cdf0e10cSrcweir
353*cdf0e10cSrcweirSourceConfigHelper::new()
354*cdf0e10cSrcweir
355*cdf0e10cSrcweirCreates a new instance of SourceConfigHelper. Can be initialized by: default - empty or with a constant of search order. default: the source_config will be taken first from the current repository and second from the environment
356*cdf0e10cSrcweirPossible parameters are:
357*cdf0e10cSrcweirSourceConfigHelper::SOURCE_CONFIG_NONE - no SourceConfig Object will be created
358*cdf0e10cSrcweirSourceConfigHelper::SOURCE_CONFIG_CURRENT_FIRST - use the current repository first
359*cdf0e10cSrcweirSourceConfigHelper::SOURCE_CONFIG_ENVIRONMENT_FIRST - use the repository of the environment first
360*cdf0e10cSrcweirSourceConfigHelper::SOURCE_CONFIG_CURRENT_ONLY - use only the current repository
361*cdf0e10cSrcweirSourceConfigHelper::SOURCE_CONFIG_ENVIRONMENT_ONLY - use only the repository of the environment
362*cdf0e10cSrcweir
363*cdf0e10cSrcweirSourceConfigHelper::get_repositories()
364*cdf0e10cSrcweir
365*cdf0e10cSrcweirReturns sorted list of active repositories for the actual workspace
366*cdf0e10cSrcweir
367*cdf0e10cSrcweirSourceConfigHelper::get_active_modules()
368*cdf0e10cSrcweir
369*cdf0e10cSrcweirReturns a sorted list of active modules
370*cdf0e10cSrcweir
371*cdf0e10cSrcweirSourceConfigHelper::get_all_modules()
372*cdf0e10cSrcweir
373*cdf0e10cSrcweirReturns sorted list of all modules in active repositories.
374*cdf0e10cSrcweir
375*cdf0e10cSrcweirSourceConfigHelper::get_module_path($module)
376*cdf0e10cSrcweir
377*cdf0e10cSrcweirReturns absolute module path. If the module is not active or don't exists, "undef" will be returned.
378*cdf0e10cSrcweir
379*cdf0e10cSrcweirSourceConfigHelper::get_module_repository($module)
380*cdf0e10cSrcweir
381*cdf0e10cSrcweirReturns the module's repository. If the module is not active or don't exists, "undef" will be returned.
382*cdf0e10cSrcweir
383*cdf0e10cSrcweirSourceConfigHelper::is_active()
384*cdf0e10cSrcweir
385*cdf0e10cSrcweirReturns 1 (TRUE) if a module is active
386*cdf0e10cSrcweirReturns 0 (FALSE) if a module is not active
387*cdf0e10cSrcweir
388*cdf0e10cSrcweirSourceConfigHelper::add_SourceConfig($SourceConfigObject)
389*cdf0e10cSrcweir
390*cdf0e10cSrcweirAdd the SourceConfigObject to the end of the list
391*cdf0e10cSrcweir
392*cdf0e10cSrcweirSourceConfigHelper::get_SourceConfigList()
393*cdf0e10cSrcweir
394*cdf0e10cSrcweirReturn an array of SourceConfigObjects
395*cdf0e10cSrcweir
396*cdf0e10cSrcweirSourceConfigHelper::has_SourceConfig()
397*cdf0e10cSrcweir
398*cdf0e10cSrcweirReturns 1 (TRUE) if one or more SourceConfig Objects is in the list
399*cdf0e10cSrcweirReturns 0 (FALSE) if no SourceConfig Object is in the list (can happen if there is no valid repository)
400*cdf0e10cSrcweir
401*cdf0e10cSrcweir=head2 EXPORT
402*cdf0e10cSrcweir
403*cdf0e10cSrcweirSourceConfigHelper::new()
404*cdf0e10cSrcweirSourceConfigHelper::get_repositories()
405*cdf0e10cSrcweirSourceConfigHelper::get_active_modules()
406*cdf0e10cSrcweirSourceConfigHelper::get_all_modules()
407*cdf0e10cSrcweirSourceConfigHelper::get_module_path($module)
408*cdf0e10cSrcweirSourceConfigHelper::get_module_repository($module)
409*cdf0e10cSrcweirSourceConfigHelper::is_active($module)
410*cdf0e10cSrcweirSourceConfigHelper::add_SourceConfig($SourceConfigObject)
411*cdf0e10cSrcweirSourceConfigHelper::get_SourceConfigList()
412*cdf0e10cSrcweirSourceConfigHelper::has_SourceConfig()
413*cdf0e10cSrcweir
414*cdf0e10cSrcweir=head1 AUTHOR
415*cdf0e10cSrcweir
416*cdf0e10cSrcweirKurt Zenker, kz@openoffice.org
417*cdf0e10cSrcweir
418*cdf0e10cSrcweir=head1 SEE ALSO
419*cdf0e10cSrcweir
420*cdf0e10cSrcweirperl(1).
421*cdf0e10cSrcweir
422*cdf0e10cSrcweir=cut 
423