Description
This method is the main method, which is executed automatically when the CustomizationController component is started. It holds the logic to identify which components have customized code, and stores the component list in the tCustomizedComponente temp-table.
PostCondition
The CustomizationController component is running in memory, and picked up information about all existing component customizations. These are stored in tCustomizedComponent.
PreCondition
The customizationcontroller is not active. The system is not aware of any existing customizations.
Parameters
oiReturnStatus | output | integer | |
Internal usage
BLF
program code (program1/customizationcontroller.p)
assign oiReturnStatus = -98.
empty temp-table tCustomizedComponent.
/* check if "/customcode" folders can be found */
assign vcPropath = propath
vcPropath = replace(vcPropath,";":U,",":U).
if opsys = "UNIX":U
then assign vcPropath = replace(vcPropath,":":U,",":U).
do viA = 1 to num-entries(vcPropath):
assign vcEntry = entry(viA, vcPropath).
file-info:file-name = vcEntry + "/customcode":U.
if file-info:full-pathname <> ?
then do:
assign vcDir = file-info:full-pathname.
/*check for customizations*/
input from os-dir (vcdir).
repeat on stop undo, leave:
import vcFileName vcFullPath vcFileType.
if vcFileType = "F":U
then if entry (num-entries(vcFileName,"."),vcFileName,".") = "p"
or entry (num-entries(vcFileName,"."),vcFileName,".") = "r"
then do:
vcFullPath = replace (vcFullPath,"~\","/").
create tCustomizedComponent.
assign tCustomizedComponent.tcComponentName = entry (1,entry(num-entries(vcFullPath,"/"),vcFullPath,"/"),".")
tCustomizedComponent.tcFullPath = vcFullPath
tCustomizedComponent.tiPathEntry = viA
tCustomizedComponent.tlIsValid = ?.
end.
end. /*repeat:*/
input close.
end. /*if file-info:full-pathname <> ?*/
end. /*do viFcCount1 = 1 to num-entries(propath):*/
if oiReturnStatus = -98
then assign oiReturnStatus = 0.