home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)projdbobj.tcl /main/titanic/8
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)projdbobj.tcl /main/titanic/8 17 Oct 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "browsdbobj.tcl"
-
- Class ProjDbObj : {BrowsDbObj Project} {
- method destructor
- constructor
- method promoter
- method activateObject
- method addConfigVersion
- method deactivateObject
- method deselectVersion
- method makeUpToDate
- method newObjects
- method removeObjects
- method selectVersion
- attribute roleSet
- attribute controlledClassSet
- }
-
- method ProjDbObj::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this BrowsDbObj::destructor
- }
-
- constructor ProjDbObj {class this name} {
- set this [Project::constructor $class $this $name]
- set this [BrowsDbObj::constructor $class $this $name]
- return $this
- }
-
- selfPromoter Project {this} {
- ProjDbObj promote $this
- }
-
- method ProjDbObj::promoter {this} {
- $this BrowsDbObj::promoter
-
- set customFileVersionSet $this.${CustFVUiObj::uiClass}:0
- if {! [isCommand $customFileVersionSet]} {
- CustFVUiObj new $customFileVersionSet -parent $this
- }
- $this customFileVersionSet $customFileVersionSet
-
- module_promoter ProjDbObj $this
- }
-
- method ProjDbObj::activateObject {this} {
- set obj [lindex [$wmttoolObj selectedObjSet] 0]
- set script "$obj activate"
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- }
-
- method ProjDbObj::addConfigVersion {this} {
- require "newobjentr.tcl"
-
- if {! [isCommand $wmttoolObj.newConfigV]} {
- NewObjEntryDlg new $wmttoolObj.newConfigV \
- -title "New Config Version" \
- -message "Configuration Name:" \
- -okPressed {
- set confName [%this entry]
- set script "[%this dbObj] createConfigVersion [list $confName]"
- $wmttoolObj startCommand tcl \
- "$script" "" \
- "Creating configuration version '$confName'..." \
- {1 0} 1
- }
- }
- $wmttoolObj.newConfigV dbObj $this
- $wmttoolObj.newConfigV popUp
- }
-
- proc ProjDbObj::associations {} {
- return {configVersions customFileVersionSet}
- }
-
- proc ProjDbObj::childTypes {assoc} {
- if {[lsearch -exact "[ProjDbObj::associations]" "$assoc"] == -1} {
- return ""
- }
- return "[BrowserProcs::childTypes $assoc]"
- }
-
- proc ProjDbObj::controlledLists {} {
- return {
- "[$this configList]"
- "[$this customFileList]"
- "[$this customFileVersionLinkList]"
- "[$this phaseList]"
- }
- }
-
- method ProjDbObj::deactivateObject {this} {
- set obj [lindex [$wmttoolObj selectedObjSet] 0]
- set script "$obj deactivate"
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- }
-
- method ProjDbObj::deselectVersion {this version} {
- $this deselect $version
- }
-
- proc ProjDbObj::infoProperties {} {
- return [concat \
- [BrowserProcs::infoProperties] \
- {"Controlled Actions"} \
- ]
- }
-
- method ProjDbObj::makeUpToDate {this} {
- # dummy call to server
- $this repositoryDirectory
- }
-
- method ProjDbObj::newObjects {this} {
- set script ""
- foreach obj [$wmttoolObj selectedObjSet] {
- if {"$script" != ""} {
- append script " ;"
- }
- append script " $obj derive -self"
- }
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- }
-
- method ProjDbObj::removeObjects {this} {
- set box $wmttoolObj.removeWarning
- ClassMaker::extend YesNoWarningDialog RemoveObjectsWarningDialog dbObj
- RemoveObjectsWarningDialog new $box \
- -title "Confirm Config Version Delete" \
- -message [BrowserProcs::removeMessage] \
- -dbObj $this \
- -noPressed {%this delete} \
- -yesPressed {
- set dbObj [%this dbObj]
- set script ""
- foreach obj [$wmttoolObj selectedObjSet] {
- if {"$script" != ""} {
- append script " ;"
- }
- append script " $dbObj removeObject $obj"
- }
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- %this delete
- }
- $box delCancelButton
- $box popUp
- }
-
- method ProjDbObj::selectVersion {this version} {
- $this select $version
- }
-
- # Do not delete this line -- regeneration end marker
-
-