home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)browsdbobj.tcl /main/titanic/15
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)browsdbobj.tcl /main/titanic/15 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- require "classmaker.tcl"
- # End user added include file section
-
- require "browsuiobj.tcl"
-
- Class BrowsDbObj : {BrowsUiObj} {
- method destructor
- constructor
- method promoter
- method controlledActions2String
- method customLevelVersion
- method displayName
- method getInfo
- method initializeInfo
- method removeObject
- method uiClass
- method uiIdentity
- method removeSpecials
- attribute controlledListSet
- attribute customFileVersionSet
- attribute accessRuleSet
- }
-
- method BrowsDbObj::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this BrowsUiObj::destructor
- }
-
- constructor BrowsDbObj {class this name} {
- set this [BrowsUiObj::constructor $class $this $name]
- return $this
- }
-
- method BrowsDbObj::promoter {this} {
- $this BrowsUiObj::promoter
- module_promoter BrowsDbObj $this
- }
-
- method BrowsDbObj::controlledActions2String {this} {
- return [BrowserProcs::action2String [$this controlledActions]]
- }
-
- method BrowsDbObj::customLevelVersion {this} {
- if [$this isA CustomLevelVersion] {
- return $this
- }
- return [$this getParent CustomLevelVersion]
- }
-
- method BrowsDbObj::displayName {this} {
- return "[$this name]"
- }
-
- method BrowsDbObj::getInfo {this header} {
- set info [[$this info] set $header]
- if {"$info" != ""} {
- return $info
- }
-
- global browsDbObjInfoDict
- if {! [info exists browsDbObjInfoDict]} {
- set browsDbObjInfoDict [Dictionary new \
- -contents {
- Comments comments
- "Controlled Actions" controlledActions2String
- Created createTime2String
- "Created By" creator
- "Current Users" currentUserNames
- "DB Host" databaseHost
- "DB Name" databaseName
- "DB Server" databaseServer
- "Documented System" documentedSystemName
- Editor editorType
- Frozen freezeTime2String
- Identity identity
- "In Corporate" inCorporate2String
- Link linkStatus
- Name displayName
- Path pathName
- Phase phaseName
- Project projectName
- Release productRelease
- Reserved reserveTime2String
- "Reserved By" reserveUser
- "Reservation Comments" reserveComments
- Scope scope2String
- Status status
- System systemName
- Text text
- Type browserType
- Updated updateTime2String
- "Updated By" updator
- Version versionName
- } \
- ]
- }
-
- global browsDbObjNotCachedList
- if {! [info exists browsDbObjNotCachedList]} {
- foreach infoProp {Updated "Updated By"} {
- set browsDbObjNotCachedList($infoProp) 1
- }
- }
-
- if [info exists browsDbObjNotCachedList($header)] {
- set cached 0
- $this makeUpToDate
- } else {
- set cached 1
- }
- if [catch {set info [$this [$browsDbObjInfoDict set $header]]}] {
- resetErrorVars
- set info ""
- }
- if $cached {
- $this setInfo $header $info
- }
- return $info
- }
-
- method BrowsDbObj::initializeInfo {this arg} {
- [$this info] contents ""
- }
-
- method BrowsDbObj::removeObject {this object} {
- if [$object isA ConfigVersion] {
- set flag "-configVersion"
- } elseif [$object isA PhaseVersion] {
- set flag "-phaseVersion"
- } elseif [$object isA SystemVersion] {
- set flag "-systemVersion"
- } elseif [$object isA ExternalLink] {
- set flag "-externalLink"
- } elseif [$object isA FileVersion] {
- set flag "-fileVersion"
- } elseif [$object isA GroupVersion] {
- set flag "-groupVersion"
- } elseif [$object isA PropertyReference] {
- set flag "-propRef"
- } elseif [$object isA SystemFileReference] {
- set flag "-reference"
- } else {
- set flag ""
- }
-
- $object removeSpecials
-
- eval $this remove $flag $object
-
- # Remove current EditPasteCmd when it operates on the removed object
- if [.main isA CommonBrowser] {
- set cmd [.main undoCommand]
- if {[isCommand $cmd] && (! [$cmd busy]) &&
- [$cmd isA EditPasteCmd] && [$cmd operatesOn $object]} {
- $cmd delete
- }
- }
- }
-
- method BrowsDbObj::uiClass {this} {
- return [$this ORB_class]
- }
-
- method BrowsDbObj::uiIdentity {this} {
- return [$this identity]
- }
-
- method BrowsDbObj::removeSpecials {this} {
- # default no specials to remove
- }
-
- # Do not delete this line -- regeneration end marker
-
-