Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r547 -r551 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 547) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 551) @@ -3,13 +3,45 @@ // Dit is een klasse bedoeld om data te delen over de applicatie heen. // Dit kan bijvoorbeeld usernaam, login token, computernaam, ... // Informatie die elk component/klasse kan gebruiken. +// Voor schaalbaarheid en isolatie worden interfaces gebruikt die deze klasse implementeert. interface +// SUB CONTEXTS: klassen die overeenkomen met bepaalde sub-context (bv. alles gerelateerd met authenticatie). + +// - UserServerService type + TUserServerServiceContext = class + private + FSessionKey: string; + FGebruikersNaam: string; + + FIsOK: Boolean; + FErrorMessage: string; + FInternalErrorMessage: string; + public + property SessionKey: string read FSessionKey write FSessionKey; + property GebruikersNaam: string read FGebruikersNaam write FGebruikersNaam; + property IsOK: Boolean read FIsOK write FIsOK; + property ErrorMessage: string read FErrorMessage write FErrorMessage; + property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; + end; + + // APPLICATION CONTEXT + // Application context bevat alle sub-contexts TApplicationContext = class + private + FUserServerServiceContext: TUserServerServiceContext; + public + constructor Create(); + property UserServerServiceContext: TUserServerServiceContext read FUserServerServiceContext write FUserServerServiceContext; end; implementation +constructor TApplicationContext.Create(); +begin + FUserServerServiceContext := TUserServerServiceContext.Create(); +end; + end.