2002-03-06 23:13:23 +00:00
/ * * GSWApplication . m - < title > GSWeb : Class GSWApplication < / title >
2002-08-04 18:00:11 +00:00
2004-12-31 14:33:16 +00:00
Copyright ( C ) 1999 -2004 Free Software Foundation , Inc .
2000-01-22 12:49:49 +00:00
2002-03-06 23:13:23 +00:00
Written by : Manuel Guesdon < mguesdon @ orange - concept . com >
2000-01-22 12:49:49 +00:00
Date : Jan 1999
2002-03-06 23:13:23 +00:00
$ Revision $
$ Date $
2002-11-27 20:25:22 +00:00
$ Id $
2000-01-22 12:49:49 +00:00
This file is part of the GNUstep Web Library .
2002-03-06 23:13:23 +00:00
< license >
2000-01-22 12:49:49 +00:00
This library is free software ; you can redistribute it and / or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This library is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
License along with this library ; if not , write to the Free
Software Foundation , Inc . , 675 Mass Ave , Cambridge , MA 02139 , USA .
2002-03-06 23:13:23 +00:00
< / license >
* * /
2000-01-22 12:49:49 +00:00
2003-03-21 14:32:57 +00:00
# include "config.h"
RCS_ID ( "$Id$" )
2003-01-19 15:33:07 +00:00
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
# include "GSWeb.h"
2007-04-13 18:32:02 +00:00
# include "GSWPrivate.h"
2003-11-24 09:54:32 +00:00
# include "GSWLifebeatThread.h"
# include "GSWRecording.h"
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
2000-01-22 12:49:49 +00:00
# include "stacktrace.h"
# include "attach.h"
/ *
Monitor Refresh ( or View Details ) :
application lock
GSWStatisticsStore statistics
application unlock
* /
2000-02-06 16:32:26 +00:00
2004-01-18 10:36:04 +00:00
/ *
The following class does not exist . The declaration is merely used
to aid the compiler to find the correct signatures for messages
sent to the class and to avoid polluting the compiler output with
superfluous warnings .
* /
@ interface GSWAppClassDummy : NSObject
- ( NSString * ) adaptor ;
- ( NSString * ) host ;
- ( NSNumber * ) port ;
@ end
# ifdef GNUSTEP
@ interface NSDistantObject ( GNUstepPrivate )
+ ( void ) setDebug : ( int ) val ;
@ end
# endif
2000-02-06 16:32:26 +00:00
@ interface GSWApplication ( GSWApplicationPrivate )
- ( void ) _setPool : ( NSAutoreleasePool * ) pool ;
@ end
2005-12-17 16:44:58 +00:00
# define GSWFPutSL ( string , file ) \
do { fputs ( [ string lossyCString ] , file ) ; fputs ( "\n" , file ) ; fflush ( file ) ; } \
while ( 0 )
2004-08-28 11:17:33 +00:00
/ * GSWApplication + Defaults . m * /
/ * These functions should actually be static inline to limit thier scope
but that would mean that they have to be part of this transalation unit . * /
void GSWeb_ApplicationDebugSetChange ( void ) ;
void GSWeb_AdjustVolatileNSArgumentDomain ( void ) ;
void GSWeb_InitializeGlobalAppDefaultOptions ( void ) ;
void GSWeb_InitializeDebugOptions ( void ) ;
void GSWeb_DestroyGlobalAppDefaultOptions ( void ) ;
2000-01-22 12:49:49 +00:00
// === === === === === === === === === === === === === === === === === === === === === === = =
GSWApplication * GSWApp = nil ;
NSString * globalApplicationClassName = nil ;
NSMutableDictionary * localDynCreateClassNames = nil ;
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
int GSWebNamingConv = GSWNAMES_INDEX ;
2003-03-21 14:32:57 +00:00
NSString * GSWPageNotFoundException = @ "GSWPageNotFoundException" ;
2000-01-22 12:49:49 +00:00
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
// Main function
2002-08-04 18:00:11 +00:00
int GSWApplicationMainReal ( NSString * applicationClassName ,
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
int argc ,
const char * argv [ ] )
2000-01-22 12:49:49 +00:00
{
Class applicationClass = Nil ;
int result = 0 ;
2008-02-27 21:45:01 +00:00
// call NSBundle Start : _usesFastJavaBundleSetup
// call : NSBundle Start : _setUsesFastJavaBundleSetup : YES
// call NSBundle mainBundle
2002-08-04 18:00:11 +00:00
NSAutoreleasePool * appAutoreleasePool = nil ;
2008-02-27 21:45:01 +00:00
2000-02-06 16:32:26 +00:00
appAutoreleasePool = [ NSAutoreleasePool new ] ;
2008-02-27 21:45:01 +00:00
GSWeb_AdjustVolatileNSArgumentDomain ( ) ;
if ( ! localDynCreateClassNames )
localDynCreateClassNames = [ NSMutableDictionary new ] ;
GSWeb_InitializeGlobalAppDefaultOptions ( ) ;
GSWeb_InitializeDebugOptions ( ) ;
2000-01-22 12:49:49 +00:00
// TODO
2008-02-27 21:45:01 +00:00
if ( applicationClassName && [ applicationClassName length ] > 0 )
ASSIGNCOPY ( globalApplicationClassName , applicationClassName ) ;
GSWeb_ApplicationDebugSetChange ( ) ;
applicationClass = [ GSWApplication _applicationClass ] ;
if ( ! applicationClass ) {
NSCAssert ( NO , @ "!applicationClass" ) ;
// TODO error
result = -1 ;
}
if ( result >= 0 ) {
NSArray * frameworks = [ applicationClass loadFrameworks ] ;
if ( frameworks ) {
NSBundle * bundle = nil ;
unsigned i = 0 , j = 0 ;
BOOL loadResult = NO ;
NSFileManager * fm = [ NSFileManager defaultManager ] ;
NSArray * searchDomains = NSSearchPathForDirectoriesInDomains ( NSLibraryDirectory ,
NSAllDomainsMask ,
NO ) ;
unsigned frameworksCount = [ frameworks count ] ;
unsigned searchDomainCount = [ searchDomains count ] ;
2007-02-18 11:19:58 +00:00
2008-02-27 21:45:01 +00:00
for ( i = 0 ; i < frameworksCount ; i + + ) {
NSString * bundlePath = [ frameworks objectAtIndex : i ] ;
2007-02-18 11:19:58 +00:00
NSString * searchPath = nil ;
2008-02-27 21:45:01 +00:00
for ( j = 0 ; j < searchDomainCount ; j + + ) {
searchPath = [ searchDomains objectAtIndex : j ] ;
searchPath = [ searchPath stringByAppendingPathComponent : @ "Frameworks" ] ;
searchPath = [ searchPath stringByAppendingPathComponent : bundlePath ] ;
/ * FIXME : This should be using stringByAppendingPathExtension :
but GSFrameworkPSuffix already has the ' . ' . * /
searchPath = [ searchPath stringByAppendingString : GSFrameworkPSuffix ] ;
if ( [ fm fileExistsAtPath : searchPath ] ) {
bundle = [ NSBundle bundleWithPath : searchPath ] ;
loadResult = [ bundle load ] ;
if ( ! loadResult ) {
ExceptionRaise ( @ "GSWApplication" , @ "Can't load framework %@" ,
searchPath ) ;
}
/ * Break out of the inner for loop . * /
j = searchDomainCount ;
} else {
bundle = nil ;
}
2002-08-04 18:00:11 +00:00
}
2008-02-27 21:45:01 +00:00
if ( ! bundle ) {
ExceptionRaise ( @ "GSWApplication" , @ "Can't load framework %@" ,
bundlePath ) ;
}
}
}
}
if ( result >= 0 ) {
NS_DURING
2002-08-04 18:00:11 +00:00
{
2008-02-27 21:45:01 +00:00
id app = [ applicationClass new ] ;
if ( app )
result = 1 ;
else
result = -1 ;
}
// Make sure we pass all exceptions back to the requestor .
NS_HANDLER
{
NSLog ( @ "Can't create Application (Class:%@)- "
@ "%@ %@ Name:%@ Reason:%@" ,
applicationClass ,
localException ,
[ localException description ] ,
[ localException name ] ,
[ localException reason ] ) ;
result = -1 ;
}
NS_ENDHANDLER ;
}
if ( result >= 0 && GSWApp ) {
[ GSWApp _setPool : [ NSAutoreleasePool new ] ] ;
[ GSWApp run ] ;
DESTROY ( GSWApp ) ;
}
2000-02-12 13:22:07 +00:00
DESTROY ( appAutoreleasePool ) ;
2000-01-22 12:49:49 +00:00
return result ;
2008-02-27 21:45:01 +00:00
}
2000-01-22 12:49:49 +00:00
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
// === === === === === === === === === === === === === === === === === === === === === === = =
// Main function ( for WO compatibility )
int WOApplicationMain ( NSString * applicationClassName ,
int argc ,
const char * argv [ ] )
{
GSWebNamingConv = WONAMES_INDEX ;
return GSWApplicationMainReal ( applicationClassName , argc , argv ) ;
} ;
// === === === === === === === === === === === === === === === === === === === === === === = =
// Main function ( GSWeb )
int GSWApplicationMain ( NSString * applicationClassName ,
int argc ,
const char * argv [ ] )
{
GSWebNamingConv = GSWNAMES_INDEX ;
return GSWApplicationMainReal ( applicationClassName , argc , argv ) ;
} ;
2000-01-22 12:49:49 +00:00
// === === === === === === === === === === === === === === === === === === === === === === = =
@ implementation GSWApplication
2004-12-31 14:33:16 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( void ) initialize
{
BOOL initialized = NO ;
if ( ! initialized )
{
initialized = YES ;
GSWInitializeAllMisc ( ) ;
} ;
} ;
2000-02-06 16:32:26 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _setPool : ( NSAutoreleasePool * ) pool
{
2002-08-04 18:00:11 +00:00
_globalAutoreleasePool = pool ;
2000-02-06 16:32:26 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( id ) init
{
id ret = [ [ self superclass ] init ] ;
[ GSWAssociation addLogHandlerClasse : [ self class ] ] ;
return ret ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2008-08-20 20:32:10 +00:00
// FIXME : do we need to dealloc a CLASS ? ? ? looks strange to me - - dw
// + ( void ) dealloc
// {
// // FIXME : do we need to dealloc a CLASS ? ? ? looks strange to me - - dw
// [ GSWAssociation removeLogHandlerClasse : [ self class ] ] ;
// DESTROY ( localDynCreateClassNames ) ;
// GSWeb_DestroyGlobalAppDefaultOptions ( ) ;
// [ [ self superclass ] dealloc ] ;
// } ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// init
- ( id ) init
{
2002-08-04 18:00:11 +00:00
NSUserDefaults * standardUserDefaults = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
if ( ( self = [ super init ] ) )
{
_selfLock = [ NSRecursiveLock new ] ;
2008-04-20 18:25:56 +00:00
_globalLock = [ NSRecursiveLock new ] ;
2003-11-24 09:54:32 +00:00
ASSIGN ( _startDate , [ NSDate date ] ) ;
ASSIGN ( _lastAccessDate , [ NSDate date ] ) ;
[ self setTimeOut : 0 ] ; // No time out
2003-04-09 12:03:17 +00:00
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugMLLog ( @ "application" , @ "GSCurrentThreadDictionary()=%@" ,
GSCurrentThreadDictionary ( ) ) ;
2003-04-09 12:03:17 +00:00
// Do it before run so application can addTimer , . . . in - run
NSDebugMLLog ( @ "application" , @ "[NSRunLoop currentRunLoop]=%@" , [ NSRunLoop currentRunLoop ] ) ;
ASSIGN ( _currentRunLoop , [ NSRunLoop currentRunLoop ] ) ;
2002-08-04 18:00:11 +00:00
_pageCacheSize = 30 ;
_permanentPageCacheSize = 30 ;
_pageRecreationEnabled = YES ;
_pageRefreshOnBacktrackEnabled = YES ;
_refusingNewSessions = NO ;
_minimumActiveSessionsCount = 0 ; // 0 is default
_dynamicLoadingEnabled = YES ;
_printsHTMLParserDiagnostics = YES ;
2008-03-30 22:10:20 +00:00
_allowsConcurrentRequestHandling = NO ;
2003-11-24 09:54:32 +00:00
2002-08-04 18:00:11 +00:00
[ [ self class ] _setApplication : self ] ;
[ self _touchPrincipalClasses ] ;
2003-11-24 09:54:32 +00:00
2002-08-04 18:00:11 +00:00
standardUserDefaults = [ NSUserDefaults standardUserDefaults ] ;
NSDebugMLLog ( @ "options" , @ "standardUserDefaults=%@" , standardUserDefaults ) ;
2003-11-24 09:54:32 +00:00
[ self _initAdaptorsWithUserDefaults : standardUserDefaults ] ;
[ self setSessionStore : [ self createSessionStore ] ] ;
2002-08-04 18:00:11 +00:00
// call isMonitorEnabled
/ * ? ? ? ?
NSBundle * _mainBundle = [ NSBundle mainBundle ] ;
NSArray * _allFrameworks = [ _mainBundle allFrameworks ] ;
int _frameworkN = 0 ;
for ( _frameworkN = 0 ; _frameworkN < [ _allFrameworks count ] ; _frameworkN + + )
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
NSString * _bundlePath = [ [ _allFrameworks objectAtIndex : _frameworkN ] bundlePath ] ;
// TODO what ? ? ?
2000-01-22 12:49:49 +00:00
} ;
2002-08-04 18:00:11 +00:00
* /
// call adaptorsDispatchRequestsConcurrently
_activeSessionsCountLock = [ NSLock new ] ;
2003-11-24 09:54:32 +00:00
2002-08-04 18:00:11 +00:00
_componentDefinitionCache = [ GSWMultiKeyDictionary new ] ;
2003-11-24 09:54:32 +00:00
2003-02-01 19:07:25 +00:00
[ self setResourceManager : [ self createResourceManager ] ] ;
2003-11-24 09:54:32 +00:00
[ self setStatisticsStore : [ self createStatisticsStore ] ] ;
2002-08-04 18:00:11 +00:00
if ( [ [ self class ] isMonitorEnabled ] )
2000-01-22 12:49:49 +00:00
{
2001-10-28 10:29:17 +00:00
NSDebugMLLog0 ( @ "application" , @ "init: call self _setupForMonitoring" ) ;
2000-01-22 12:49:49 +00:00
[ self _setupForMonitoring ] ;
} ;
2002-08-04 18:00:11 +00:00
NSDebugMLLog0 ( @ "application" , @ "init: call appGSWBundle initializeObject:..." ) ;
[ [ GSWResourceManager _applicationGSWBundle ] initializeObject : self
fromArchiveNamed : @ "Application" ] ;
[ self setPrintsHTMLParserDiagnostics : NO ] ;
2003-11-24 09:54:32 +00:00
if ( [ [ self class ] recordingPath ] )
{
Class recordingClass = [ [ self class ] recordingClass ] ;
_recorder = [ recordingClass new ] ;
} ;
2002-08-04 18:00:11 +00:00
// call recordingPath
NSDebugMLLog0 ( @ "application" , @ "init: call self registerRequestHandlers" ) ;
[ self registerRequestHandlers ] ;
[ self _validateAPI ] ;
NSDebugMLLog0 ( @ "application" , @ "init: addObserver" ) ;
[ [ NSNotificationCenter defaultCenter ] addObserver : self
selector : @ selector ( _sessionDidTimeOutNotification : )
name : GSWNotification__SessionDidTimeOutNotification [ GSWebNamingConv ]
object : nil ] ;
NSDebugMLLog0 ( @ "application" , @ "init: addObserver called" ) ;
2003-11-24 09:54:32 +00:00
// Create lifebeat thread only if we ' re not the observer : - )
NSDebugMLLog ( @ "application" , @ "[self isTaskDaemon]=%d" , [ self isTaskDaemon ] ) ;
NSDebugMLLog ( @ "application" , @ "[[self class] isLifebeatEnabled]=%d" , [ [ self class ] isLifebeatEnabled ] ) ;
if ( ! [ self isTaskDaemon ] && [ [ self class ] isLifebeatEnabled ] )
{
NSTimeInterval lifebeatInterval = [ [ self class ] lifebeatInterval ] ;
if ( lifebeatInterval < 1 )
lifebeatInterval = 30 ; // 30 s
NSDebugMLLog ( @ "application" , @ "lifebeatInterval=%f" , lifebeatInterval ) ;
2004-01-18 10:36:04 +00:00
ASSIGN ( _lifebeatThread ,
[ GSWLifebeatThread lifebeatThreadWithApplication : self
name : [ self name ]
host : [ ( GSWAppClassDummy * ) [ self class ] host ]
port : [ [ self class ] intPort ]
lifebeatHost : [ [ self class ] lifebeatDestinationHost ]
lifebeatPort : [ [ self class ] lifebeatDestinationPort ]
interval : lifebeatInterval ] ) ;
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "_lifebeatThread=%@" , _lifebeatThread ) ;
2007-04-13 18:32:02 +00:00
// # warning go only multi - thread if we want this !
2003-12-30 22:32:30 +00:00
2003-11-24 09:54:32 +00:00
[ NSThread detachNewThreadSelector : @ selector ( run : )
toTarget : _lifebeatThread
withObject : nil ] ;
2003-12-30 22:32:30 +00:00
2003-11-24 09:54:32 +00:00
} ;
2002-08-04 18:00:11 +00:00
} ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
return self ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) dealloc
{
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "Dealloc GSWApplication" ) ;
2002-08-04 18:00:11 +00:00
DESTROY ( _adaptors ) ;
DESTROY ( _sessionStore ) ;
DESTROY ( _componentDefinitionCache ) ;
2003-11-24 09:54:32 +00:00
DESTROY ( _lastAccessDate ) ;
2002-08-04 18:00:11 +00:00
DESTROY ( _timer ) ;
// DESTROY ( _context ) ; // deprecated
DESTROY ( _statisticsStore ) ;
DESTROY ( _resourceManager ) ;
DESTROY ( _remoteMonitor ) ;
DESTROY ( _remoteMonitorConnection ) ;
DESTROY ( _instanceNumber ) ;
DESTROY ( _requestHandlers ) ;
DESTROY ( _defaultRequestHandler ) ;
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "Dealloc GSWApplication: selfLock" ) ;
2002-08-04 18:00:11 +00:00
DESTROY ( _selfLock ) ;
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "Dealloc GSWApplication: globalLock" ) ;
2002-08-04 18:00:11 +00:00
DESTROY ( _globalLock ) ;
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "Dealloc GSWApplication: globalAutoreleasePool" ) ;
2002-08-04 18:00:11 +00:00
DESTROY ( _globalAutoreleasePool ) ;
DESTROY ( _currentRunLoop ) ;
DESTROY ( _runLoopDate ) ;
DESTROY ( _initialTimer ) ;
DESTROY ( _activeSessionsCountLock ) ;
2003-11-24 09:54:32 +00:00
DESTROY ( _lifebeatThread ) ;
2001-02-23 18:01:19 +00:00
if ( GSWApp = = self )
2002-10-16 15:38:34 +00:00
{
2001-02-23 18:01:19 +00:00
GSWApp = nil ;
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
}
2001-02-23 18:01:19 +00:00
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "Dealloc GSWApplication Super" ) ;
2000-01-22 12:49:49 +00:00
[ super dealloc ] ;
2002-03-06 23:13:23 +00:00
GSWLogMemC ( "End Dealloc GSWApplication" ) ;
2000-01-22 12:49:49 +00:00
} ;
2010-01-20 07:52:01 +00:00
- ( void ) _setHostAddress : ( NSString * ) hostAdr
{
[ _hostAddress release ] ;
_hostAddress = [ hostAdr retain ] ;
}
- ( NSString * ) hostAddress
{
if ( _hostAddress = = nil )
{
_hostAddress = [ [ [ NSHost currentHost ] address ] retain ] ;
}
return _hostAddress ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) description
{
// OK
2002-08-04 18:00:11 +00:00
NSString * dscr = nil ;
2000-01-22 12:49:49 +00:00
[ self lock ] ;
2002-08-04 18:00:11 +00:00
dscr = [ NSString stringWithFormat :
@ "<%s %p - name=%@ adaptors=%@ sessionStore=%@ pageCacheSize=%d permanentPageCacheSize=%d pageRecreationEnabled=%s pageRefreshOnBacktrackEnabled=%s componentDefinitionCache=%@ caching=%s terminating=%s timeOut=%f dynamicLoadingEnabled=%s>" ,
object_get _class _name ( self ) ,
( void * ) self ,
[ self name ] ,
[ [ self adaptors ] description ] ,
[ [ self sessionStore ] description ] ,
[ self pageCacheSize ] ,
[ self permanentPageCacheSize ] ,
[ self _isPageRecreationEnabled ] ? "YES" : "NO" ,
[ self isPageRefreshOnBacktrackEnabled ] ? "YES" : "NO" ,
[ _componentDefinitionCache description ] ,
[ self isCachingEnabled ] ? "YES" : "NO" ,
[ self isTerminating ] ? "YES" : "NO" ,
[ self timeOut ] ,
[ self _isDynamicLoadingEnabled ] ? "YES" : "NO" ] ;
2000-01-22 12:49:49 +00:00
[ self unlock ] ;
2002-08-04 18:00:11 +00:00
return dscr ;
2000-01-22 12:49:49 +00:00
} ;
2008-03-30 22:10:20 +00:00
- ( BOOL ) shouldRestoreSessionOnCleanEntry : ( GSWRequest * ) aRequest
{
return NO ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// allowsConcurrentRequestHandling
- ( BOOL ) allowsConcurrentRequestHandling
{
return YES ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// adaptorsDispatchRequestsConcurrently
- ( BOOL ) adaptorsDispatchRequestsConcurrently
{
2008-03-30 22:10:20 +00:00
return _isMultiThreaded ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isConcurrentRequestHandlingEnabled
- ( BOOL ) isConcurrentRequestHandlingEnabled
{
2008-03-30 22:10:20 +00:00
return ( _isMultiThreaded && _allowsConcurrentRequestHandling ) ;
}
- ( NSLock * ) requestHandlingLock
{
if ( _isMultiThreaded && ( ! _allowsConcurrentRequestHandling ) ) {
return _globalLock ;
}
return nil ;
}
2000-01-22 12:49:49 +00:00
2004-06-15 23:11:51 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// calls the class because on MacOSX KVC does not support "application.class.isDebuggingEnabled"
- ( BOOL ) isDebuggingEnabled
{
return [ [ self class ] isDebuggingEnabled ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// lockRequestHandling
- ( BOOL ) isRequestHandlingLocked
{
* GSWeb.framework/GSWUtils.h/m
(IsStyle,IsNumberStyle, ExceptionRaise, ExceptionRaise0,
ValidationExceptionRaise, ValidationExceptionRaise0,
ExceptionByAddingUserInfoObjectFrameInfo,
ExceptionByAddingUserInfoObjectFrameInfo0,
ExceptionByAddingUserInfoFunctionFrameInfo,
ExceptionByAddingUserInfoFunctionFrameInfo0, ): Reformat
defines.
(GSW_LOCK_LIMIT): New define.
(ExceptionRaiseFn, ExceptionRaiseFn0,
ValidationExceptionRaiseFn,
ValidationExceptionRaiseFn0): Reformat declaration.
(TmpLock, TmpTryLockBeforeDate, TmpLockBeforeDate, TmpUnlock):
Remove.
([NSLock isLocked]): Remove.
([NSLock tmplock]): Ditto.
([NSLock tmplockFromFunction:file:line:]): Ditto.
([NSLock tmptryLock]): Ditto.
([NSLock tmptryLockFromFunction:file:line:]): Ditto.
([NSLock tmptryLockBeforeDate:]): Ditto.
([NSLock tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSLock tmpunlock]): Ditto.
([NSLock tmpunlockFromFunction:file:line:]): Ditto.
([NSLock description]): Ditto.
([NSRecursiveLock isLocked]): Ditto.
([NSRecursiveLock tmplock]): Ditto.
([NSRecursiveLock tmplockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLock]): Ditto.
([NSRecursiveLock tmptryLockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLockBeforeDate:]): Ditto.
([NSRecursiveLock
tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSRecursiveLock tmpunlock]): Ditto.
([NSRecursiveLock tmpunlockFromFunction:file:line:]): Ditto.
(NSLockException, MessageForMutexLockError)
(LoggedLock, LoggedLockBeforeDate, LoggedTryLock,
LoggedTryLockBeforeDate, LoggedUnlock): New macros.
(loggedLockBeforeDateFromFunctionInFileInLine,
loggedUnlockFromFunctionInFileInLine): New logging lock
functions.
([NSThread description]): New Category.
(volatileInternalDescription): New static function.
(GSW_LOCK_LIMIT): New marco.
* GSWeb.framework/GSWApplication.m
([GSWApplication isRequestHandlingLocked]): Test lock instead
of relying on obsolete lock categories.
([GSWApplication lockRequestHandling]): Use new locking
macros.
([GSWApplication unlockRequestHandling]): Ditto.
([GSWApplication lock]): Ditto.
([GSWApplication unlock]): Ditto.
* GSWeb.framework/GSWAssociation.m
([GSWAssociation setClasse:forHandler:]): Ditto
([GSWAssociation addLogHandlerClasse:]): Ditto.
([GSWAssociation removeLogHandlerClasse:]): Ditto.
([GSWAssociation logValue:forSet:]): Ditto.
([GSWAssociation
logSynchronizeForValue:inComponent:componentToParent:]):
Ditto.
* GSWeb.framework/GSWBundle.m
([GSWBundle unlock]): Ditto.
([GSWBundle lock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor tryLock]): Ditto.
([GSWDefaultAdaptor unlock]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle lock]): Ditto.
([GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager unlock]): Ditto.
([GSWResourceManager lock]): Ditto.
* GSWeb.framework/GSWSessionStore.m
([GSWSessionStore unlock]): Ditto.
([GSWSessionStore tryLock]): Ditto.
([GSWSessionStore lock]): Ditto.
* GSWeb.framework/GSWSessionTimeOutManager.m
([GSWSessionTimeOutManager
tryLockBeforeTimeIntervalSinceNow:]):
Ditto.
([GSWSessionTimeOutManager lockBeforeTimeIntervalSinceNow]):
Ditto.
([GSWSessionTimeOutManager unlock]): Ditto.
* GSWeb.framework/GSWStaticResourceRequestHandler.m
([GSWStaticResourceRequestHandler handleRequest:]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore unlock]): Ditto.
([GSWStatisticsStore lock]): Ditto.
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m:
([NSObject getIVarNamed]): Use GSW_LOCK_LIMIT macro.
Reformat.
([NSObject setIVarNamed:withValue:]): Ditto.
* Makefile.postamble: Remove autom4te.cache on distclean.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18605 72102866-910b-0410-8b05-ffd578937521
2004-02-16 14:37:46 +00:00
BOOL lockable = LoggedTryLock ( _globalLock ) ;
if ( lockable = = YES )
{
LoggedUnlock ( _globalLock ) ;
}
return ( lockable ? NO : YES ) ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// lockRequestHandling
- ( void ) lockRequestHandling
{
// OK
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
if ( ! [ self isConcurrentRequestHandlingEnabled ] )
2002-08-04 18:00:11 +00:00
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
/ * NSDebugMLLog ( @ "application" ,
@ "globalLockn=%d globalLock_thread_id=%@ "
@ "GSCurrentThread()=%@" ,
2002-08-04 18:00:11 +00:00
globalLockn , ( void * )
globalLock_thread _id ,
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
GSCurrentThread ( ) ) ;
2002-08-04 18:00:11 +00:00
if ( globalLockn > 0 )
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
if ( globalLock_thread _id ! = GSCurrentThread ( ) )
2002-08-04 18:00:11 +00:00
{
NSDebugMLLog ( @ "application" , @ "PROBLEM: owner!=thread id" ) ;
} ;
} ;
* /
NS_DURING
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugLockMLog ( @ "GLOBALLOCK lock %@" , GSCurrentThread ( ) ) ;
* GSWeb.framework/GSWUtils.h/m
(IsStyle,IsNumberStyle, ExceptionRaise, ExceptionRaise0,
ValidationExceptionRaise, ValidationExceptionRaise0,
ExceptionByAddingUserInfoObjectFrameInfo,
ExceptionByAddingUserInfoObjectFrameInfo0,
ExceptionByAddingUserInfoFunctionFrameInfo,
ExceptionByAddingUserInfoFunctionFrameInfo0, ): Reformat
defines.
(GSW_LOCK_LIMIT): New define.
(ExceptionRaiseFn, ExceptionRaiseFn0,
ValidationExceptionRaiseFn,
ValidationExceptionRaiseFn0): Reformat declaration.
(TmpLock, TmpTryLockBeforeDate, TmpLockBeforeDate, TmpUnlock):
Remove.
([NSLock isLocked]): Remove.
([NSLock tmplock]): Ditto.
([NSLock tmplockFromFunction:file:line:]): Ditto.
([NSLock tmptryLock]): Ditto.
([NSLock tmptryLockFromFunction:file:line:]): Ditto.
([NSLock tmptryLockBeforeDate:]): Ditto.
([NSLock tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSLock tmpunlock]): Ditto.
([NSLock tmpunlockFromFunction:file:line:]): Ditto.
([NSLock description]): Ditto.
([NSRecursiveLock isLocked]): Ditto.
([NSRecursiveLock tmplock]): Ditto.
([NSRecursiveLock tmplockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLock]): Ditto.
([NSRecursiveLock tmptryLockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLockBeforeDate:]): Ditto.
([NSRecursiveLock
tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSRecursiveLock tmpunlock]): Ditto.
([NSRecursiveLock tmpunlockFromFunction:file:line:]): Ditto.
(NSLockException, MessageForMutexLockError)
(LoggedLock, LoggedLockBeforeDate, LoggedTryLock,
LoggedTryLockBeforeDate, LoggedUnlock): New macros.
(loggedLockBeforeDateFromFunctionInFileInLine,
loggedUnlockFromFunctionInFileInLine): New logging lock
functions.
([NSThread description]): New Category.
(volatileInternalDescription): New static function.
(GSW_LOCK_LIMIT): New marco.
* GSWeb.framework/GSWApplication.m
([GSWApplication isRequestHandlingLocked]): Test lock instead
of relying on obsolete lock categories.
([GSWApplication lockRequestHandling]): Use new locking
macros.
([GSWApplication unlockRequestHandling]): Ditto.
([GSWApplication lock]): Ditto.
([GSWApplication unlock]): Ditto.
* GSWeb.framework/GSWAssociation.m
([GSWAssociation setClasse:forHandler:]): Ditto
([GSWAssociation addLogHandlerClasse:]): Ditto.
([GSWAssociation removeLogHandlerClasse:]): Ditto.
([GSWAssociation logValue:forSet:]): Ditto.
([GSWAssociation
logSynchronizeForValue:inComponent:componentToParent:]):
Ditto.
* GSWeb.framework/GSWBundle.m
([GSWBundle unlock]): Ditto.
([GSWBundle lock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor tryLock]): Ditto.
([GSWDefaultAdaptor unlock]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle lock]): Ditto.
([GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager unlock]): Ditto.
([GSWResourceManager lock]): Ditto.
* GSWeb.framework/GSWSessionStore.m
([GSWSessionStore unlock]): Ditto.
([GSWSessionStore tryLock]): Ditto.
([GSWSessionStore lock]): Ditto.
* GSWeb.framework/GSWSessionTimeOutManager.m
([GSWSessionTimeOutManager
tryLockBeforeTimeIntervalSinceNow:]):
Ditto.
([GSWSessionTimeOutManager lockBeforeTimeIntervalSinceNow]):
Ditto.
([GSWSessionTimeOutManager unlock]): Ditto.
* GSWeb.framework/GSWStaticResourceRequestHandler.m
([GSWStaticResourceRequestHandler handleRequest:]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore unlock]): Ditto.
([GSWStatisticsStore lock]): Ditto.
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m:
([NSObject getIVarNamed]): Use GSW_LOCK_LIMIT macro.
Reformat.
([NSObject setIVarNamed:withValue:]): Ditto.
* Makefile.postamble: Remove autom4te.cache on distclean.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18605 72102866-910b-0410-8b05-ffd578937521
2004-02-16 14:37:46 +00:00
LoggedLockBeforeDate ( _globalLock , GSW_LOCK _LIMIT ) ;
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugLockMLog ( @ "GLOBALLOCK locked %@" , GSCurrentThread ( ) ) ;
2000-01-22 12:49:49 +00:00
# ifndef NDEBUG
2002-08-04 18:00:11 +00:00
_globalLockn + + ;
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
_globalLock _thread _id = GSCurrentThread ( ) ;
2000-01-22 12:49:49 +00:00
# endif
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
/ * NSDebugMLLog ( @ "application" ,
@ "globalLockn=%d globalLock_thread_id=%@ GSCurrentThread()=%@" ,
globalLockn ,
globalLock_thread _id ,
GSCurrentThread ( ) ) ; * /
2002-08-04 18:00:11 +00:00
}
NS_HANDLER
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
* GSWeb.framework/GSWUtils.h/m
(IsStyle,IsNumberStyle, ExceptionRaise, ExceptionRaise0,
ValidationExceptionRaise, ValidationExceptionRaise0,
ExceptionByAddingUserInfoObjectFrameInfo,
ExceptionByAddingUserInfoObjectFrameInfo0,
ExceptionByAddingUserInfoFunctionFrameInfo,
ExceptionByAddingUserInfoFunctionFrameInfo0, ): Reformat
defines.
(GSW_LOCK_LIMIT): New define.
(ExceptionRaiseFn, ExceptionRaiseFn0,
ValidationExceptionRaiseFn,
ValidationExceptionRaiseFn0): Reformat declaration.
(TmpLock, TmpTryLockBeforeDate, TmpLockBeforeDate, TmpUnlock):
Remove.
([NSLock isLocked]): Remove.
([NSLock tmplock]): Ditto.
([NSLock tmplockFromFunction:file:line:]): Ditto.
([NSLock tmptryLock]): Ditto.
([NSLock tmptryLockFromFunction:file:line:]): Ditto.
([NSLock tmptryLockBeforeDate:]): Ditto.
([NSLock tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSLock tmpunlock]): Ditto.
([NSLock tmpunlockFromFunction:file:line:]): Ditto.
([NSLock description]): Ditto.
([NSRecursiveLock isLocked]): Ditto.
([NSRecursiveLock tmplock]): Ditto.
([NSRecursiveLock tmplockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLock]): Ditto.
([NSRecursiveLock tmptryLockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLockBeforeDate:]): Ditto.
([NSRecursiveLock
tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSRecursiveLock tmpunlock]): Ditto.
([NSRecursiveLock tmpunlockFromFunction:file:line:]): Ditto.
(NSLockException, MessageForMutexLockError)
(LoggedLock, LoggedLockBeforeDate, LoggedTryLock,
LoggedTryLockBeforeDate, LoggedUnlock): New macros.
(loggedLockBeforeDateFromFunctionInFileInLine,
loggedUnlockFromFunctionInFileInLine): New logging lock
functions.
([NSThread description]): New Category.
(volatileInternalDescription): New static function.
(GSW_LOCK_LIMIT): New marco.
* GSWeb.framework/GSWApplication.m
([GSWApplication isRequestHandlingLocked]): Test lock instead
of relying on obsolete lock categories.
([GSWApplication lockRequestHandling]): Use new locking
macros.
([GSWApplication unlockRequestHandling]): Ditto.
([GSWApplication lock]): Ditto.
([GSWApplication unlock]): Ditto.
* GSWeb.framework/GSWAssociation.m
([GSWAssociation setClasse:forHandler:]): Ditto
([GSWAssociation addLogHandlerClasse:]): Ditto.
([GSWAssociation removeLogHandlerClasse:]): Ditto.
([GSWAssociation logValue:forSet:]): Ditto.
([GSWAssociation
logSynchronizeForValue:inComponent:componentToParent:]):
Ditto.
* GSWeb.framework/GSWBundle.m
([GSWBundle unlock]): Ditto.
([GSWBundle lock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor tryLock]): Ditto.
([GSWDefaultAdaptor unlock]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle lock]): Ditto.
([GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager unlock]): Ditto.
([GSWResourceManager lock]): Ditto.
* GSWeb.framework/GSWSessionStore.m
([GSWSessionStore unlock]): Ditto.
([GSWSessionStore tryLock]): Ditto.
([GSWSessionStore lock]): Ditto.
* GSWeb.framework/GSWSessionTimeOutManager.m
([GSWSessionTimeOutManager
tryLockBeforeTimeIntervalSinceNow:]):
Ditto.
([GSWSessionTimeOutManager lockBeforeTimeIntervalSinceNow]):
Ditto.
([GSWSessionTimeOutManager unlock]): Ditto.
* GSWeb.framework/GSWStaticResourceRequestHandler.m
([GSWStaticResourceRequestHandler handleRequest:]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore unlock]): Ditto.
([GSWStatisticsStore lock]): Ditto.
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m:
([NSObject getIVarNamed]): Use GSW_LOCK_LIMIT macro.
Reformat.
([NSObject setIVarNamed:withValue:]): Ditto.
* Makefile.postamble: Remove autom4te.cache on distclean.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18605 72102866-910b-0410-8b05-ffd578937521
2004-02-16 14:37:46 +00:00
@ "globalLock loggedlockBeforeDate" ) ;
2002-08-04 18:00:11 +00:00
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
} ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// unlockRequestHandling
- ( void ) unlockRequestHandling
{
// OK
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
if ( ! [ self isConcurrentRequestHandlingEnabled ] )
2002-08-04 18:00:11 +00:00
{
NS_DURING
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
/ * NSDebugMLLog ( @ "application" ,
@ "globalLockn=%d globalLock_thread_id=%@ GSCurrentThread()=%@" ,
2002-08-04 18:00:11 +00:00
globalLockn ,
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
globalLock_thread _id ,
GSCurrentThread ( ) ) ; * /
2002-08-04 18:00:11 +00:00
if ( _globalLockn > 0 )
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
if ( _globalLock _thread _id ! = GSCurrentThread ( ) )
2002-08-04 18:00:11 +00:00
{
NSDebugMLLog0 ( @ "application" , @ "PROBLEM: owner!=thread id" ) ;
} ;
} ;
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugLockMLog ( @ "GLOBALLOCK unlock %@" , GSCurrentThread ( ) ) ;
* GSWeb.framework/GSWUtils.h/m
(IsStyle,IsNumberStyle, ExceptionRaise, ExceptionRaise0,
ValidationExceptionRaise, ValidationExceptionRaise0,
ExceptionByAddingUserInfoObjectFrameInfo,
ExceptionByAddingUserInfoObjectFrameInfo0,
ExceptionByAddingUserInfoFunctionFrameInfo,
ExceptionByAddingUserInfoFunctionFrameInfo0, ): Reformat
defines.
(GSW_LOCK_LIMIT): New define.
(ExceptionRaiseFn, ExceptionRaiseFn0,
ValidationExceptionRaiseFn,
ValidationExceptionRaiseFn0): Reformat declaration.
(TmpLock, TmpTryLockBeforeDate, TmpLockBeforeDate, TmpUnlock):
Remove.
([NSLock isLocked]): Remove.
([NSLock tmplock]): Ditto.
([NSLock tmplockFromFunction:file:line:]): Ditto.
([NSLock tmptryLock]): Ditto.
([NSLock tmptryLockFromFunction:file:line:]): Ditto.
([NSLock tmptryLockBeforeDate:]): Ditto.
([NSLock tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSLock tmpunlock]): Ditto.
([NSLock tmpunlockFromFunction:file:line:]): Ditto.
([NSLock description]): Ditto.
([NSRecursiveLock isLocked]): Ditto.
([NSRecursiveLock tmplock]): Ditto.
([NSRecursiveLock tmplockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLock]): Ditto.
([NSRecursiveLock tmptryLockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLockBeforeDate:]): Ditto.
([NSRecursiveLock
tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSRecursiveLock tmpunlock]): Ditto.
([NSRecursiveLock tmpunlockFromFunction:file:line:]): Ditto.
(NSLockException, MessageForMutexLockError)
(LoggedLock, LoggedLockBeforeDate, LoggedTryLock,
LoggedTryLockBeforeDate, LoggedUnlock): New macros.
(loggedLockBeforeDateFromFunctionInFileInLine,
loggedUnlockFromFunctionInFileInLine): New logging lock
functions.
([NSThread description]): New Category.
(volatileInternalDescription): New static function.
(GSW_LOCK_LIMIT): New marco.
* GSWeb.framework/GSWApplication.m
([GSWApplication isRequestHandlingLocked]): Test lock instead
of relying on obsolete lock categories.
([GSWApplication lockRequestHandling]): Use new locking
macros.
([GSWApplication unlockRequestHandling]): Ditto.
([GSWApplication lock]): Ditto.
([GSWApplication unlock]): Ditto.
* GSWeb.framework/GSWAssociation.m
([GSWAssociation setClasse:forHandler:]): Ditto
([GSWAssociation addLogHandlerClasse:]): Ditto.
([GSWAssociation removeLogHandlerClasse:]): Ditto.
([GSWAssociation logValue:forSet:]): Ditto.
([GSWAssociation
logSynchronizeForValue:inComponent:componentToParent:]):
Ditto.
* GSWeb.framework/GSWBundle.m
([GSWBundle unlock]): Ditto.
([GSWBundle lock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor tryLock]): Ditto.
([GSWDefaultAdaptor unlock]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle lock]): Ditto.
([GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager unlock]): Ditto.
([GSWResourceManager lock]): Ditto.
* GSWeb.framework/GSWSessionStore.m
([GSWSessionStore unlock]): Ditto.
([GSWSessionStore tryLock]): Ditto.
([GSWSessionStore lock]): Ditto.
* GSWeb.framework/GSWSessionTimeOutManager.m
([GSWSessionTimeOutManager
tryLockBeforeTimeIntervalSinceNow:]):
Ditto.
([GSWSessionTimeOutManager lockBeforeTimeIntervalSinceNow]):
Ditto.
([GSWSessionTimeOutManager unlock]): Ditto.
* GSWeb.framework/GSWStaticResourceRequestHandler.m
([GSWStaticResourceRequestHandler handleRequest:]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore unlock]): Ditto.
([GSWStatisticsStore lock]): Ditto.
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m:
([NSObject getIVarNamed]): Use GSW_LOCK_LIMIT macro.
Reformat.
([NSObject setIVarNamed:withValue:]): Ditto.
* Makefile.postamble: Remove autom4te.cache on distclean.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18605 72102866-910b-0410-8b05-ffd578937521
2004-02-16 14:37:46 +00:00
LoggedUnlock ( _globalLock ) ;
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugLockMLog ( @ "GLOBALLOCK unlocked %@" , GSCurrentThread ( ) ) ;
2000-01-22 12:49:49 +00:00
# ifndef NDEBUG
2002-08-04 18:00:11 +00:00
_globalLockn - - ;
if ( _globalLockn = = 0 )
_globalLock _thread _id = NULL ;
2000-01-22 12:49:49 +00:00
# endif
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
/ * NSDebugMLLog ( @ "application" ,
@ "globalLockn=%d globalLock_thread_id=%@ GSCurrentThread()=%@" ,
globalLockn ,
globalLock_thread _id ,
GSCurrentThread ( ) ) ; * /
2002-08-04 18:00:11 +00:00
}
NS_HANDLER
{
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
NSDebugMLog ( @ "globalLockn=%d globalLock_thread_id=%@ "
@ "GSCurrentThread()=%@" ,
2003-02-01 19:07:25 +00:00
_globalLockn ,
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
_globalLock _thread _id ,
GSCurrentThread ( ) ) ;
2002-08-04 18:00:11 +00:00
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
* GSWeb.framework/GSWUtils.h/m
(IsStyle,IsNumberStyle, ExceptionRaise, ExceptionRaise0,
ValidationExceptionRaise, ValidationExceptionRaise0,
ExceptionByAddingUserInfoObjectFrameInfo,
ExceptionByAddingUserInfoObjectFrameInfo0,
ExceptionByAddingUserInfoFunctionFrameInfo,
ExceptionByAddingUserInfoFunctionFrameInfo0, ): Reformat
defines.
(GSW_LOCK_LIMIT): New define.
(ExceptionRaiseFn, ExceptionRaiseFn0,
ValidationExceptionRaiseFn,
ValidationExceptionRaiseFn0): Reformat declaration.
(TmpLock, TmpTryLockBeforeDate, TmpLockBeforeDate, TmpUnlock):
Remove.
([NSLock isLocked]): Remove.
([NSLock tmplock]): Ditto.
([NSLock tmplockFromFunction:file:line:]): Ditto.
([NSLock tmptryLock]): Ditto.
([NSLock tmptryLockFromFunction:file:line:]): Ditto.
([NSLock tmptryLockBeforeDate:]): Ditto.
([NSLock tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSLock tmpunlock]): Ditto.
([NSLock tmpunlockFromFunction:file:line:]): Ditto.
([NSLock description]): Ditto.
([NSRecursiveLock isLocked]): Ditto.
([NSRecursiveLock tmplock]): Ditto.
([NSRecursiveLock tmplockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLock]): Ditto.
([NSRecursiveLock tmptryLockFromFunction:file:line:]): Ditto.
([NSRecursiveLock tmptryLockBeforeDate:]): Ditto.
([NSRecursiveLock
tmptryLockBeforeDate:fromFunction:file:line:]):
Ditto.
([NSRecursiveLock tmpunlock]): Ditto.
([NSRecursiveLock tmpunlockFromFunction:file:line:]): Ditto.
(NSLockException, MessageForMutexLockError)
(LoggedLock, LoggedLockBeforeDate, LoggedTryLock,
LoggedTryLockBeforeDate, LoggedUnlock): New macros.
(loggedLockBeforeDateFromFunctionInFileInLine,
loggedUnlockFromFunctionInFileInLine): New logging lock
functions.
([NSThread description]): New Category.
(volatileInternalDescription): New static function.
(GSW_LOCK_LIMIT): New marco.
* GSWeb.framework/GSWApplication.m
([GSWApplication isRequestHandlingLocked]): Test lock instead
of relying on obsolete lock categories.
([GSWApplication lockRequestHandling]): Use new locking
macros.
([GSWApplication unlockRequestHandling]): Ditto.
([GSWApplication lock]): Ditto.
([GSWApplication unlock]): Ditto.
* GSWeb.framework/GSWAssociation.m
([GSWAssociation setClasse:forHandler:]): Ditto
([GSWAssociation addLogHandlerClasse:]): Ditto.
([GSWAssociation removeLogHandlerClasse:]): Ditto.
([GSWAssociation logValue:forSet:]): Ditto.
([GSWAssociation
logSynchronizeForValue:inComponent:componentToParent:]):
Ditto.
* GSWeb.framework/GSWBundle.m
([GSWBundle unlock]): Ditto.
([GSWBundle lock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor tryLock]): Ditto.
([GSWDefaultAdaptor unlock]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle lock]): Ditto.
([GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager unlock]): Ditto.
([GSWResourceManager lock]): Ditto.
* GSWeb.framework/GSWSessionStore.m
([GSWSessionStore unlock]): Ditto.
([GSWSessionStore tryLock]): Ditto.
([GSWSessionStore lock]): Ditto.
* GSWeb.framework/GSWSessionTimeOutManager.m
([GSWSessionTimeOutManager
tryLockBeforeTimeIntervalSinceNow:]):
Ditto.
([GSWSessionTimeOutManager lockBeforeTimeIntervalSinceNow]):
Ditto.
([GSWSessionTimeOutManager unlock]): Ditto.
* GSWeb.framework/GSWStaticResourceRequestHandler.m
([GSWStaticResourceRequestHandler handleRequest:]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore unlock]): Ditto.
([GSWStatisticsStore lock]): Ditto.
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m:
([NSObject getIVarNamed]): Use GSW_LOCK_LIMIT macro.
Reformat.
([NSObject setIVarNamed:withValue:]): Ditto.
* Makefile.postamble: Remove autom4te.cache on distclean.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18605 72102866-910b-0410-8b05-ffd578937521
2004-02-16 14:37:46 +00:00
@ "globalLock loggedunlock" ) ;
2002-08-04 18:00:11 +00:00
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
} ;
2007-04-13 18:32:02 +00:00
2008-04-20 18:25:56 +00:00
}
2000-01-22 12:49:49 +00:00
2008-04-20 18:25:56 +00:00
- ( void ) lock
2000-01-22 12:49:49 +00:00
{
2008-04-20 18:25:56 +00:00
[ _globalLock lock ] ;
}
2000-01-22 12:49:49 +00:00
2008-04-20 18:25:56 +00:00
- ( void ) unlock
2000-01-22 12:49:49 +00:00
{
2008-04-20 18:25:56 +00:00
[ _globalLock unlock ] ;
}
2000-01-22 12:49:49 +00:00
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) isTaskDaemon
{
return [ [ self name ] isEqual : @ "gswtaskd" ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// name
- ( NSString * ) name
{
2002-08-04 18:00:11 +00:00
NSString * name = nil ;
NSProcessInfo * processInfo = nil ;
NSString * processName = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
// TODO
/ * if ( applicationName )
return applicationName ;
else
{ * /
2002-08-04 18:00:11 +00:00
processInfo = [ NSProcessInfo processInfo ] ;
processName = [ processInfo processName ] ;
NSDebugMLLog ( @ "application" , @ "_cmd:%p" , _cmd ) ;
NSDebugMLLog ( @ "application" , @ "processInfo:%@" , processInfo ) ;
NSDebugMLLog ( @ "application" , @ "processName:%@" , processName ) ;
processName = [ processName lastPathComponent ] ;
if ( [ processName hasSuffix : GSWApplicationPSuffix [ GSWebNamingConv ] ] )
2002-09-22 14:27:04 +00:00
name = [ processName stringByDeletingSuffix : GSWApplicationPSuffix [ GSWebNamingConv ] ] ;
2002-08-04 18:00:11 +00:00
else
name = processName ;
NSDebugMLLog ( @ "application" , @ "_name:%@ %p" , name , name ) ;
// } ;
return name ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// number
- ( NSString * ) number
{
2003-11-24 09:54:32 +00:00
return @ "-1" ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// path
- ( NSString * ) path
{
2002-08-04 18:00:11 +00:00
NSString * path = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
NSDebugMLLog ( @ "bundles" , @ "[GSWResourceManager _applicationGSWBundle]:%@" , [ GSWResourceManager _applicationGSWBundle ] ) ;
2003-11-24 09:54:32 +00:00
path = [ [ GSWResourceManager _applicationGSWBundle ] path ] ;
2002-08-04 18:00:11 +00:00
NSDebugMLLog ( @ "application" , @ "path:%@" , path ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return path ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// baseURL
- ( NSString * ) baseURL
{
2002-08-04 18:00:11 +00:00
NSString * baseURL = nil ;
2000-01-22 12:49:49 +00:00
LOGObjectFnNotImplemented ( ) ; // TODOFN
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
baseURL = [ GSWURLPrefix [ GSWebNamingConv ] stringByAppendingString : [ self name ] ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return baseURL ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) registerRequestHandlers
{
// OK
2002-08-04 18:00:11 +00:00
NSString * componentRequestHandlerKey = nil ;
NSString * resourceRequestHandlerKey = nil ;
NSString * directActionRequestHandlerKey = nil ;
2003-11-24 09:54:32 +00:00
NSString * pingDirectActionRequestHandlerKey = nil ;
NSString * streamDirectActionRequestHandlerKey = nil ;
2002-08-04 18:00:11 +00:00
GSWRequestHandler * componentRequestHandler = nil ;
GSWResourceRequestHandler * resourceRequestHandler = nil ;
GSWDirectActionRequestHandler * directActionRequestHandler = nil ;
2003-11-24 09:54:32 +00:00
GSWDirectActionRequestHandler * pingDirectActionRequestHandler = nil ;
GSWDirectActionRequestHandler * streamDirectActionRequestHandler = nil ;
GSWRequestHandler * defaultRequestHandler = nil ;
Class defaultRequestHandlerClass = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
// Component Handler
2002-08-04 18:00:11 +00:00
componentRequestHandler = [ [ self class ] _componentRequestHandler ] ;
componentRequestHandlerKey = [ [ self class ] componentRequestHandlerKey ] ;
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "componentRequestHandlerKey:%@" ,
componentRequestHandlerKey ) ;
// Resource Handler
resourceRequestHandler = ( GSWResourceRequestHandler * )
[ GSWResourceRequestHandler handler ] ;
2002-08-04 18:00:11 +00:00
resourceRequestHandlerKey = [ [ self class ] resourceRequestHandlerKey ] ;
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "resourceRequestHandlerKey:%@" ,
resourceRequestHandlerKey ) ;
// DirectAction Handler
directActionRequestHandler = ( GSWDirectActionRequestHandler * )
[ GSWDirectActionRequestHandler handler ] ;
2002-08-04 18:00:11 +00:00
directActionRequestHandlerKey = [ [ self class ] directActionRequestHandlerKey ] ;
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "directActionRequestHandlerKey:%@" ,
directActionRequestHandlerKey ) ;
// "Ping" Handler
pingDirectActionRequestHandler = ( GSWDirectActionRequestHandler * )
[ GSWDirectActionRequestHandler handlerWithDefaultActionClassName : @ "GSWAdminAction"
defaultActionName : @ "ping"
shouldAddToStatistics : NO ] ;
pingDirectActionRequestHandlerKey = [ [ self class ] pingActionRequestHandlerKey ] ;
NSDebugMLLog ( @ "application" , @ "pingDirectActionRequestHandlerKey:%@" ,
pingDirectActionRequestHandlerKey ) ;
// Stream Handler
streamDirectActionRequestHandler = ( GSWDirectActionRequestHandler * )
[ GSWDirectActionRequestHandler handler ] ;
streamDirectActionRequestHandlerKey = [ [ self class ] streamActionRequestHandlerKey ] ;
[ streamDirectActionRequestHandler setAllowsContentInputStream : YES ] ;
NSDebugMLLog ( @ "application" , @ "streamDirectActionRequestHandlerKey:%@" ,
streamDirectActionRequestHandlerKey ) ;
2002-08-04 18:00:11 +00:00
[ self registerRequestHandler : componentRequestHandler
forKey : componentRequestHandlerKey ] ;
[ self registerRequestHandler : resourceRequestHandler
forKey : resourceRequestHandlerKey ] ;
[ self registerRequestHandler : directActionRequestHandler
forKey : directActionRequestHandlerKey ] ;
[ self registerRequestHandler : directActionRequestHandler
forKey : GSWDirectActionRequestHandlerKey [ GSWebNamingConvInversed ] ] ;
2003-11-24 09:54:32 +00:00
[ self registerRequestHandler : pingDirectActionRequestHandler
forKey : pingDirectActionRequestHandlerKey ] ;
[ self registerRequestHandler : streamDirectActionRequestHandler
forKey : streamDirectActionRequestHandlerKey ] ;
// Default Request Handler
defaultRequestHandlerClass = [ self defaultRequestHandlerClass ] ;
if ( defaultRequestHandlerClass )
defaultRequestHandler = ( GSWRequestHandler * ) [ defaultRequestHandlerClass handler ] ;
else
defaultRequestHandler = componentRequestHandler ;
[ self setDefaultRequestHandler : defaultRequestHandler ] ;
// If direct connect enabled , add static resources handler
2004-01-13 15:00:55 +00:00
if ( [ [ self class ] isDirectConnectEnabled ] )
2003-11-24 09:54:32 +00:00
{
GSWStaticResourceRequestHandler * staticResourceRequestHandler = ( GSWStaticResourceRequestHandler * )
[ GSWStaticResourceRequestHandler handler ] ;
NSString * staticResourceRequestHandlerKey = [ [ self class ] staticResourceRequestHandlerKey ] ;
[ self registerRequestHandler : staticResourceRequestHandler
forKey : staticResourceRequestHandlerKey ] ;
} ;
2002-08-04 18:00:11 +00:00
NSDebugMLLog ( @ "application" , @ "_requestHandlers:%@" , _requestHandlers ) ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
2005-12-17 16:44:58 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) defaultRequestHandlerClassName
{
return @ "GSWComponentRequestHandle" ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( Class ) defaultRequestHandlerClass
{
Class defaultRequestHandlerClass = Nil ;
NSString * className = [ self defaultRequestHandlerClassName ] ;
if ( [ className length ] > 0 )
{
defaultRequestHandlerClass = NSClassFromString ( className ) ;
} ;
return defaultRequestHandlerClass ;
} ;
2000-01-22 12:49:49 +00:00
- ( void ) becomesMultiThreaded
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
2003-11-24 09:54:32 +00:00
- ( NSString * ) _webserverConnectURL
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
NSString * webserverConnectURL = nil ;
2007-04-13 18:32:02 +00:00
NSString * cgiAdaptorURL = [ [ self class ] cgiAdaptorURL ] ; // return http : // www . example . com / cgi - bin / GSWeb . exe
2003-11-24 09:54:32 +00:00
if ( ! cgiAdaptorURL )
{
NSDebugMLog ( @ "No CGI adaptor" ) ;
}
else
{
int port = 1 ;
NSArray * adaptors = [ self adaptors ] ;
if ( [ adaptors count ] > 0 )
{
GSWAdaptor * firstAdaptor = [ adaptors objectAtIndex : 0 ] ;
port = [ firstAdaptor port ] ;
} ;
webserverConnectURL = [ NSString stringWithFormat : @ "%@/%@.%@/-%d" ,
cgiAdaptorURL ,
[ self name ] ,
[ self _applicationExtension ] ,
port ] ;
NSDebugMLog ( @ "webserverConnectURL=%@" , webserverConnectURL ) ;
}
2007-04-13 18:32:02 +00:00
return webserverConnectURL ; // return http : // www . example . com : 1436 / cgi - bin / GSWeb . exe / ObjCTest3 . gswa / -2
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _directConnectURL
{
2007-04-13 18:32:02 +00:00
Class GSWAppClass = [ self class ] ;
2002-08-04 18:00:11 +00:00
NSString * directConnectURL = nil ;
2007-04-13 18:32:02 +00:00
directConnectURL = [ NSString stringWithFormat : @ "http://%@:%@%@/%@.%@/0/" , [ GSWAppClass host ] ,
[ GSWAppClass port ] ,
[ GSWAppClass applicationBaseURL ] ,
[ self name ] ,
[ self _applicationExtension ] ] ;
return directConnectURL ; // return http : // www . example . com : 1436 / cgi - bin / GSWeb . exe / ObjCTest3
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
- ( NSString * ) _applicationExtension
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
return GSWApplicationSuffix [ GSWebNamingConv ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _resetCacheForGeneration
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _resetCache
{
// OK
2007-04-13 18:32:02 +00:00
NSEnumerator * anEnum = nil ;
GSWComponentDefinition * definition = nil ;
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
anEnum = [ _componentDefinitionCache objectEnumerator ] ;
2007-04-13 18:32:02 +00:00
while ( ( definition = [ anEnum nextObject ] ) )
2002-08-04 18:00:11 +00:00
{
2007-04-13 18:32:02 +00:00
if ( ( ( NSString * ) definition ! = GSNotFoundMarker ) && ( ! [ definition isCachingEnabled ] ) )
[ definition _clearCache ] ;
}
2002-08-04 18:00:11 +00:00
if ( ! [ self isCachingEnabled ] )
{
[ [ GSWResourceManager _applicationGSWBundle ] clearCache ] ;
2007-04-13 18:32:02 +00:00
}
2002-08-04 18:00:11 +00:00
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
2004-03-01 16:56:42 +00:00
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException , @ "In Application _resetCache" ) ;
2002-08-04 18:00:11 +00:00
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ self unlock ] ;
[ localException raise ] ;
// TODO
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
2007-04-13 18:32:02 +00:00
- ( GSWComponentDefinition * ) _componentDefinitionWithName : ( NSString * ) aName
languages : ( NSArray * ) languages
2000-01-22 12:49:49 +00:00
{
// OK
2002-08-04 18:00:11 +00:00
GSWComponentDefinition * componentDefinition = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
NSDebugMLLog ( @ "info" , @ "aName=%@" , aName ) ;
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
componentDefinition = [ self lockedComponentDefinitionWithName : aName
languages : languages ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In lockedComponentDefinitionWithName" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return componentDefinition ;
2000-01-22 12:49:49 +00:00
} ;
2002-08-04 18:00:11 +00:00
- ( GSWComponentDefinition * ) lockedComponentDefinitionWithName : ( NSString * ) aName
languages : ( NSArray * ) languages
2000-01-22 12:49:49 +00:00
{
// OK
2000-03-16 16:16:49 +00:00
BOOL isCachedComponent = NO ;
2002-08-04 18:00:11 +00:00
GSWComponentDefinition * componentDefinition = nil ;
NSString * language = nil ;
2000-01-22 12:49:49 +00:00
int iLanguage = 0 ;
2004-12-31 14:33:16 +00:00
int languagesCount = 0 ;
languagesCount = [ languages count ] ;
for ( iLanguage = 0 ; iLanguage < languagesCount && ! componentDefinition ; iLanguage + + )
2007-04-13 18:32:02 +00:00
{
language = [ languages objectAtIndex : iLanguage ] ;
if ( language )
2002-01-26 10:43:23 +00:00
{
2007-04-13 18:32:02 +00:00
if ( [ self isCachingEnabled ] )
{
componentDefinition = [ _componentDefinitionCache objectForKeys : aName , language , nil ] ;
if ( componentDefinition = = ( GSWComponentDefinition * ) GSNotFoundMarker )
componentDefinition = nil ;
else if ( componentDefinition )
isCachedComponent = YES ;
}
if ( ! componentDefinition )
{
componentDefinition = [ self lockedLoadComponentDefinitionWithName : aName
language : language ] ;
if ( [ self isCachingEnabled ] )
2002-01-26 10:43:23 +00:00
{
2007-04-13 18:32:02 +00:00
if ( componentDefinition )
[ _componentDefinitionCache setObject : componentDefinition
forKeys : aName , language , nil ] ;
else
[ _componentDefinitionCache setObject : GSNotFoundMarker
forKeys : aName , language , nil ] ;
2002-01-26 10:43:23 +00:00
} ;
2007-04-13 18:32:02 +00:00
} ;
2002-01-26 10:43:23 +00:00
} ;
2007-04-13 18:32:02 +00:00
} ;
2002-08-04 18:00:11 +00:00
if ( ! componentDefinition )
2002-01-26 10:43:23 +00:00
{
2002-08-04 18:00:11 +00:00
language = nil ;
2007-04-13 18:32:02 +00:00
2002-01-26 10:43:23 +00:00
if ( [ self isCachingEnabled ] )
{
2002-08-04 18:00:11 +00:00
componentDefinition = [ _componentDefinitionCache objectForKeys : aName , nil ] ;
if ( componentDefinition = = ( GSWComponentDefinition * ) GSNotFoundMarker )
componentDefinition = nil ;
else if ( componentDefinition )
2002-01-26 10:43:23 +00:00
isCachedComponent = YES ;
} ;
2002-08-04 18:00:11 +00:00
if ( ! componentDefinition )
2002-01-26 10:43:23 +00:00
{
2002-08-04 18:00:11 +00:00
componentDefinition = [ self lockedLoadComponentDefinitionWithName : aName
language : language ] ;
2002-01-26 10:43:23 +00:00
if ( [ self isCachingEnabled ] )
{
2002-08-04 18:00:11 +00:00
if ( componentDefinition )
[ _componentDefinitionCache setObject : componentDefinition
forKeys : aName , nil ] ;
2002-01-26 10:43:23 +00:00
else
2002-08-04 18:00:11 +00:00
[ _componentDefinitionCache setObject : GSNotFoundMarker
forKeys : aName , nil ] ;
2002-01-26 10:43:23 +00:00
} ;
} ;
} ;
2004-01-18 13:06:12 +00:00
if ( ! componentDefinition )
{
static Class gswCClass = nil ;
Class cClass = NSClassFromString ( [ aName lastPathComponent ] ) ;
2007-04-13 18:32:02 +00:00
if ( gswCClass = = nil )
{
gswCClass = [ GSWComponent class ] ;
}
if ( cClass ! = 0 && [ cClass isSubclassOfClass : gswCClass ] )
{
NSString * baseURL
= @ "/ERROR/RelativeUrlsNotSupportedWhenCompenentHasNoWrapper" ;
NSString * bundlePath
= [ [ NSBundle bundleForClass : cClass ] bundlePath ] ;
NSString * frameworkName
= [ [ bundlePath lastPathComponent ] stringByDeletingPathExtension ] ;
// xxxx
2004-01-18 13:06:12 +00:00
2007-04-13 18:32:02 +00:00
NS_DURING
{
componentDefinition = [ GSWComponentDefinition alloc ] ;
[ componentDefinition initWithName : aName
path : bundlePath
baseURL : baseURL
frameworkName : frameworkName ] ;
[ componentDefinition autorelease ] ;
}
NS_HANDLER
{
[ componentDefinition release ] ;
componentDefinition = nil ;
[ localException raise ] ;
}
NS_ENDHANDLER
if ( [ self isCachingEnabled ] && ( componentDefinition ) )
{
[ _componentDefinitionCache setObject : componentDefinition
forKeys : aName , nil ] ;
}
}
}
2004-01-18 13:06:12 +00:00
2002-08-04 18:00:11 +00:00
if ( ! componentDefinition )
2007-04-13 18:32:02 +00:00
{
NSLog ( @ "EXCEPTION: allFrameworks pathes=%@" , [ [ NSBundle allFrameworks ] valueForKey : @ "resourcePath" ] ) ;
ExceptionRaise ( GSWPageNotFoundException ,
@ "Unable to create component definition for %@ for languages: %@ (no componentDefinition)." ,
aName ,
languages ) ;
}
2002-08-04 18:00:11 +00:00
return componentDefinition ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWComponentDefinition * ) lockedLoadComponentDefinitionWithName : ( NSString * ) aName
language : ( NSString * ) language
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWComponentDefinition * componentDefinition = nil ;
GSWResourceManager * resourceManager = nil ;
NSString * frameworkName = nil ;
NSString * resourceName = nil ;
NSString * htmlResourceName = nil ;
NSString * path = nil ;
NSString * url = nil ;
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
int iName = 0 ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
for ( iName = 0 ; ! path && iName < 2 ; iName + + )
2007-04-13 18:32:02 +00:00
{
resourceName = [ aName stringByAppendingString : GSWPagePSuffix [ GSWebNamingConvForRound ( iName ) ] ] ;
htmlResourceName = [ aName stringByAppendingString : GSWComponentTemplatePSuffix ] ;
resourceManager = [ self resourceManager ] ;
path = [ resourceManager pathForResourceNamed : resourceName
inFramework : nil
language : language ] ;
if ( ! path )
{
NSArray * frameworks = [ self lockedComponentBearingFrameworks ] ;
NSBundle * framework = nil ;
int frameworkN = 0 ;
int frameworksCount = [ frameworks count ] ;
for ( frameworkN = 0 ; frameworkN < frameworksCount && ! path ; frameworkN + + )
{
framework = [ frameworks objectAtIndex : frameworkN ] ;
path = [ resourceManager pathForResourceNamed : resourceName
inFramework : [ framework bundleName ]
language : language ] ;
if ( ! path )
{
path = [ resourceManager pathForResourceNamed : htmlResourceName
inFramework : [ framework bundleName ]
language : language ] ;
}
if ( path )
{
frameworkName = [ framework bundlePath ] ;
frameworkName = [ frameworkName lastPathComponent ] ;
frameworkName = [ frameworkName stringByDeletingPathExtension ] ;
}
}
}
}
2002-08-04 18:00:11 +00:00
if ( path )
2007-04-13 18:32:02 +00:00
{
url = [ resourceManager urlForResourceNamed : resourceName
inFramework : frameworkName
languages : ( language ? [ NSArray arrayWithObject : language ] : nil )
request : nil ] ;
NS_DURING
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
{
2007-04-13 18:32:02 +00:00
componentDefinition = [ GSWComponentDefinition alloc ] ;
[ componentDefinition initWithName : aName
path : path
baseURL : url
frameworkName : frameworkName ] ;
[ componentDefinition autorelease ] ;
}
NS_HANDLER
{
[ componentDefinition release ] ;
componentDefinition = nil ;
[ localException raise ] ;
}
NS_ENDHANDLER
}
2002-08-04 18:00:11 +00:00
return componentDefinition ;
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSArray * ) lockedComponentBearingFrameworks
{
// OK
2002-08-04 18:00:11 +00:00
NSArray * array = nil ;
2002-09-16 23:50:55 +00:00
NSMutableArray * allFrameworks = nil ;
2007-04-13 18:32:02 +00:00
2002-09-16 23:50:55 +00:00
allFrameworks = [ [ NSBundle allFrameworks ] mutableCopy ] ;
[ allFrameworks addObjectsFromArray : [ NSBundle allBundles ] ] ;
2003-04-09 12:03:17 +00:00
// NSDebugMLLog ( @ "gswcomponents" , @ "allFrameworks=%@" , allFrameworks ) ;
// NSDebugFLLog ( @ "gswcomponents" , @ "allFrameworks pathes=%@" , [ allFrameworks valueForKey : @ "resourcePath" ] ) ;
2002-08-04 18:00:11 +00:00
array = [ self lockedInitComponentBearingFrameworksFromBundleArray : allFrameworks ] ;
NSDebugMLLog ( @ "gswcomponents" , @ "array=%@" , array ) ;
2002-09-16 23:50:55 +00:00
[ allFrameworks release ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return array ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( NSArray * ) lockedInitComponentBearingFrameworksFromBundleArray : ( NSArray * ) bundles
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
NSMutableArray * array = nil ;
2000-01-22 12:49:49 +00:00
int i = 0 ;
2004-12-31 14:33:16 +00:00
int bundlesCount = 0 ;
2002-08-04 18:00:11 +00:00
NSBundle * bundle = nil ;
2004-08-28 11:17:33 +00:00
// NSDictionary * bundleInfo = nil ;
2004-05-16 18:29:20 +00:00
// This makes only trouble and saves not so much time dave @ turbocat . de
// id hasGSWComponents = nil ;
2004-12-31 14:33:16 +00:00
2007-04-13 18:32:02 +00:00
2004-12-31 14:33:16 +00:00
2002-08-04 18:00:11 +00:00
array = [ NSMutableArray array ] ;
2004-12-31 14:33:16 +00:00
bundlesCount = [ bundles count ] ;
for ( i = 0 ; i < bundlesCount ; i + + )
2002-08-04 18:00:11 +00:00
{
bundle = [ bundles objectAtIndex : i ] ;
2003-04-09 12:03:17 +00:00
// NSDebugMLLog ( @ "gswcomponents" , @ "bundle=%@" , bundle ) ;
// NSDebugMLLog ( @ "gswcomponents" , @ "bundle resourcePath=%@" , [ bundle resourcePath ] ) ;
2004-05-16 18:29:20 +00:00
// / bundleInfo = [ bundle infoDictionary ] ;
2003-04-09 12:03:17 +00:00
// NSDebugMLLog ( @ "gswcomponents" , @ "bundleInfo=%@" , bundleInfo ) ;
2004-05-16 18:29:20 +00:00
// / hasGSWComponents = [ bundleInfo objectForKey : @ "HasGSWComponents" ] ;
2003-04-09 12:03:17 +00:00
// NSDebugMLLog ( @ "gswcomponents" , @ "hasGSWComponents=%@" , hasGSWComponents ) ;
// NSDebugMLLog ( @ "gswcomponents" , @ "hasGSWComponents class=%@" , [ hasGSWComponents class ] ) ;
2004-05-16 18:29:20 +00:00
// if ( boolValueFor ( hasGSWComponents ) )
// {
2002-08-04 18:00:11 +00:00
[ array addObject : bundle ] ;
NSDebugMLLog ( @ "gswcomponents" , @ "Add %@" , [ bundle bundleName ] ) ;
2004-05-16 18:29:20 +00:00
// } ;
2002-08-04 18:00:11 +00:00
} ;
// NSDebugMLLog ( @ "gswcomponents" , @ "_array=%@" , _array ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return array ;
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-12-31 14:33:16 +00:00
- ( Class ) contextClass
2003-06-25 15:17:29 +00:00
{
NSString * contextClassName = [ self contextClassName ] ;
Class contextClass = NSClassFromString ( contextClassName ) ;
NSAssert1 ( contextClass , @ "No contextClass named '%@'" , contextClassName ) ;
2004-12-31 14:33:16 +00:00
return contextClass ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWContext * ) createContextForRequest : ( GSWRequest * ) aRequest
{
GSWContext * context = nil ;
Class contextClass = [ self contextClass ] ;
NSAssert ( contextClass , @ "No contextClass" ) ;
2003-06-25 15:17:29 +00:00
if ( contextClass )
{
context = [ contextClass contextWithRequest : aRequest ] ;
}
if ( ! context )
{
// TODO : throw cleaner exception
NSAssert ( NO , @ "Can't create context" ) ;
} ;
return context ;
}
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-12-31 14:33:16 +00:00
- ( Class ) responseClass
2003-02-01 19:07:25 +00:00
{
2003-11-24 09:54:32 +00:00
NSString * responseClassName = [ self responseClassName ] ;
Class responseClass = NSClassFromString ( responseClassName ) ;
NSAssert1 ( responseClass , @ "No responseClass named '%@'" , responseClassName ) ;
2004-12-31 14:33:16 +00:00
return responseClass ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWResponse * ) createResponseInContext : ( GSWContext * ) aContext
{
GSWResponse * response = nil ;
Class responseClass = [ self responseClass ] ;
NSAssert ( responseClass , @ "No responseClass named" ) ;
2003-11-24 09:54:32 +00:00
if ( responseClass )
{
response = [ [ responseClass new ] autorelease ] ;
}
if ( ! response )
{
// TODO : throw cleaner exception
NSAssert ( NO , @ "Can't create response" ) ;
} ;
return response ;
2003-02-01 19:07:25 +00:00
} ;
2004-12-31 14:33:16 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007-11-25 16:49:37 +00:00
// dw : I do not know if this exists in WO
2004-12-31 14:33:16 +00:00
- ( Class ) requestClass
{
NSString * requestClassName = [ self requestClassName ] ;
Class requestClass = NSClassFromString ( requestClassName ) ;
NSAssert1 ( requestClass , @ "No requestClass named '%@'" , requestClassName ) ;
return requestClass ;
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007-11-25 16:49:37 +00:00
// dw : I do not know if this exists in WO
2003-02-01 19:07:25 +00:00
- ( GSWRequest * ) createRequestWithMethod : ( NSString * ) aMethod
uri : ( NSString * ) anURL
httpVersion : ( NSString * ) aVersion
headers : ( NSDictionary * ) headers
content : ( NSData * ) content
userInfo : ( NSDictionary * ) userInfo
{
2003-11-24 09:54:32 +00:00
GSWRequest * request = nil ;
NSString * requestClassName = [ self requestClassName ] ;
Class requestClass = NSClassFromString ( requestClassName ) ;
NSAssert1 ( requestClass , @ "No requestClass named '%@'" , requestClassName ) ;
if ( requestClass )
{
request = [ [ [ requestClass alloc ] initWithMethod : aMethod
uri : anURL
httpVersion : aVersion
headers : headers
content : content
userInfo : userInfo ] autorelease ] ;
}
if ( ! request )
{
// TODO : throw cleaner exception
NSAssert ( NO , @ "Can't create request" ) ;
} ;
return request ;
2003-02-01 19:07:25 +00:00
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-02-01 19:07:25 +00:00
- ( GSWResourceManager * ) createResourceManager
{
2003-11-24 09:54:32 +00:00
NSString * resourceManagerClassName = [ [ self class ] resourceManagerClassName ] ;
Class resourceManagerClass = Nil ;
2003-12-26 00:36:38 +00:00
if ( ! resourceManagerClassName ) {
resourceManagerClassName = GSWClassName_ResourceManager [ GSWebNamingConv ] ;
}
2003-11-24 09:54:32 +00:00
resourceManagerClass = NSClassFromString ( resourceManagerClassName ) ;
NSAssert1 ( resourceManagerClass , @ "No resourceManagerClass named %@" ,
resourceManagerClassName ) ;
return [ [ resourceManagerClass new ] autorelease ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWStatisticsStore * ) createStatisticsStore
{
NSString * statisticsStoreClassName = [ [ self class ] statisticsStoreClassName ] ;
Class statisticsStoreClass = Nil ;
2003-12-26 00:36:38 +00:00
if ( ! statisticsStoreClassName ) {
statisticsStoreClassName = GSWClassName_StatisticsStore [ GSWebNamingConv ] ;
}
2003-11-24 09:54:32 +00:00
statisticsStoreClass = NSClassFromString ( statisticsStoreClassName ) ;
NSAssert1 ( statisticsStoreClass , @ "No statisticsStoreClass named %@" ,
statisticsStoreClassName ) ;
return [ [ statisticsStoreClass new ] autorelease ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWSessionStore * ) createSessionStore
{
NSString * sessionStoreClassName = [ [ self class ] sessionStoreClassName ] ;
Class sessionStoreClass = Nil ;
2003-12-26 00:36:38 +00:00
if ( ! sessionStoreClassName ) {
sessionStoreClassName = GSWClassName_ServerSessionStore [ GSWebNamingConv ] ;
}
2003-11-24 09:54:32 +00:00
sessionStoreClass = NSClassFromString ( sessionStoreClassName ) ;
NSAssert1 ( sessionStoreClass , @ "No sessionStoreClass named %@" ,
sessionStoreClassName ) ;
return [ [ sessionStoreClass new ] autorelease ] ;
2003-02-01 19:07:25 +00:00
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _discountTerminatedSession
{
2003-11-24 09:54:32 +00:00
int activeSessionsCount = 1 ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
[ self lock ] ;
2000-01-22 12:49:49 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
[ self lockedDecrementActiveSessionCount ] ;
2003-11-24 09:54:32 +00:00
activeSessionsCount = [ self activeSessionsCount ] ;
2002-08-04 18:00:11 +00:00
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In lockedDecrementActiveSessionCount..." ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2003-11-24 09:54:32 +00:00
if ( [ self isRefusingNewSessions ] && activeSessionsCount <= _minimumActiveSessionsCount )
{
NSLog ( @ "Application is refusing new session and active sessions count <= minimum session count. Will terminate" ) ;
[ self terminate ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _finishInitializingSession : ( GSWSession * ) aSession
2000-01-22 12:49:49 +00:00
{
// OK
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
[ [ GSWResourceManager _applicationGSWBundle ] initializeObject : aSession
fromArchiveNamed : @ "Session" ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In initializeObject:fromArchiveNamed:" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWSession * ) _initializeSessionInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2008-04-20 18:25:56 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
if ( [ self isRefusingNewSessions ] )
2008-04-20 18:25:56 +00:00
{
LOGError0 ( @ "Try to initialize session with isRefusingNewSessions evaluation to YES" ) ;
[ aContext _setIsRefusingThisRequest : YES ] ;
}
// SYNCHRONIZED makes no sense here , we are just changing a number - - dw
2000-01-22 12:49:49 +00:00
[ self lock ] ;
2008-04-20 18:25:56 +00:00
_activeSessionsCount + + ;
2000-01-22 12:49:49 +00:00
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2008-04-20 18:25:56 +00:00
session = [ self createSessionForRequest : [ aContext request ] ] ;
if ( session = = nil ) {
[ self lock ] ;
_activeSessionsCount - - ;
[ self unlock ] ;
return nil ;
}
[ aContext _setSession : session ] ;
[ session awakeInContext : aContext ] ;
[ [ NSNotificationCenter defaultCenter ] postNotificationName : @ "SessionDidCreateNotification"
object : session ] ;
2002-08-04 18:00:11 +00:00
return session ;
2008-04-20 18:25:56 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( int ) lockedDecrementActiveSessionCount
{
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
_activeSessionsCount - - ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return _activeSessionsCount ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2008-04-20 18:25:56 +00:00
// does this exist in WO ?
// - ( int ) lockedIncrementActiveSessionCount
// {
//
// _activeSessionsCount + + ;
//
// return _activeSessionsCount ;
// } ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( int ) _activeSessionsCount
{
2002-08-04 18:00:11 +00:00
return _activeSessionsCount ;
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _setContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
NSMutableDictionary * threadDictionary = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
threadDictionary = GSCurrentThreadDictionary ( ) ;
if ( aContext )
[ threadDictionary setObject : aContext
forKey : GSWThreadKey_Context ] ;
2000-01-22 12:49:49 +00:00
else
2002-08-04 18:00:11 +00:00
[ threadDictionary removeObjectForKey : GSWThreadKey_Context ] ;
2000-01-22 12:49:49 +00:00
// ASSIGN ( context , _context ) ;
2002-08-04 18:00:11 +00:00
NSDebugMLLog ( @ "application" , @ "context:%p" , ( void * ) aContext ) ;
NSDebugMLLog ( @ "application" , @ "context retain count:%p" , [ aContext retainCount ] ) ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Internal Use only
- ( GSWContext * ) _context
{
2002-08-04 18:00:11 +00:00
GSWContext * context = nil ;
NSMutableDictionary * threadDictionary = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
threadDictionary = GSCurrentThreadDictionary ( ) ;
context = [ threadDictionary objectForKey : GSWThreadKey_Context ] ;
NSDebugMLLog ( @ "application" , @ "context:%p" , ( void * ) context ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return context ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) _isDynamicLoadingEnabled
{
2002-08-04 18:00:11 +00:00
return _dynamicLoadingEnabled ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _disableDynamicLoading
{
2002-08-04 18:00:11 +00:00
_dynamicLoadingEnabled = NO ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) _isPageRecreationEnabled
{
2002-08-04 18:00:11 +00:00
return _pageRecreationEnabled ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _touchPrincipalClasses
{
2002-08-04 18:00:11 +00:00
NSArray * allFrameworks = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
2004-12-31 14:33:16 +00:00
int frameworkN = 0 ;
int allFrameworksCount = 0 ;
2002-08-04 18:00:11 +00:00
// ? ? ? ?
allFrameworks = [ NSBundle allFrameworks ] ;
2004-12-31 14:33:16 +00:00
allFrameworksCount = [ allFrameworks count ] ;
for ( frameworkN = 0 ; frameworkN < allFrameworksCount ; frameworkN + + )
2002-08-04 18:00:11 +00:00
{
2002-11-27 20:25:22 +00:00
// Not used yet NSDictionary * infoDictionary = [ [ allFrameworks objectAtIndex : frameworkN ] infoDictionary ] ;
2002-08-04 18:00:11 +00:00
// TODO what ? ? ?
} ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException , @ "" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
/ * * Returns base application URL so visitor will be relocated
to another instance * * /
- ( NSString * ) _newLocationForRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
NSString * location = nil ;
if ( aRequest )
{
location = [ NSString stringWithFormat : @ "%@/%@" ,
[ aRequest adaptorPrefix ] ,
[ aRequest applicationName ] ] ;
} ;
return location ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-01-18 10:36:04 +00:00
// called when deamon is shutdown
2002-08-04 18:00:11 +00:00
- ( void ) _connectionDidDie : ( id ) unknown
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) _shouldKill
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return NO ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// TODO return ( Vv9 @ 0 : 4 c8 )
2002-08-04 18:00:11 +00:00
- ( void ) _setShouldKill : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _synchronizeInstanceSettingsWithMonitor : ( id ) _monitor
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) _setupForMonitoring
{
// OK
2002-08-04 18:00:11 +00:00
id remoteMonitor = nil ;
NSString * monitorApplicationName = nil ;
2003-11-24 09:54:32 +00:00
int port = 0 ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
monitorApplicationName = [ self _monitorApplicationName ] ;
2003-11-24 09:54:32 +00:00
port = [ [ self class ] intPort ] ;
2002-08-04 18:00:11 +00:00
remoteMonitor = [ self _remoteMonitor ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return ( remoteMonitor ! = nil ) ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( id ) _remoteMonitor
{
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
if ( ! _remoteMonitor )
{
NSString * monitorHost = [ self _monitorHost ] ;
NSNumber * workerThreadCount = [ [ self class ] workerThreadCount ] ;
id proxy = nil ;
NSDebugFLLog ( @ "monitor" , @ "monitorHost=%@" , monitorHost ) ;
NSDebugFLLog ( @ "monitor" , @ "workerThreadCount=%@" , workerThreadCount ) ;
2004-01-18 10:36:04 +00:00
if ( [ [ NSDistantObject class ] respondsToSelector : @ selector ( setDebug : ) ] )
{
[ NSDistantObject setDebug : YES ] ;
}
2002-08-04 18:00:11 +00:00
_remoteMonitorConnection = [ NSConnection connectionWithRegisteredName : GSWMonitorServiceName
host : monitorHost ] ;
proxy = [ _remoteMonitorConnection rootProxy ] ;
2004-01-18 10:36:04 +00:00
_remoteMonitor = [ proxy performSelector : @ selector ( targetForProxy ) ] ;
2002-08-04 18:00:11 +00:00
[ self _synchronizeInstanceSettingsWithMonitor : _remoteMonitor ] ;
} ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return _remoteMonitor ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _monitorHost
{
return [ [ self class ] monitorHost ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _monitorApplicationName
{
2002-08-04 18:00:11 +00:00
NSString * name = [ self name ] ;
2004-01-18 10:36:04 +00:00
NSNumber * port = [ ( GSWAppClassDummy * ) [ self class ] port ] ;
2002-08-04 18:00:11 +00:00
NSString * monitorApplicationName = [ NSString stringWithFormat : @ "%@-%@" ,
name ,
port ] ;
return monitorApplicationName ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _terminateFromMonitor
{
2003-11-24 09:54:32 +00:00
[ self terminate ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _validateAPI
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// adaptors
- ( NSArray * ) adaptors
{
2002-08-04 18:00:11 +00:00
return _adaptors ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// adaptorWithName : arguments :
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
- ( GSWAdaptor * ) adaptorWithName : ( NSString * ) name
arguments : ( NSDictionary * ) arguments
2000-01-22 12:49:49 +00:00
{
/ *
// call _isDynamicLoadingEnabled
// call isTerminating
// call isCachingEnabled
// call isPageRefreshOnBacktrackEnabled
* /
GSWAdaptor * adaptor = nil ;
Class gswadaptorClass = nil ;
Class adaptorClass = nil ;
2007-04-13 18:32:02 +00:00
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "adaptor name:%@" , name ) ;
2000-01-22 12:49:49 +00:00
gswadaptorClass = [ GSWAdaptor class ] ;
2003-05-14 08:08:57 +00:00
NSAssert ( [ name length ] > 0 , @ "No adaptor name" ) ;
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
adaptorClass = NSClassFromString ( name ) ;
NSAssert1 ( adaptorClass , @ "No adaptor named '%@'" , name ) ;
2000-01-22 12:49:49 +00:00
if ( adaptorClass )
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
{
if ( ClassIsKindOfClass ( adaptorClass , gswadaptorClass ) )
{
adaptor = [ [ [ adaptorClass alloc ] initWithName : name
arguments : arguments ] autorelease ] ;
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "adaptor:%@" , adaptor ) ;
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
}
else
{
NSAssert1 ( NO , @ "adaptor of class %@ is not a GSWAdaptor" , name ) ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
return adaptor ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setCachingEnabled :
2003-11-24 09:54:32 +00:00
- ( void ) setCachingEnabled : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
[ [ self class ] setCachingEnabled : flag ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isCachingEnabled
- ( BOOL ) isCachingEnabled
{
// OK
return [ [ self class ] isCachingEnabled ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// sessionStore
- ( GSWSessionStore * ) sessionStore
{
2002-08-04 18:00:11 +00:00
return _sessionStore ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setSessionStore :
2002-08-04 18:00:11 +00:00
- ( void ) setSessionStore : ( GSWSessionStore * ) sessionStore
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
if ( _sessionStore )
{
// We can ' t set the editing context if one has already been created
[ NSException raise : NSInvalidArgumentException
format : @ "%s Can't set a sessionStore when one already exists" ,
object_get _class _name ( self ) ] ;
}
else
{
ASSIGN ( _sessionStore , sessionStore ) ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) saveSessionForContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
session = [ aContext _session ] ; // NOT existingSession !
if ( session ! = nil ) {
2002-08-04 18:00:11 +00:00
[ session sleepInContext : aContext ] ;
[ _sessionStore checkInSessionForContext : aContext ] ;
[ aContext _setSession : nil ] ;
2007-04-13 18:32:02 +00:00
}
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWSession * ) restoreSessionWithID : ( NSString * ) sessionID
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2008-04-20 18:25:56 +00:00
session = [ _sessionStore checkOutSessionWithID : sessionID
2008-06-11 14:50:27 +00:00
request : [ aContext request ] ] ;
2007-04-13 18:32:02 +00:00
2008-04-20 18:25:56 +00:00
if ( session ! = nil )
{
[ aContext _setSession : session ] ;
[ session awakeInContext : aContext ] ;
}
2007-04-13 18:32:02 +00:00
2008-04-20 18:25:56 +00:00
[ [ NSNotificationCenter defaultCenter ] postNotificationName : @ "SessionDidRestoreNotification"
object : session ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return session ;
2008-04-20 18:25:56 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( Class ) _sessionClass
{
// OK
2002-08-04 18:00:11 +00:00
Class sessionClass = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
sessionClass = [ [ GSWResourceManager _applicationGSWBundle ] scriptedClassWithName : GSWClassName_Session
superclassName : GSWClassName_Session ] ;
if ( ! sessionClass )
sessionClass = NSClassFromString ( GSWClassName_Session ) ;
2000-01-22 12:49:49 +00:00
/ *
// Search Compiled Class "Session" ( subclass of GSWsession )
2002-08-04 18:00:11 +00:00
gswsessionClass = NSClassFromString ( ) ;
sessionClass = NSClassFromString ( GSWClassName_Session ) ;
2000-01-22 12:49:49 +00:00
// If not found , search for library "Session" in application . gswa directory
if ( ! _sessionClass )
{
NSString * sessionPath = [ self pathForResourceNamed : @ "session"
ofType : nil ] ;
Class _principalClass = [ self libraryClassWithPath : sessionPath ] ;
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "_principalClass=%@" , _principalClass ) ;
2000-01-22 12:49:49 +00:00
if ( _principalClass )
{
_sessionClass = NSClassFromString ( GSWClassName_Session ) ;
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "sessionClass=%@" , _sessionClass ) ;
2000-01-22 12:49:49 +00:00
} ;
} ;
// If not found , search for scripted "Session" in application . gswa directory
2002-08-04 18:00:11 +00:00
if ( ! sessionClass )
2000-01-22 12:49:49 +00:00
{
// TODO
} ;
// If not found , search for scripted "Session" in a session . gsws file
2002-08-04 18:00:11 +00:00
if ( ! sessionClass )
2000-01-22 12:49:49 +00:00
{
// TODO
} ;
2002-08-04 18:00:11 +00:00
if ( ! sessionClass )
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
sessionClass = _gswsessionClass ;
2000-01-22 12:49:49 +00:00
}
else
{
if ( ! ClassIsKindOfClass ( _sessionClass , _gswsessionClass ) )
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
{
// TODO exception
NSDebugMLLog ( @ "application" ,
@ "session class is not a kind of GSWSession" ) ;
}
2000-01-22 12:49:49 +00:00
} ;
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "_sessionClass:%@" , _sessionClass ) ;
2000-01-22 12:49:49 +00:00
* /
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return sessionClass ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( Class ) sessionClass
{
return [ self _sessionClass ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWSession * ) createSessionForRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
// OK
2002-08-04 18:00:11 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
session = [ self _createSessionForRequest : aRequest ] ;
2008-06-11 14:50:27 +00:00
// is this done in 4.5 ? - - dw
2002-10-28 19:57:10 +00:00
[ _statisticsStore _applicationCreatedSession : session ] ;
2008-06-11 14:50:27 +00:00
2002-08-04 18:00:11 +00:00
return session ;
2008-06-11 14:50:27 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWSession * ) _createSessionForRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
// OK
2002-08-04 18:00:11 +00:00
Class sessionClass = Nil ;
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2008-06-11 14:50:27 +00:00
sessionClass = [ self _sessionClass ] ;
2002-08-04 18:00:11 +00:00
if ( ! sessionClass )
2008-06-11 14:50:27 +00:00
{
NSAssert ( NO , @ "Can't find session class" ) ;
}
2000-01-22 12:49:49 +00:00
else
2008-06-11 14:50:27 +00:00
{
session = [ [ sessionClass new ] autorelease ] ;
}
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return session ;
2008-06-11 14:50:27 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setPageCacheSize :
2002-08-04 18:00:11 +00:00
- ( void ) setPageCacheSize : ( unsigned int ) size
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
_pageCacheSize = size ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// pageCacheSize
- ( unsigned int ) pageCacheSize
{
2002-08-04 18:00:11 +00:00
return _pageCacheSize ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( unsigned ) permanentPageCacheSize ;
{
2002-08-04 18:00:11 +00:00
return _permanentPageCacheSize ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) setPermanentPageCacheSize : ( unsigned ) size
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
_permanentPageCacheSize = size ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isPageRefreshOnBacktrackEnabled
- ( BOOL ) isPageRefreshOnBacktrackEnabled
{
2002-08-04 18:00:11 +00:00
return _pageRefreshOnBacktrackEnabled ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) setPageRefreshOnBacktrackEnabled : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
[ self lock ] ;
2002-08-04 18:00:11 +00:00
_pageRefreshOnBacktrackEnabled = flag ;
2000-01-22 12:49:49 +00:00
[ self unlock ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWComponent * ) pageWithName : ( NSString * ) aName
forRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return nil ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007-04-13 18:32:02 +00:00
// raises an exception if the page cannot be created
// this behaviour is documeted on Apple ' s WO 4.5 Doc pages .
// if you want to create your own pages not based on . wo wrappers , you should
// override this without calling super .
2002-08-04 18:00:11 +00:00
- ( GSWComponent * ) pageWithName : ( NSString * ) aName
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
// OK
2002-08-04 18:00:11 +00:00
GSWComponent * component = nil ;
GSWComponentDefinition * componentDefinition = nil ;
NSArray * languages = nil ;
2007-04-13 18:32:02 +00:00
if ( ! aContext ) {
2003-11-24 09:54:32 +00:00
[ NSException raise : NSInvalidArgumentException
2007-04-13 18:32:02 +00:00
format : @ "%s: No context!" ,
__PRETTY _FUNCTION __ ] ;
}
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-01-26 10:43:23 +00:00
{
2002-11-18 11:14:55 +00:00
// If the pageName is empty , try to get one from - defaultPageName
2007-04-13 18:32:02 +00:00
if ( ( ! aName ) || ( [ aName length ] < 1 ) ) {
2003-11-24 09:54:32 +00:00
aName = [ self defaultPageName ] ;
2007-04-13 18:32:02 +00:00
}
2002-11-18 11:14:55 +00:00
// If the pageName is still empty , use a default one ( "Main" )
2007-04-13 18:32:02 +00:00
if ( ( ! aName ) || ( [ aName length ] < 1 ) ) {
2002-08-04 18:00:11 +00:00
aName = GSWMainPageName ;
2007-04-13 18:32:02 +00:00
}
2002-11-18 11:14:55 +00:00
2002-08-04 18:00:11 +00:00
languages = [ aContext languages ] ;
2002-11-18 11:14:55 +00:00
// Find component definition for pageName and languages
2002-08-04 18:00:11 +00:00
componentDefinition = [ self lockedComponentDefinitionWithName : aName
languages : languages ] ;
2007-04-13 18:32:02 +00:00
if ( ! componentDefinition ) {
[ NSException raise : NSInvalidArgumentException
format : @ "%s: unable to create page '%@'." ,
__PRETTY _FUNCTION __ , aName ] ;
}
// As we ' ve found a component defintion , we create an instance ( an object of class GSWComponent )
component = [ componentDefinition componentInstanceInContext : aContext ] ;
[ component _awakeInContext : aContext ] ;
// And flag it as a page .
[ component _setIsPage : YES ] ;
2002-01-26 10:43:23 +00:00
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-01-26 10:43:23 +00:00
{
2007-04-13 18:32:02 +00:00
localException = [ localException exceptionByAddingUserInfoFrameInfoFormat : @ "In %s" ,
__PRETTY _FUNCTION __ ] ;
2002-01-26 10:43:23 +00:00
LOGException ( @ "exception=%@" , localException ) ;
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2002-08-04 18:00:11 +00:00
return component ;
2007-04-13 18:32:02 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSString * ) defaultPageName
{
return GSWMainPageName ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWElement * ) dynamicElementWithName : ( NSString * ) aName
associations : ( NSDictionary * ) someAssociations
template : ( GSWElement * ) templateElement
languages : ( NSArray * ) languages
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWElement * element = nil ;
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
element = [ self lockedDynamicElementWithName : aName
associations : someAssociations
template : templateElement
languages : languages ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
[ self unlock ] ;
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In lockedDynamicElementWithName:associations:template:languages:" ) ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2002-08-04 18:00:11 +00:00
return element ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWElement * ) lockedDynamicElementWithName : ( NSString * ) aName
associations : ( NSDictionary * ) someAssociations
template : ( GSWElement * ) templateElement
languages : ( NSArray * ) languages
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWElement * element = nil ;
Class elementClass = nil ;
2000-01-22 12:49:49 +00:00
// lock bundle
// unlock bundle
2002-08-04 18:00:11 +00:00
if ( [ someAssociations isAssociationDebugEnabledInComponent : nil ] )
[ someAssociations associationsSetDebugEnabled ] ;
elementClass = NSClassFromString ( aName ) ;
2007-04-13 18:32:02 +00:00
2002-12-06 16:10:52 +00:00
if ( elementClass && ! ClassIsKindOfClass ( elementClass , [ GSWComponent class ] ) )
2002-01-26 10:43:23 +00:00
{
2007-04-13 18:32:02 +00:00
element = [ [ ( GSWDynamicElement * ) [ elementClass alloc ] initWithName : aName
associations : someAssociations
template : templateElement ]
2002-08-04 18:00:11 +00:00
autorelease ] ;
2002-01-26 10:43:23 +00:00
}
2000-01-22 12:49:49 +00:00
else
2002-01-26 10:43:23 +00:00
{
2002-08-04 18:00:11 +00:00
GSWComponentDefinition * componentDefinition = nil ;
componentDefinition = [ self lockedComponentDefinitionWithName : aName
languages : languages ] ;
if ( componentDefinition )
2002-01-26 10:43:23 +00:00
{
2002-08-04 18:00:11 +00:00
element = [ componentDefinition componentReferenceWithAssociations : someAssociations
template : templateElement ] ;
2002-01-26 10:43:23 +00:00
}
else
{
ExceptionRaise ( @ "GSWApplication" ,
@ "GSWApplication: Component Definition named '%@' not found or can't be created" ,
2002-08-04 18:00:11 +00:00
aName ) ;
2002-01-26 10:43:23 +00:00
} ;
} ;
2002-08-04 18:00:11 +00:00
return element ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// run
- ( void ) run
{
// call allowsConcurrentRequestHandling
// call [ [ self class ] _multipleThreads ] ;
// call [ self name ] ;
// call [ [ self class ] _requestWindow ] ;
// call [ [ self class ] _requestLimit ] ;
// call [ self becomesMultiThreaded ] ;
// call [ [ self class ] _requestWindow ] ;
// call [ [ self class ] _requestLimit ] ;
// call [ self resourceManager ] ;
2001-10-28 10:29:17 +00:00
SEL registerForEventsSEL = NULL ;
SEL unregisterForEventsSEL = NULL ;
2007-04-13 18:32:02 +00:00
2001-10-28 10:29:17 +00:00
registerForEventsSEL = @ selector ( registerForEvents ) ;
unregisterForEventsSEL = @ selector ( unregisterForEvents ) ;
2002-08-04 18:00:11 +00:00
[ _adaptors makeObjectsPerformSelector : registerForEventsSEL ] ;
2008-02-27 21:45:01 +00:00
// call adaptor run
// call self _openInitialURL
2003-04-09 12:03:17 +00:00
2008-02-27 21:45:01 +00:00
NSAssert ( _currentRunLoop , @ "No runLoop" ) ;
NS_DURING {
NSLog ( @ "Application running. To use direct connect enter\n%@\nin your web Browser.\nPlease make sure that this port is only reachable in a trusted network." ,
2007-04-13 18:32:02 +00:00
[ self _directConnectURL ] ) ;
2008-02-27 21:45:01 +00:00
while ( ( _terminating = = NO ) && [ _currentRunLoop runMode : NSDefaultRunLoopMode beforeDate : [ NSDate distantFuture ] ] ) {
// run loop
2003-11-24 09:54:32 +00:00
}
2008-02-27 21:45:01 +00:00
} NS_HANDLER {
NSLog ( @ "%@" , localException ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} NS_ENDHANDLER ;
2000-01-22 12:49:49 +00:00
2002-08-04 18:00:11 +00:00
[ _adaptors makeObjectsPerformSelector : unregisterForEventsSEL ] ;
2007-04-13 18:32:02 +00:00
2008-02-27 21:45:01 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// runLoop
- ( NSRunLoop * ) runLoop
{
2003-04-09 12:03:17 +00:00
return _currentRunLoop ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// threadWillExit
// NDFN
- ( void ) threadWillExit
{
2005-04-21 12:45:11 +00:00
// printf ( "GC** GarbageCollector collectGarbages START\n" ) ;
2001-10-28 10:29:17 +00:00
// TODO - NOW [ GarbageCollector collectGarbages ] ; // LAST // CLEAN
2005-04-21 12:45:11 +00:00
// GSWLogC ( "GC** GarbageCollector collectGarbages STOP" ) ;
// printf ( "GC** GarbageCollector collectGarbages STOP\n" ) ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setTimeOut :
2002-08-04 18:00:11 +00:00
- ( void ) setTimeOut : ( NSTimeInterval ) aTimeInterval
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "sessions" , @ "timeOut=%ld" , ( long ) aTimeInterval ) ;
if ( aTimeInterval = = 0 )
_timeOut = [ [ NSDate distantFuture ] timeIntervalSinceDate : _lastAccessDate ] ;
else
_timeOut = aTimeInterval ;
[ self _scheduleApplicationTimerForTimeInterval : _timeOut ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// timeOut
- ( NSTimeInterval ) timeOut
{
2002-08-04 18:00:11 +00:00
return _timeOut ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isTerminating
- ( BOOL ) isTerminating
{
2003-11-24 09:54:32 +00:00
return _terminating ;
2008-02-27 21:45:01 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// terminate
- ( void ) terminate
{
2008-03-30 22:10:20 +00:00
// NSTimer * timer = nil ;
2003-11-24 09:54:32 +00:00
_terminating = YES ;
2008-02-27 21:45:01 +00:00
/ *
2003-11-24 09:54:32 +00:00
timer = [ NSTimer timerWithTimeInterval : 0
target : self
selector : @ selector ( _handleQuitTimer : )
userInfo : nil
repeats : NO ] ;
[ GSWApp addTimer : timer ] ;
2008-02-27 21:45:01 +00:00
* /
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _scheduleApplicationTimerForTimeInterval : ( NSTimeInterval ) aTimeInterval
2000-01-22 12:49:49 +00:00
{
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
2003-11-24 09:54:32 +00:00
[ _timer invalidate ] ;
ASSIGN ( _timer , [ NSTimer timerWithTimeInterval : aTimeInterval
target : self
selector : @ selector ( _terminateOrResetTimer : )
userInfo : nil
repeats : NO ] ) ;
[ self lockedAddTimer : _timer ] ;
2002-08-04 18:00:11 +00:00
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException , @ "In addTimer:" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// lastAccessDate
- ( NSDate * ) lastAccessDate
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
return _lastAccessDate ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// startDate
- ( NSDate * ) startDate
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
return _startDate ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// NDFN
- ( void ) lockedAddTimer : ( NSTimer * ) aTimer
2000-01-22 12:49:49 +00:00
{
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "[self runLoop]=%p" , ( void * ) [ self runLoop ] ) ;
NSDebugMLLog ( @ "application" , @ "currentMode=%@" , [ [ self runLoop ] currentMode ] ) ;
NSDebugMLLog ( @ "application" , @ "NSDefaultRunLoopMode=%@" , NSDefaultRunLoopMode ) ;
NSDebugMLLog ( @ "application" , @ "aTimer=%@" , aTimer ) ;
NSDebugMLLog ( @ "application" , @ "aTimer fireDate=%@" , [ aTimer fireDate ] ) ;
[ [ self runLoop ] addTimer : aTimer
forMode : NSDefaultRunLoopMode ] ;
NSDebugMLLog ( @ "application" , @ "limitDateForMode=%@" , [ [ self runLoop ] limitDateForMode : NSDefaultRunLoopMode ] ) ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// NDFN
- ( void ) addTimer : ( NSTimer * ) aTimer
2000-01-22 12:49:49 +00:00
{
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
[ self lock ] ;
NS_DURING
{
[ self lockedAddTimer : aTimer ] ;
}
NS_HANDLER
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException , @ "In addTimer:" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _terminateOrResetTimer : ( NSTimer * ) aTimer
{
NSTimeInterval timIntervalSinceLastAccessDate = [ [ NSDate date ] timeIntervalSinceDate : _lastAccessDate ] ;
if ( timIntervalSinceLastAccessDate >= _timeOut ) // Time out ?
[ self terminate ] ;
else // reschedule
[ self _scheduleApplicationTimerForTimeInterval : _timeOut - timIntervalSinceLastAccessDate ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _setNextCollectionCount : ( int ) _count
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _sessionDidTimeOutNotification : ( NSNotification * ) notification
{
// OK
// does nothing ?
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _openInitialURL
{
// call resourceMLanager ?
if ( [ [ self class ] isDirectConnectEnabled ] )
2002-08-04 18:00:11 +00:00
{
NSString * directConnectURL = [ self _directConnectURL ] ;
if ( [ [ self class ] autoOpenInBrowser ] )
{
[ self _openURL : directConnectURL ] ;
if ( [ [ self class ] isDebuggingEnabled ] )
{
// TODO
} ;
} ;
}
2000-01-22 12:49:49 +00:00
else
2002-08-04 18:00:11 +00:00
{
// TODO
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _openURL : ( NSString * ) url
2000-01-22 12:49:49 +00:00
{
// [ NSBundle bundleForClass : XX ] ;
// TODO finish
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) runOnce
{
2003-11-24 09:54:32 +00:00
BOOL ret = NO ;
if ( ! [ self isTerminating ] )
{
[ _currentRunLoop runMode : [ _currentRunLoop currentMode ]
beforeDate : _runLoopDate ] ;
ret = YES ;
}
return ret ;
2000-01-22 12:49:49 +00:00
} ;
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) dispatchRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
2008-03-30 22:10:20 +00:00
GSWResponse * response = nil ;
GSWRequestHandler * requestHandler = nil ;
NSNotificationCenter * noteCenter = [ NSNotificationCenter defaultCenter ] ;
2002-10-28 19:57:10 +00:00
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
2003-11-24 09:54:32 +00:00
NS_DURING
2008-03-30 22:10:20 +00:00
{
ASSIGN ( _lastAccessDate , [ NSDate date ] ) ;
[ noteCenter postNotificationName : @ "ApplicationWillDispatchRequestNotification"
object : aRequest ] ;
requestHandler = [ self handlerForRequest : aRequest ] ;
if ( ! requestHandler )
requestHandler = [ self defaultRequestHandler ] ;
response = [ requestHandler handleRequest : aRequest ] ;
if ( ! response ) {
NSDebugLog ( @ "%s !!! Response is null !!!" , __PRETTY _FUNCTION __ ) ;
response = [ self createResponseInContext : nil ] ;
2003-11-24 09:54:32 +00:00
}
2008-03-30 22:10:20 +00:00
[ self _resetCache ] ;
[ noteCenter postNotificationName : @ "ApplicationDidDispatchRequestNotification"
object : response ] ;
[ aRequest _setContext : nil ] ;
}
2003-11-24 09:54:32 +00:00
NS_HANDLER
{
NSLog ( @ "EXCEPTION: %@" , localException ) ;
}
NS_ENDHANDLER ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2008-03-30 22:10:20 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// awake
- ( void ) awake
{
// Does Nothing
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// takeValuesFromRequest : inContext :
2002-08-04 18:00:11 +00:00
- ( void ) takeValuesFromRequest : ( GSWRequest * ) aRequest
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
// OK
2002-08-04 18:00:11 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
[ aContext setValidate : YES ] ;
session = [ aContext existingSession ] ;
[ session takeValuesFromRequest : aRequest
inContext : aContext ] ;
[ aContext setValidate : NO ] ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// invokeActionForRequest : inContext :
2002-08-04 18:00:11 +00:00
- ( GSWElement * ) invokeActionForRequest : ( GSWRequest * ) aRequest
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
// OK
GSWElement * element = nil ;
2002-08-04 18:00:11 +00:00
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2000-02-12 13:08:41 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
session = [ aContext existingSession ] ;
element = [ session invokeActionForRequest : aRequest
inContext : aContext ] ;
}
2000-02-12 13:08:41 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
LOGException0 ( @ "exception in GSWApplication invokeActionForRequest:inContext" ) ;
LOGException ( @ "exception=%@" , localException ) ;
localException = ExceptionByAddingUserInfoObjectFrameInfo ( localException ,
@ "In GSWApplication invokeActionForRequest:inContext" ) ;
LOGException ( @ "exception=%@" , localException ) ;
[ localException raise ] ;
}
2000-02-12 13:08:41 +00:00
NS_ENDHANDLER ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
return element ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// appendToResponse : inContext :
2002-08-04 18:00:11 +00:00
- ( void ) appendToResponse : ( GSWResponse * ) aResponse
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWRequest * request = nil ;
GSWSession * session = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
request = [ aContext request ] ;
NSDebugMLog ( @ "request=%p" , request ) ;
session = [ aContext existingSession ] ;
NSDebugMLog ( @ "session=%p" , session ) ;
if ( [ aContext _isRefusingThisRequest ] )
2003-01-19 15:33:07 +00:00
{
2003-11-24 09:54:32 +00:00
NSLog ( @ "Context refuseThisRequest. Will redirect to available instance" ) ;
[ aResponse _generateRedirectResponseWithMessage : nil
location : [ self _newLocationForRequest : request ]
isDefinitive : YES ] ; // 301
[ session terminate ] ;
2003-01-19 15:33:07 +00:00
}
2003-11-24 09:54:32 +00:00
else
2003-01-19 15:33:07 +00:00
{
2003-11-24 09:54:32 +00:00
NS_DURING
{
[ session appendToResponse : aResponse
inContext : aContext ] ;
}
NS_HANDLER
{
LOGException ( @ "exception in %@ appendToResponse:inContext" ,
[ self class ] ) ;
LOGException ( @ "exception=%@" , localException ) ;
localException = ExceptionByAddingUserInfoObjectFrameInfo ( localException ,
@ "In %@ appendToResponse:inContext" ,
[ self class ] ) ;
LOGException ( @ "exception=%@" , localException ) ;
[ localException raise ] ;
}
NS_ENDHANDLER ;
NS_DURING
{
[ self _setRecordingHeadersToResponse : aResponse
forRequest : request
inContext : aContext ] ;
}
NS_HANDLER
{
LOGException ( @ "exception in %@ _setRecordingHeadersToResponse..." ,
[ self class ] ) ;
LOGException ( @ "exception=%@" , localException ) ;
localException = ExceptionByAddingUserInfoObjectFrameInfo ( localException ,
@ "In %@ _setRecordingHeadersToResponse..." ,
[ self class ] ) ;
LOGException ( @ "exception=%@" , localException ) ;
[ localException raise ] ;
}
NS_ENDHANDLER ;
} ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
} ;
- ( void ) _setRecordingHeadersToResponse : ( GSWResponse * ) aResponse
forRequest : ( GSWRequest * ) aRequest
inContext : ( GSWContext * ) aContext
{
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
NSDebugMLog ( @ "Recording Header=%@" ,
[ aRequest headerForKey : GSWHTTPHeader_Recording [ GSWebNamingConv ] ] ) ;
if ( _recorder
&& ( [ aRequest headerForKey : GSWHTTPHeader_Recording [ GSWebNamingConv ] ]
|| [ [ self class ] recordingPath ] ) )
{
NSString * sessionID = nil ;
GSWSession * session = nil ;
NSString * header = nil ;
2004-09-01 13:53:24 +00:00
header = GSWIntToNSString ( [ aRequest applicationNumber ] ) ;
2003-11-24 09:54:32 +00:00
NSDebugMLog ( @ "header=%@" , header ) ;
[ aResponse setHeader : header
forKey : GSWHTTPHeader_RecordingApplicationNumber [ GSWebNamingConv ] ] ;
if ( [ aContext hasSession ] )
{
session = [ aContext session ] ;
sessionID = [ session sessionID ] ;
}
else
sessionID = [ aRequest sessionID ] ;
NSDebugMLog ( @ "sessionID=%@" , sessionID ) ;
if ( sessionID )
{
[ aResponse setHeader : sessionID
forKey : GSWHTTPHeader_RecordingSessionID [ GSWebNamingConv ] ] ;
if ( [ session storesIDsInCookies ] )
[ aResponse setHeader : @ "yes"
forKey : GSWHTTPHeader_RecordingIDsCookie [ GSWebNamingConv ] ] ;
if ( [ session storesIDsInURLs ] )
[ aResponse setHeader : @ "yes"
forKey : GSWHTTPHeader_RecordingIDsURL [ GSWebNamingConv ] ] ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// sleep
- ( void ) sleep
{
// Does Nothing
} ;
2003-03-21 14:32:57 +00:00
// Not used now . For future exception handling rewrite
- ( GSWResponse * ) _invokeDefaultException : ( NSException * ) exception
named : ( NSString * ) name
inContext : ( GSWContext * ) aContext
{
// TODO
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2003-03-21 14:32:57 +00:00
response = [ GSWResponse responseWithMessage : @ "Exception Handling failed"
inContext : aContext
forRequest : nil ] ;
2007-04-13 18:32:02 +00:00
2003-03-21 14:32:57 +00:00
return response ;
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-03-21 14:32:57 +00:00
- ( GSWResponse * ) _handleErrorWithPageNamed : ( NSString * ) pageName
exception : ( NSException * ) anException
inContext : ( GSWContext * ) aContext
{
2003-11-24 09:54:32 +00:00
GSWContext * context = aContext ;
2003-03-21 14:32:57 +00:00
GSWResponse * response = nil ;
2003-11-24 09:54:32 +00:00
GSWComponent * errorPage = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
if ( context )
[ context _putAwakeComponentsToSleep ] ;
else
{
LOGError0 ( @ "No context !" ) ;
context = [ GSWContext contextWithRequest : nil ] ;
LOGError0 ( @ "Really can't get context !" ) ;
} ;
// TODO Hack : verify that there is an application context otherswise , it failed in component Creation
if ( ! [ self _context ] )
[ self _setContext : context ] ;
2003-03-21 14:32:57 +00:00
NS_DURING
{
2003-11-24 09:54:32 +00:00
errorPage = [ self pageWithName : pageName
inContext : context ] ;
2007-04-13 18:32:02 +00:00
2003-03-21 14:32:57 +00:00
if ( anException )
2003-11-24 09:54:32 +00:00
[ errorPage takeValue : anException
forKey : @ "exception" ] ;
2003-03-21 14:32:57 +00:00
}
NS_HANDLER
{
2007-04-13 18:32:02 +00:00
// My God ! Exception on exception !
2003-03-21 14:32:57 +00:00
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In _handleException:inContext:" ) ;
2007-04-13 18:32:02 +00:00
NSLog ( @ "exception=%@" , localException ) ;
2003-03-21 14:32:57 +00:00
LOGException ( @ "exception=%@" , localException ) ;
if ( [ [ localException name ] isEqualToString : GSWPageNotFoundException ] )
response = [ self _invokeDefaultException : localException
named : pageName
inContext : aContext ] ;
else
{
// TODO : better exception text . . .
NSException * exception = [ NSException exceptionWithName : @ "Exception"
reason : [ NSString stringWithFormat : @ "Cant handle exception %@" , localException ]
userInfo : nil ] ;
response = [ self _invokeDefaultException : exception
named : pageName
inContext : aContext ] ;
} ;
}
NS_ENDHANDLER ;
2003-11-24 09:54:32 +00:00
if ( ! response )
{
if ( errorPage )
{
2008-08-20 20:32:10 +00:00
// id monitor = nil ;
2007-04-13 18:32:02 +00:00
response = [ errorPage generateResponse ] ;
2003-11-24 09:54:32 +00:00
// here ?
2007-04-13 18:32:02 +00:00
// monitor = [ self _remoteMonitor ] ;
// if ( monitor )
// {
// // Not used yet NSString * monitorApplicationName = [ self _monitorApplicationName ] ;
// // TODO
// } ;
2003-11-24 09:54:32 +00:00
}
else
{
NSString * message = [ NSString stringWithFormat : @ "Exception Handling failed. Can't find Error Page named '%@'" ,
pageName ] ;
2007-04-13 18:32:02 +00:00
NSLog ( message ) ;
2003-11-24 09:54:32 +00:00
response = [ GSWResponse responseWithMessage : message
inContext : context
forRequest : nil ] ;
} ;
} ;
NSAssert ( ! [ response isFinalizeInContextHasBeenCalled ] ,
@ "GSWApplication _handlePageRestorationErrorInContext: _finalizeInContext called for GSWResponse" ) ;
2007-04-13 18:32:02 +00:00
2003-03-21 14:32:57 +00:00
return response ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
- ( GSWResponse * ) handleException : ( NSException * ) anException
2002-08-04 18:00:11 +00:00
inContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
NSDebugMLLog ( @ "application" , @ "context=%@" , aContext ) ;
2007-04-13 18:32:02 +00:00
NSLog ( @ "EXCEPTION=%@" , anException ) ;
2000-01-22 12:49:49 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
2004-01-12 15:32:39 +00:00
response =
[ self _handleErrorWithPageNamed : GSWExceptionPageName [ GSWebNamingConv ]
exception : anException
inContext : aContext ] ;
2002-08-04 18:00:11 +00:00
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
2003-12-26 00:36:38 +00:00
@ "In _handleException:inContext:" ) ;
2002-08-04 18:00:11 +00:00
LOGException ( @ "exception=%@" , localException ) ;
response = [ GSWResponse responseWithMessage : @ "Exception Handling failed"
inContext : aContext
forRequest : nil ] ;
}
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
2002-08-04 18:00:11 +00:00
NSAssert ( ! [ response isFinalizeInContextHasBeenCalled ] ,
2003-12-26 00:36:38 +00:00
@ "GSWApplication handleException: _finalizeInContext called for GSWResponse" ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handlePageRestorationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) handlePageRestorationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
response = [ self _handlePageRestorationErrorInContext : aContext ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In _handlePageRestorationErrorInContext:" ) ;
LOGException ( @ "exception=%@" , localException ) ;
response = [ GSWResponse responseWithMessage : @ "Exception Handling failed. Can't find Page Restoration Error Page"
inContext : aContext
forRequest : nil ] ;
}
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
2002-08-04 18:00:11 +00:00
NSAssert ( ! [ response isFinalizeInContextHasBeenCalled ] ,
@ "GSWApplication handlePageRestorationErrorInContext: _finalizeInContext called for GSWResponse" ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-24 09:54:32 +00:00
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handlePageRestorationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) _handlePageRestorationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
response = [ self _handleErrorWithPageNamed : GSWPageRestorationErrorPageName [ GSWebNamingConv ]
exception : nil
inContext : aContext ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handleSessionCreationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) handleSessionCreationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
response = [ self _handleSessionCreationErrorInContext : aContext ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In _handleSessionCreationErrorInContext:" ) ;
LOGException ( @ "exception=%@" , localException ) ;
response = [ GSWResponse responseWithMessage : @ "Session Creation Error Handling failed."
inContext : aContext
forRequest : nil ] ;
}
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
2002-08-04 18:00:11 +00:00
NSAssert ( ! [ response isFinalizeInContextHasBeenCalled ] ,
@ "GSWApplication handleSessionCreationErrorInContext: _finalizeInContext called for GSWResponse" ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handleSessionCreationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) _handleSessionCreationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
response = [ self _handleErrorWithPageNamed : GSWSessionCreationErrorPageName [ GSWebNamingConv ]
exception : nil
inContext : aContext ] ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handleSessionRestorationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) handleSessionRestorationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
NS_DURING
2002-08-04 18:00:11 +00:00
{
response = [ self _handleSessionRestorationErrorInContext : aContext ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "In _handleSessionRestorationErrorInContext:" ) ;
LOGException ( @ "exception=%@" , localException ) ;
response = [ GSWResponse responseWithMessage : @ "Session Restoration Error Handling failed."
inContext : aContext
forRequest : nil ] ;
}
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
2002-08-04 18:00:11 +00:00
NSAssert ( ! [ response isFinalizeInContextHasBeenCalled ] ,
@ "GSWApplication handleSessionRestorationErrorInContext: _finalizeInContext called for GSWResponse" ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// handleSessionRestorationError
2002-08-04 18:00:11 +00:00
- ( GSWResponse * ) _handleSessionRestorationErrorInContext : ( GSWContext * ) aContext
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWResponse * response = nil ;
2007-04-13 18:32:02 +00:00
2003-11-24 09:54:32 +00:00
response = [ self _handleErrorWithPageNamed : GSWSessionRestorationErrorPageName [ GSWebNamingConv ]
exception : nil
inContext : aContext ] ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return response ;
2000-01-22 12:49:49 +00:00
} ;
2004-03-25 08:29:41 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWResponse * ) handleActionRequestErrorWithRequest : ( GSWRequest * ) aRequest
exception : ( NSException * ) exception
reason : ( NSString * ) reason
requestHanlder : ( GSWActionRequestHandler * ) requestHandler
actionClassName : ( NSString * ) actionClassName
actionName : ( NSString * ) actionName
actionClass : ( Class ) actionClass
actionObject : ( GSWAction * ) actionObject
{
2007-04-13 18:32:02 +00:00
2004-03-25 08:29:41 +00:00
// do nothing
2007-04-13 18:32:02 +00:00
2004-03-25 08:29:41 +00:00
return nil ;
}
2000-01-22 12:49:49 +00:00
+ ( GSWApplication * ) application
{
return GSWApp ;
} ;
2002-08-04 18:00:11 +00:00
+ ( void ) _setApplication : ( GSWApplication * ) application
2000-01-22 12:49:49 +00:00
{
// OK
// Call self _isDynamicLoadingEnabled
// call self isTerminating
// call self isCachingEnabled
// call self isPageRefreshOnBacktrackEnabled
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
NSDebugMLog ( @ "setApplication:%p (of class %@) name:%@" ,
2002-08-04 18:00:11 +00:00
application ,
[ application class ] ,
[ application name ] ) ;
GSWApp = application ;
2007-04-13 18:32:02 +00:00
}
2000-01-22 12:49:49 +00:00
2002-08-04 18:00:11 +00:00
- ( void ) setPrintsHTMLParserDiagnostics : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
_printsHTMLParserDiagnostics = flag ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// printsHTMLParserDiagnostics
- ( BOOL ) printsHTMLParserDiagnostics
{
2000-10-04 22:19:43 +00:00
// FIXME
// return [ GSWHTMLParser printsDiagnostics ] ;
return NO ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// scriptedClassWithPath :
2002-08-04 18:00:11 +00:00
- ( Class ) scriptedClassWithPath : ( NSString * ) path
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return nil ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// scriptedClassWithPath : encoding :
2002-08-04 18:00:11 +00:00
- ( Class ) scriptedClassWithPath : ( NSString * ) path
encoding : ( NSStringEncoding ) encoding
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return nil ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( Class ) _classWithScriptedClassName : ( NSString * ) aName
languages : ( NSArray * ) languages
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return nil ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _setClassFromNameResolutionEnabled : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
2002-08-04 18:00:11 +00:00
- ( Class ) libraryClassWithPath : ( NSString * ) path
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
Class aClass = nil ;
NSBundle * bundle = [ NSBundle bundleWithPath : path ] ;
2001-10-28 10:29:17 +00:00
NSDebugMLLog ( @ "application" , @ "GSWApplication libraryClassWithPath:bundle=%@" , bundle ) ;
2000-01-22 12:49:49 +00:00
if ( bundle )
2002-08-04 18:00:11 +00:00
{
BOOL result = [ bundle load ] ;
NSDebugMLLog ( @ "application" , @ "GSWApplication libraryClassWithPath:bundle load result=%d" , result ) ;
aClass = [ bundle principalClass ] ;
NSDebugMLLog ( @ "application" , @ "GSWApplication libraryClassWithPath:bundle class=%@" , aClass ) ;
} ;
return aClass ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) debugWithString : ( NSString * ) aString
2000-01-22 12:49:49 +00:00
{
if ( [ [ self class ] isDebuggingEnabled ] )
2002-08-04 18:00:11 +00:00
{
2005-12-17 16:44:58 +00:00
GSWFPutSL ( aString , stderr ) ;
2002-08-04 18:00:11 +00:00
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) debugWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
[ self debugWithString : string ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) debugWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ self debugWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) debugWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ GSWApp debugWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) _setTracingAspect : ( id ) unknwon
enabled : ( BOOL ) enabled
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) logWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ self logWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ GSWApp logWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
2005-04-05 11:54:36 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) logString : ( NSString * ) aString
{
2005-12-17 16:44:58 +00:00
GSWFPutSL ( aString , stderr ) ;
2005-04-05 11:54:36 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( void ) logString : ( NSString * ) aString
{
[ GSWApp logString : aString ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) logWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
2005-04-05 11:54:36 +00:00
[ self logString : string ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) logErrorWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ self logErrorWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logErrorWithFormat : ( NSString * ) aFormat , . . .
2000-01-22 12:49:49 +00:00
{
2004-05-16 15:57:09 +00:00
va_list ap ;
2002-08-04 18:00:11 +00:00
va_start ( ap , aFormat ) ;
[ GSWApp logErrorWithFormat : aFormat
arguments : ap ] ;
2000-01-22 12:49:49 +00:00
va_end ( ap ) ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2005-04-05 11:54:36 +00:00
- ( void ) logErrorString : ( NSString * ) aString
2000-01-22 12:49:49 +00:00
{
2005-12-17 16:44:58 +00:00
GSWFPutSL ( aString , stderr ) ;
GSWFPutSL ( aString , stdout ) ;
2000-01-22 12:49:49 +00:00
} ;
2005-04-05 11:54:36 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( void ) logErrorString : ( NSString * ) aString
{
[ GSWApp logErrorString : aString ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) logErrorWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
{
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
[ self logErrorString : string ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// trace :
2002-08-04 18:00:11 +00:00
- ( void ) trace : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
if ( flag ! = _isTracingEnabled )
{
[ self lock ] ;
_isTracingEnabled = flag ;
[ self unlock ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// traceAssignments :
2002-08-04 18:00:11 +00:00
- ( void ) traceAssignments : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
if ( flag ! = _isTracingAssignmentsEnabled )
{
[ self lock ] ;
_isTracingAssignmentsEnabled = flag ;
[ self unlock ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// traceObjectiveCMessages :
2002-08-04 18:00:11 +00:00
- ( void ) traceObjectiveCMessages : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
if ( flag ! = _isTracingObjectiveCMessagesEnabled )
{
[ self lock ] ;
_isTracingObjectiveCMessagesEnabled = flag ;
[ self unlock ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// traceScriptedMessages :
2002-08-04 18:00:11 +00:00
- ( void ) traceScriptedMessages : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
if ( flag ! = _isTracingScriptedMessagesEnabled )
{
[ self lock ] ;
_isTracingScriptedMessagesEnabled = flag ;
[ self unlock ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// traceStatements :
2002-08-04 18:00:11 +00:00
- ( void ) traceStatements : ( BOOL ) flag
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
if ( flag ! = _isTracingStatementsEnabled )
{
[ self lock ] ;
_isTracingStatementsEnabled = flag ;
[ self unlock ] ;
} ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logSynchronizeComponentToParentForValue : ( id ) aValue
association : ( GSWAssociation * ) anAssociation
inComponent : ( NSObject * ) aComponent
2000-01-22 12:49:49 +00:00
{
// TODO
[ self logWithFormat : @ "ComponentToParent [%@:%@] %@ ==> %@" ,
@ "" ,
2002-08-04 18:00:11 +00:00
[ aComponent description ] ,
aValue ,
[ anAssociation bindingName ] ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logSynchronizeParentToComponentForValue : ( id ) aValue
association : ( GSWAssociation * ) anAssociation
inComponent : ( NSObject * ) aComponent
2000-01-22 12:49:49 +00:00
{
// TODO
[ self logWithFormat : @ "ParentToComponent [%@:%@] %@ ==> %@" ,
2002-08-04 18:00:11 +00:00
@ "" ,
[ aComponent description ] ,
aValue ,
[ anAssociation bindingName ] ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logTakeValueForDeclarationNamed : ( NSString * ) aDeclarationName
type : ( NSString * ) aDeclarationType
bindingNamed : ( NSString * ) aBindingName
associationDescription : ( NSString * ) associationDescription
value : ( id ) aValue
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
[ GSWApp logTakeValueForDeclarationNamed : aDeclarationName
type : aDeclarationType
bindingNamed : aBindingName
associationDescription : associationDescription
value : aValue ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) logSetValueForDeclarationNamed : ( NSString * ) aDeclarationName
type : ( NSString * ) aDeclarationType
bindingNamed : ( NSString * ) aBindingName
associationDescription : ( NSString * ) associationDescription
value : ( id ) aValue
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
[ GSWApp logSetValueForDeclarationNamed : aDeclarationName
type : aDeclarationType
bindingNamed : aBindingName
associationDescription : associationDescription
value : aValue ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) logTakeValueForDeclarationNamed : ( NSString * ) aDeclarationName
type : ( NSString * ) aDeclarationType
bindingNamed : ( NSString * ) aBindingName
associationDescription : ( NSString * ) associationDescription
value : ( id ) aValue
2000-01-22 12:49:49 +00:00
{
// TODO
[ self logWithFormat : @ "TakeValue DeclarationNamed:%@ type:%@ bindingNamed:%@ associationDescription:%@ value:%@" ,
2002-08-04 18:00:11 +00:00
aDeclarationName ,
aDeclarationType ,
aBindingName ,
associationDescription ,
aValue ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) logSetValueForDeclarationNamed : ( NSString * ) aDeclarationName
type : ( NSString * ) aDeclarationType
bindingNamed : ( NSString * ) aBindingName
associationDescription : ( NSString * ) associationDescription
value : ( id ) aValue
2000-01-22 12:49:49 +00:00
{
// TODO
[ self logWithFormat : @ "SetValue DeclarationNamed:%@ type:%@ bindingNamed:%@ associationDescription:%@ value:%@" ,
2002-08-04 18:00:11 +00:00
aDeclarationName ,
aDeclarationType ,
aBindingName ,
associationDescription ,
aValue ] ;
2000-01-22 12:49:49 +00:00
} ;
2005-12-17 16:44:58 +00:00
/ * *
* This method is called when a request loop has finished . You can override
* this method to inspect your process ( e . g . for memory leaks ) . You should
* create an NSAutoreleasePool at the beginning of your method and release
* it at the end if you plan to use the implementation long running production
* envirnment analysis . This method is a GSWeb extension . The default
* implementation does nothing .
* /
- ( void ) debugAdaptorThreadExited
{
}
2000-01-22 12:49:49 +00:00
2000-03-20 15:50:51 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusDebugWithString : ( NSString * ) aString
2000-03-20 15:50:51 +00:00
{
if ( [ [ self class ] isStatusDebuggingEnabled ] )
2002-08-04 18:00:11 +00:00
{
2005-12-17 16:44:58 +00:00
GSWFPutSL ( aString , stdout ) ;
2002-08-04 18:00:11 +00:00
[ self debugWithString : aString ] ;
} ;
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusDebugWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusDebuggingEnabled ] )
{
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
[ self statusDebugWithString : string ] ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusDebugWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusDebuggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ self statusDebugWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) statusDebugWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusDebuggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ GSWApp statusDebugWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
2005-04-05 11:54:36 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) statusLogString : ( NSString * ) aString
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusDebuggingEnabled ] )
{
GSWFPutSL ( aString , stdout ) ;
[ self logString : aString ] ;
}
2005-04-05 11:54:36 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( void ) statusLogString : ( NSString * ) aString
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
[ GSWApp statusLogString : aString ] ;
}
2005-04-05 11:54:36 +00:00
} ;
2000-03-20 15:50:51 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusLogWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ self statusLogWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) statusLogWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ GSWApp statusLogWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusLogWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
[ self statusLogString : string ] ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusLogErrorWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ self statusLogErrorWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
+ ( void ) statusLogErrorWithFormat : ( NSString * ) aFormat , . . .
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
va_list ap ;
va_start ( ap , aFormat ) ;
[ GSWApp statusLogErrorWithFormat : aFormat
arguments : ap ] ;
va_end ( ap ) ;
}
2000-03-20 15:50:51 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) statusLogErrorWithFormat : ( NSString * ) aFormat
arguments : ( va_list ) arguments
2000-03-20 15:50:51 +00:00
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
NSString * string = [ NSString stringWithFormat : aFormat
arguments : arguments ] ;
GSWFPutSL ( string , stdout ) ;
[ self logErrorWithFormat : @ "%@" , string ] ;
}
2000-03-20 15:50:51 +00:00
} ;
2005-04-05 11:54:36 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) statusLogErrorString : ( NSString * ) aString
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
GSWFPutSL ( aString , stdout ) ;
[ self logErrorString : aString ] ;
}
2005-04-05 11:54:36 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( void ) statusLogErrorString : ( NSString * ) aString
{
2005-12-17 16:44:58 +00:00
if ( [ [ self class ] isStatusLoggingEnabled ] )
{
[ GSWApp statusLogErrorString : aString ] ;
}
2005-04-05 11:54:36 +00:00
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// statistics
- ( bycopy NSDictionary * ) statistics
{
return [ [ [ [ self statisticsStore ] statistics ] copy ] autorelease ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// statisticsStore
- ( GSWStatisticsStore * ) statisticsStore
{
2002-08-04 18:00:11 +00:00
return _statisticsStore ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setStatisticsStore :
2002-08-04 18:00:11 +00:00
- ( void ) setStatisticsStore : ( GSWStatisticsStore * ) statisticsStore
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
ASSIGN ( _statisticsStore , statisticsStore ) ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-24 09:54:32 +00:00
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// monitoringEnabled [ deprecated ]
2000-01-22 12:49:49 +00:00
- ( BOOL ) monitoringEnabled
{
2004-01-18 10:36:04 +00:00
return [ [ self class ] isMonitorEnabled ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// activeSessionsCount
- ( int ) activeSessionsCount
{
2002-08-04 18:00:11 +00:00
return _activeSessionsCount ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setMinimumActiveSessionsCount :
2002-08-04 18:00:11 +00:00
- ( void ) setMinimumActiveSessionsCount : ( int ) count
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
_minimumActiveSessionsCount = count ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// minimumActiveSessionsCountCount
- ( int ) minimumActiveSessionsCount
{
2002-08-04 18:00:11 +00:00
return _minimumActiveSessionsCount ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isRefusingNewSessions
- ( BOOL ) isRefusingNewSessions
{
2002-08-04 18:00:11 +00:00
return _refusingNewSessions ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// refuseNewSessions :
- ( void ) refuseNewSessions : ( BOOL ) flag
{
2004-01-13 15:00:55 +00:00
if ( flag && [ [ self class ] isDirectConnectEnabled ] )
2003-11-24 09:54:32 +00:00
{
[ NSException raise : NSInvalidArgumentException
format : @ "We can't refuse newSessions if direct connect enabled" ] ;
}
else
{
_refusingNewSessions = flag ;
if ( _refusingNewSessions && _activeSessionsCount <= _minimumActiveSessionsCount )
{
NSLog ( @ "Application is refusing new session and active sessions count <= minimum session count. Will terminate" ) ;
[ self terminate ] ;
} ;
} ;
2000-01-22 12:49:49 +00:00
} ;
2004-04-06 11:13:07 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSTimeInterval ) _refuseNewSessionsTimeInterval
{
NSTimeInterval ti = 0 ;
NSTimeInterval sessionTimeOut = 0 ;
int activeSessionsCount = 0 ;
2007-04-13 18:32:02 +00:00
2004-04-06 11:13:07 +00:00
sessionTimeOut = [ [ self class ] sessionTimeOutValue ] ;
activeSessionsCount = [ self activeSessionsCount ] ;
if ( activeSessionsCount > 0 ) // Is there active sessions ?
{
// Wait for 1 / 4 of session time out
ti = sessionTimeOut / 4 ;
} ;
if ( ti < 15 )
ti = 15 ;
NSDebugMLog ( @ "activeSessionsCount=%d sessionTimeOut=%f ==> refuseNewSessionsTimeInterval=%f" ,
activeSessionsCount , sessionTimeOut , ti ) ;
2007-04-13 18:32:02 +00:00
2004-04-06 11:13:07 +00:00
return ti ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// logToMonitorWithFormat :
2002-08-04 18:00:11 +00:00
- ( void ) logToMonitorWithFormat : ( NSString * ) aFormat
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-24 09:54:32 +00:00
// terminateAfterTimeInterval : [ deprecated ]
2002-08-04 18:00:11 +00:00
- ( void ) terminateAfterTimeInterval : ( NSTimeInterval ) aTimeInterval
2000-01-22 12:49:49 +00:00
{
2003-11-24 09:54:32 +00:00
[ self setTimeOut : aTimeInterval ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// setResourceManager :
2002-08-04 18:00:11 +00:00
- ( void ) setResourceManager : ( GSWResourceManager * ) resourceManager
2000-01-22 12:49:49 +00:00
{
// OK
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
ASSIGN ( _resourceManager , resourceManager ) ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// resourceManager
- ( GSWResourceManager * ) resourceManager
{
2002-08-04 18:00:11 +00:00
return _resourceManager ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWRequestHandler * ) defaultRequestHandler
{
2002-08-04 18:00:11 +00:00
return _defaultRequestHandler ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) setDefaultRequestHandler : ( GSWRequestHandler * ) handler
2000-01-22 12:49:49 +00:00
{
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
ASSIGN ( _defaultRequestHandler , handler ) ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
NSDebugMLLog ( @ "application" , @ "EXCEPTION:%@ (%@) [%s %d]" ,
localException , [ localException reason ] , __FILE __ , __LINE __ ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) registerRequestHandler : ( GSWRequestHandler * ) handler
forKey : ( NSString * ) aKey
2000-01-22 12:49:49 +00:00
{
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
if ( ! _requestHandlers )
_requestHandlers = [ NSMutableDictionary new ] ;
[ _requestHandlers setObject : handler
forKey : aKey ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
NSDebugMLLog ( @ "application" , @ "EXCEPTION:%@ (%@) [%s %d]" ,
localException , [ localException reason ] , __FILE __ , __LINE __ ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( void ) removeRequestHandlerForKey : ( NSString * ) requestHandlerKey
2000-01-22 12:49:49 +00:00
{
[ self lock ] ;
NS_DURING
2002-08-04 18:00:11 +00:00
{
[ _requestHandlers removeObjectForKey : requestHandlerKey ] ;
}
2000-01-22 12:49:49 +00:00
NS_HANDLER
2002-08-04 18:00:11 +00:00
{
NSDebugMLLog ( @ "application" , @ "EXCEPTION:%@ (%@) [%s %d]" ,
localException , [ localException reason ] , __FILE __ , __LINE __ ) ;
// TODO
[ self unlock ] ;
[ localException raise ] ;
} ;
2000-01-22 12:49:49 +00:00
NS_ENDHANDLER ;
[ self unlock ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSArray * ) registeredRequestHandlerKeys
{
2002-08-04 18:00:11 +00:00
return [ _requestHandlers allKeys ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWRequestHandler * ) requestHandlerForKey : ( NSString * ) aKey
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWRequestHandler * handler = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
handler = [ _requestHandlers objectForKey : aKey ] ;
NSDebugMLogCond ( ! handler , @ "_requestHandlers=%@" , _requestHandlers ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return handler ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-08-04 18:00:11 +00:00
- ( GSWRequestHandler * ) handlerForRequest : ( GSWRequest * ) aRequest
2000-01-22 12:49:49 +00:00
{
2002-08-04 18:00:11 +00:00
GSWRequestHandler * handler = nil ;
NSString * requestHandlerKey = nil ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
requestHandlerKey = [ aRequest requestHandlerKey ] ;
NSDebugMLLog ( @ "application" , @ "requestHandlerKey=%@" , requestHandlerKey ) ;
handler = [ self requestHandlerForKey : requestHandlerKey ] ;
2003-11-24 09:54:32 +00:00
NSDebugMLLog ( @ "application" , @ "handler=%@" , handler ) ;
2007-04-13 18:32:02 +00:00
2002-08-04 18:00:11 +00:00
return handler ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( NSDictionary * ) _webServerConfigDictionary
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return nil ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( Class ) _applicationClass
2000-01-22 12:49:49 +00:00
{
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
[ [ GSWResourceManager _applicationGSWBundle ]
scriptedClassWithName : GSWClassName_Application // TODO
superclassName : GSWClassName_Application ] ; // retirune nil // TODO
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
return NSClassFromString ( globalApplicationClassName ) ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( Class ) _compiledApplicationClass
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return nil ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( GSWRequestHandler * ) _componentRequestHandler
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return ( GSWRequestHandler * ) [ GSWComponentRequestHandler handler ] ;
2000-01-22 12:49:49 +00:00
} ;
2000-03-20 15:50:51 +00:00
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( id ) defaultModelGroup
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
# ifdef TCSDB
2010-04-16 00:18:46 +00:00
return ( id ) [ NSClassFromString ( @ "DBModelGroup" ) defaultGroup ] ;
2004-08-28 11:17:33 +00:00
# else
2010-04-16 00:18:46 +00:00
return ( id ) [ NSClassFromString ( @ "EOModelGroup" ) defaultGroup ] ;
2004-08-28 11:17:33 +00:00
# endif
2010-04-15 05:58:08 +00:00
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( id ) _modelGroupFromBundles : ( id ) bundles
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return nil ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
- ( NSDictionary * ) mainBundleInfoDictionary
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return [ [ self class ] mainBundleInfoDictionary ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( NSDictionary * ) mainBundleInfoDictionary
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return [ [ self mainBundle ] infoDictionary ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
- ( NSDictionary * ) bundleInfo
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return [ [ self class ] bundleInfo ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( NSDictionary * ) bundleInfo
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return [ [ self mainBundle ] infoDictionary ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
- ( NSBundle * ) mainBundle
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
return [ [ self class ] mainBundle ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( NSBundle * ) mainBundle
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
NSBundle * mainBundle = nil ;
// LOGClassFnNotImplemented ( ) ; // TODOFN
mainBundle = [ NSBundle mainBundle ] ;
NSDebugMLog ( @ "[mainBundle bundlePath]:%@" , [ mainBundle bundlePath ] ) ;
return mainBundle ;
2000-01-22 12:49:49 +00:00
2004-08-28 11:17:33 +00:00
/ *
_flags = unsigned int UINT : 104005633
_infoDictionary = id object : 11365312 Description : {
NSBundleExecutablePath = "H:\\Wotests\\ObjCTest3\\ObjCTest3.gswa\\ObjCTest3.exe" ;
NSBundleInitialPath = "H:\\Wotests\\ObjCTest3\\ObjCTest3.gswa" ;
NSBundleLanguagesList = ( ) ;
NSBundleResolvedPath = "H:\\Wotests\\ObjCTest3\\ObjCTest3.gswa" ;
NSBundleResourcePath = "H:\\Wotests\\ObjCTest3\\ObjCTest3.gswa\\Resources" ;
NSExecutable = ObjCTest3 ;
NSJavaRootClient = WebServerResources / Java ;
NSJavaUserPath = ( ) ;
}
_reserved5 = void * PTR
_principalClass = Class Class : * nil *
_tmp1 = void * PTR
_tmp2 = void * PTR
_reserved1 = void * PTR
_reserved0 = void * PTR
* /
2000-01-22 12:49:49 +00:00
} ;
2004-08-28 11:17:33 +00:00
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( int ) _garbageCollectionRepeatCount
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return 1 ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( BOOL ) _lockDefaultEditingContext
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return YES ;
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( void ) _setLockDefaultEditingContext : ( BOOL ) flag
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
2003-11-24 09:54:32 +00:00
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( id ) _allowsConcurrentRequestHandling
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return nil ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( void ) _setAllowsConcurrentRequestHandling : ( id ) unknown
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( int ) _requestLimit
2000-01-22 12:49:49 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return 1 ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-24 09:54:32 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( int ) _requestWindow
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return 1 ;
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( BOOL ) _multipleThreads
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return YES ;
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( BOOL ) _multipleInstances
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
LOGClassFnNotImplemented ( ) ; // TODOFN
return NO ;
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( void ) _readLicenseParameters
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
NSLog ( @ "LGPL'ed software don't have license parameters. To find License Parameters, please try proprietary softwares" ) ;
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
// NDFN
- ( id ) propListWithResourceNamed : ( NSString * ) aName
ofType : ( NSString * ) type
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
2003-11-24 09:54:32 +00:00
{
2004-08-28 11:17:33 +00:00
id propList = nil ;
GSWResourceManager * resourceManager = nil ;
NSString * pathName = nil ;
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
resourceManager = [ self resourceManager ] ;
pathName = [ resourceManager pathForResourceNamed : [ NSString stringWithFormat : @ "%@.%@" , aName , type ]
inFramework : aFrameworkName
languages : languages ] ;
NSDebugMLLog ( @ "application" , @ "pathName:%@" , pathName ) ;
if ( pathName )
{
NSString * propListString = [ NSString stringWithContentsOfFile : pathName ] ;
propList = [ propListString propertyList ] ;
if ( ! propList )
{
LOGSeriousError ( @ "Bad propertyList \n%@\n from file %@" ,
propListString ,
pathName ) ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
return propList ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ( BOOL ) createUnknownComponentClasses : ( NSArray * ) classes
superClassName : ( NSString * ) aSuperClassName
{
# ifdef NOEXTENSIONS
ExceptionRaise ( @ "GSWApplication" ,
@ "GSWApplication: createUnknownComponentClasses: %@ superClassName: %@\n works only when you do not define NOEXTENSIONS while compiling GSWeb" ,
classes , aSuperClassName ) ;
return NO ;
# else
BOOL ok = YES ;
2004-12-31 14:33:16 +00:00
int classesCount = 0 ;
2003-11-24 09:54:32 +00:00
LOGClassFnStart ( ) ;
2004-12-31 14:33:16 +00:00
classesCount = [ classes count ] ;
if ( classesCount > 0 )
2004-08-28 11:17:33 +00:00
{
int i = 0 ;
NSString * aClassName = nil ;
NSMutableArray * newClasses = nil ;
2004-12-31 14:33:16 +00:00
for ( i = 0 ; i < classesCount ; i + + )
2004-08-28 11:17:33 +00:00
{
aClassName = [ classes objectAtIndex : i ] ;
NSDebugMLLog ( @ "application" , @ "aClassName:%@" , aClassName ) ;
if ( ! NSClassFromString ( aClassName ) )
{
NSString * superClassName = nil ;
superClassName = [ localDynCreateClassNames objectForKey : aClassName ] ;
NSDebugMLLog ( @ "application" , @ "superClassName=%p" , ( void * ) superClassName ) ;
if ( ! superClassName )
{
superClassName = aSuperClassName ;
if ( ! superClassName )
{
ExceptionRaise ( @ "GSWApplication" ,
@ "GSWApplication: no superclass for class named: %@" ,
aClassName ) ;
} ;
} ;
NSDebugMLLog ( @ "application" , @ "Create Unknown Class: %@ (superclass: %@)" ,
aClassName ,
superClassName ) ;
if ( superClassName )
{
NSValue * aClassPtr = GSObjCMakeClass ( aClassName , superClassName , nil ) ;
if ( aClassPtr )
{
if ( ! newClasses )
newClasses = [ NSMutableArray array ] ;
[ newClasses addObject : aClassPtr ] ;
}
else
{
LOGError ( @ "Can't create one of these classes %@ (super class: %@)" ,
aClassName , superClassName ) ;
} ;
} ;
} ;
} ;
if ( [ newClasses count ] > 0 )
{
GSObjCAddClasses ( newClasses ) ;
} ;
} ;
2003-11-24 09:54:32 +00:00
LOGClassFnStop ( ) ;
2004-08-28 11:17:33 +00:00
return ok ;
# endif
2003-11-24 09:54:32 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-08-28 11:17:33 +00:00
+ ( void ) addDynCreateClassName : ( NSString * ) className
superClassName : ( NSString * ) superClassName
2003-11-24 09:54:32 +00:00
{
LOGClassFnStart ( ) ;
2004-08-28 11:17:33 +00:00
NSDebugMLLog ( @ "gswdync" , @ "ClassName:%@ superClassName:%@" ,
className , superClassName ) ;
[ localDynCreateClassNames setObject : superClassName
forKey : className ] ;
2003-11-24 09:54:32 +00:00
LOGClassFnStop ( ) ;
} ;
2004-08-28 11:17:33 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSString * ) pathForResourceNamed : ( NSString * ) name
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
{
return [ [ self resourceManager ] pathForResourceNamed : name
inFramework : aFrameworkName
languages : languages ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSString * ) pathForResourceNamed : ( NSString * ) aName
ofType : ( NSString * ) type
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
{
2008-08-20 20:32:10 +00:00
NSString * name ;
if ( type ) {
name = [ NSString stringWithFormat : @ "%@.%@" , aName , type ] ;
} else {
name = aName ;
}
return [ [ self resourceManager ] pathForResourceNamed : name
2004-08-28 11:17:33 +00:00
inFramework : aFrameworkName
languages : languages ] ;
2008-08-20 20:32:10 +00:00
}
2004-08-28 11:17:33 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSString * ) urlForResourceNamed : ( NSString * ) aName
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
request : ( GSWRequest * ) aRequest
{
return [ [ self resourceManager ] urlForResourceNamed : aName
inFramework : aFrameworkName
languages : languages
request : aRequest ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSString * ) stringForKey : ( NSString * ) aKey
inTableNamed : ( NSString * ) aTableName
withDefaultValue : ( NSString * ) defaultValue
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
{
return [ [ self resourceManager ] stringForKey : aKey
inTableNamed : aTableName
withDefaultValue : defaultValue
inFramework : aFrameworkName
languages : languages ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSDictionary * ) stringsTableNamed : ( NSString * ) aTableName
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
{
NSDictionary * st = nil ;
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
st = [ [ self resourceManager ] stringsTableNamed : aTableName
inFramework : aFrameworkName
languages : languages ] ;
2007-04-13 18:32:02 +00:00
2004-08-28 11:17:33 +00:00
return st ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSArray * ) stringsTableArrayNamed : ( NSString * ) aTableName
inFramework : ( NSString * ) aFrameworkName
languages : ( NSArray * ) languages
{
return [ [ self resourceManager ] stringsTableArrayNamed : aTableName
inFramework : aFrameworkName
languages : languages ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSArray * ) filterLanguages : ( NSArray * ) languages
{
return languages ;
} ;
2008-03-30 22:10:20 +00:00
- ( NSString * ) sessionIdKey
{
return @ "wosid" ;
}
- ( NSString * ) instanceIdKey
{
return @ "woinst" ;
}
2008-08-20 20:32:10 +00:00
// Hackers note : we will not implement WO 5 ' s newDynamicURL . Use
// [ GSWDynamicURLString string ] ;
// or [ GSWDynamicURLString stringWithString : url ]
// instead .
2004-08-28 11:17:33 +00:00
@ end