home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1995
- #
- # File: @(#)files.tcl /main/hindenburg/1
- # Author: Harm Leijendeckers
- # Description: Report on file versions
- # Usage in: SystemVersion and higher
- #
- #---------------------------------------------------------------------------
- # SccsId = @(#)files.tcl /main/hindenburg/1 11 Mar 1997 Copyright 1995 Cadre Technologies Inc.
-
-
- Class ReportFiles : {ReportBase} {
- constructor
- method systemReport
- method doNameAndType
- }
-
-
- constructor ReportFiles {class this} {
- set this [ReportBase::constructor $class $this]
- $this reportName Files
- return $this
- }
-
-
- method ReportFiles::systemReport {this} {
- set allFileVersions [query "file.type != cdm" \
- [[$this systemV] localFileVersions]]
- set allExternalLinks [[$this systemV] externalLinks]
- if { ![llength $allFileVersions] && ![llength $allExternalLinks] } {
- return 0
- }
-
- set report [$this report]
-
- $report header {
- [$this report] print File 31
- [$this report] print Type 11
- [$this report] print Version 26
- [$this report] print Status 11
- [$this report] print Corporate 10
- [$this report] print Link line
- [$this report] line
- }
-
- foreach fileV [osort file.name file.type $allFileVersions] {
- $this doNameAndType [[$fileV file] name] [[$fileV file] type]
- $report print [$fileV versionName] 25
- $report space
- $report print [$fileV status] 10
- $report space
- $report print \
- [expr { [$fileV inCorporate] ? "yes" : "no" } ] 10 center
- set link [[$this systemV] findFileVersionLink -byFileVersion $fileV]
- if ![$link isNil] {
- $report print [$link status] 30
- }
- $report line
- }
-
- if [llength $allExternalLinks] {
- if [llength $allFileVersions] { $report line }
-
- foreach externalLink [osort type name $allExternalLinks] {
- $this doNameAndType [$externalLink name] [$externalLink type]
- $report print [$externalLink path] line
- }
- }
-
- $report page
- $report remove header
-
- return 0
- }
-
-
- method ReportFiles::doNameAndType {this name type} {
- set report [$this report]
- $report print $name 30
- $report space
- $report print $type 10
- $report space
- }
-
-
- set executeMe [ReportFiles new]
-