23 |
|
# restore(location) : restore data from file location |
24 |
|
# meta() : return a description string of the area |
25 |
|
# addconfigitem(url) : add a new item to the area |
26 |
+ |
# storeconfigobject(confiItemobj) : store a ready made ConfigItem in the local |
27 |
+ |
# area |
28 |
|
# configitem(@keys) : return a list of fig items that match |
29 |
|
# the keys - all if left blank |
30 |
|
# parentstore() : set/return the parent ObjectStore |
75 |
|
$self->addtag("download","use",\&Use_download_Start,$self, |
76 |
|
"", $self, "",$self); |
77 |
|
$self->addurltags("setup"); |
78 |
+ |
$self->addurltags("setup_tools"); |
79 |
|
$self->addtag("setup_tools","use",\&Use_Start,$self, "", $self, "",$self); |
80 |
|
$self->addtag("setup","structure",\&Structure_Start,$self, |
81 |
|
"", $self, "",$self); |
93 |
|
$self->config()->store($area,"BaseArea"); |
94 |
|
} |
95 |
|
else { |
96 |
< |
($area)=$self->config()->restore("BaseArea"); |
96 |
> |
($area)=$self->config()->find("BaseArea"); |
97 |
|
} |
98 |
|
return $area; |
99 |
|
} |
183 |
|
if ( ! defined $self->location(@_) ) { |
184 |
|
$self->error("Unable to locate the top of local configuration area"); |
185 |
|
} |
186 |
< |
print "Found top ".$self->location()."\n"; |
186 |
> |
$self->verbose("Found top ".$self->location()); |
187 |
|
$self->_setupstore(); |
188 |
< |
$self->restore($self->location()."/".$self->{admindir}. |
189 |
< |
"/ConfigArea.dat"); |
188 |
> |
my $infofile=$self->location()."/".$self->{admindir}."/ConfigArea.dat"; |
189 |
> |
if ( -e $infofile ) { |
190 |
> |
$self->restore($infofile); |
191 |
> |
} |
192 |
> |
else { |
193 |
> |
$self->error("Area corrupted - cannot find $infofile"); |
194 |
> |
} |
195 |
|
} |
196 |
|
|
197 |
|
sub parentconfig { |
342 |
|
# $self->config()->storepolicy("local"); |
343 |
|
} |
344 |
|
|
345 |
+ |
sub storeconfigobject { |
346 |
+ |
my $self=shift; |
347 |
+ |
my $obj=shift; |
348 |
+ |
$obj->save($self->config()); |
349 |
+ |
} |
350 |
+ |
|
351 |
|
sub downloadtotop { |
352 |
|
my $self=shift; |
353 |
|
my $url=shift; |