"{ Package: 'stx:goodies/metacello' }"
MetacelloScriptNotification subclass:#MetacelloResolveProjectUpgrade
instanceVariableNames:'existingProjectRegistration newProjectRegistration'
classVariableNames:''
poolDictionaries:''
category:'Metacello-Core-Scripts'
!
!MetacelloResolveProjectUpgrade methodsFor:'accessing'!
existingProjectRegistration
^ existingProjectRegistration
!
existingProjectRegistration: anObject
existingProjectRegistration := anObject
!
newProjectRegistration
^ newProjectRegistration
!
newProjectRegistration: anObject
newProjectRegistration := anObject
!
operationString
self subclassResponsibility
! !
!MetacelloResolveProjectUpgrade methodsFor:'exception handling'!
allow
self checkAllowed.
self resume: self newProjectRegistration
!
allowEvenIfLocked
self resume: self newProjectRegistration
!
defaultAction
"Result of signal should be the projectRegistration to be used to perform the load ... default is to disallow"
^ self existingProjectRegistration
!
disallow
"default action"
self resume: self existingProjectRegistration
! !
!MetacelloResolveProjectUpgrade methodsFor:'handlers'!
handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock
self subclassResponsibility
! !
!MetacelloResolveProjectUpgrade methodsFor:'private'!
checkAllowed
self existingProjectRegistration locked
ifTrue: [
MetacelloLockedProjectError
signal:
'Attempt to perform' , self operationString printString , ' a locked project: '
, self existingProjectRegistration printString ]
! !
!MetacelloResolveProjectUpgrade class methodsFor:'documentation'!
version_SVN
^ '$Id:: $'
! !