eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HistoryManager':

Home

everywhere
www.exept.de
for:
[back]

Class: HistoryManager


Inheritance:

   Object
   |
   +--HistoryManager

Package:
stx:libbasic3
Category:
System-Changes-History
Version:
rev: 1.72 date: 2009/08/12 18:50:39
user: cg
file: HistoryManager.st directory: libbasic3
module: stx stc-classLibrary: libbasic3
Author:
Robert Sailer - AEG

Description:


This class is part of the HistoryManagerProject.
It helps to keep track of changes made to methods.

All Methods and Classes in the system get a HistroyLine which 
contains a timestamp and the name of the changing user. 
This is acually the UniX loginname.

The Manager registers itself to get notifications 
on change, intercepts them and appends a historyLine to the methods
code.

The HistoryManager can be turned on/off from aprivate.rc script,
or via the Launcher menu.

The methods history line is filtered, to only contain one
entry per modifying user, containing the date of the last change.
If fullHistoryMode is on, the classes history-ethod is also updated for
every change (containing every change).
Full mode is enabled via:
    HistoryManager fullHistoryUpdate:true
or via the Launchers compilation-settings dialog.

claus:
    I changed things to avoid depending on every class in the system.
    Now also catch Smalltalk change messages, related to class changes.


Related information:

    HistoryLine

Class protocol:

accessing
o  fullHistoryUpdate
return true, if the historyManagement does full updates

o  fullHistoryUpdate: aBoolean
set/clear, full updates

o  instance
return the one and only historyManager instance

o  isActive
return true, if the historyManagement is activated

activation / deactivation
o  activate
activate the HistoryManagement

o  deactivate
deactivate the HistoryManagement

change & update
o  update: what with: aParameter from: changedObject
intercepts system restart - reinstall mySelf as dependent of all classes

helpers
o  codeForInitialHistoryMethodIn: aClass
create an initial (empty) history method

o  createInitialHistoryMethodIn: aClass

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  getAllHistoriesFrom: someString
returns anArray of HistoryLines from a string.
Usually, the argument is a methods source code.

o  getLastHistoryLineFrom: someString
returns the last HistoryLine, if no HistoryLine available, return nil

o  withoutHistoryLines: someString
given some methods sourceString, return a copy without any
history lines

initialization
o  enforcedUserName

o  enforcedUserName: aStringOrNil

o  initMe
setup theOneAndOnly instance of myself (if not already present

o  initialize
add myself as a dependent of ObjectMemory to be told about image restarts

instance creation
o  new
because there can be only ONE HistoryManager, new must me redefiend


Instance protocol:

accessing
o  fullHistoryUpdate
return the fullHistoryUpdate;
if true, the classes history method is also updated.

o  fullHistoryUpdate: aBoolean
set the fullHistoryUpdate;
if true, the classes history method is also updated.

o  historyMode
return historyMode

o  historyMode: something
set historyMode

change & update
o  update: something with: someArgument from: changedObject
arrive here, whenever any class changed somehow.
(something contains aSymbol describing what happened)

initialization
o  exclude
public - return an exclusionlist for some smalltalk classes which should not be notified or historisized

o  initialize
public - make me depend on all smalltalk classes (except the exclusionList)
to be notified later about changes. This intercepts source installation and allows
be to patch the source-string with a historyLine.

o  releaseDependencies
no longer depend on class changes

updateHistory
o  addHistory: what with: argument to: someString filter: doFilter
private - add a historyLine at end to the sourceCode;
check for multiple lines of the same user and merge into one.
What may be one of #modification or #creation, to choose among
'Modified' or 'Created' lines.

o  addHistory: what with: arg toHistoryMethodOf: aClass
private - add a historyLine at end of the classes history methods
source - if there is one

o  createHistoryMethodFor: aClass
private - create a history method


Private classes:

    HistoryLine

Demonstration:


    HistoryManager activate


    HistoryManager deactivate



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 19:21:59 GMT