2002-11-27 Manuel Guesdon <mguesdon@orange-concept.com>

* GSWeb/GSWApplication.m:
		o added \n in logs
		o added removeVolatileDomainForName: before setting it
		o remove rcsId
		o changed class creation to avoid libFoundationExt dependency
		o reduced compilation  warnings
	* GSWeb/GSWDisplayGroup.m:
		o fixed bug in -initWithKeyValueUnarchiver: for defaultStringMatchFormat
		o remove rcsId
	* GSWeb/GSWConditional.[hm]
		o added _value and _conditionValue (see doc)
		o documentation
		o remove rcsId
	* GSWeb/GSWConstants.[hm]
		o added conditionValue
	* config.mak
		o switched to gdl2
	* GSWeb/GSWDeployedBundle.h:
		o changed bundleWithPath: return path to avoid warning
	* GSWeb/GSWSessionStore.[hm]:
		o added containsSessionID: and allSessionIDs;
		o implemented +serverSessionStore
		o remove rcsId
	* GSWeb/GSWComponentDefinition.m:
		o logs
		o remove rcsId


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15156 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Manuel Guesdon 2002-11-27 20:25:22 +00:00
parent 42c90edafc
commit 9419cbccdc
15 changed files with 183 additions and 80 deletions

View file

@ -1,3 +1,32 @@
2002-11-27 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb/GSWApplication.m:
o added \n in logs
o added removeVolatileDomainForName: before setting it
o remove rcsId
o changed class creation to avoid libFoundationExt dependency
o reduced compilation warnings
* GSWeb/GSWDisplayGroup.m:
o fixed bug in -initWithKeyValueUnarchiver: for defaultStringMatchFormat
o remove rcsId
* GSWeb/GSWConditional.[hm]
o added _value and _conditionValue (see doc)
o documentation
o remove rcsId
* GSWeb/GSWConstants.[hm]
o added conditionValue
* config.mak
o switched to gdl2
* GSWeb/GSWDeployedBundle.h:
o changed bundleWithPath: return path to avoid warning
* GSWeb/GSWSessionStore.[hm]:
o added containsSessionID: and allSessionIDs;
o implemented +serverSessionStore
o remove rcsId
* GSWeb/GSWComponentDefinition.m:
o logs
o remove rcsId
2002-11-23 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWExtensions.framework/GSWLongResponsePage.h:
o fixed WO* to GSW*

View file

@ -62,9 +62,9 @@ ADDITIONAL_INCLUDE_DIRS = -I$(GNUSTEP_SYSTEM_ROOT)/db -I../.. -I../GSWeb.framew
# Additional LDFLAGS to pass to the linker
ifeq ($(debug), yes)
ADDITIONAL_LDFLAGS = -lFoundationExt_d -lGSWeb_d -lGSANTLR_d
ADDITIONAL_LDFLAGS = -lGSWeb_d -lGSANTLR_d
else
ADDITIONAL_LDFLAGS = -lFoundationExt -lGSWeb -lGSANTLR
ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR
endif
#-lgnustep-xraw

View file

@ -62,10 +62,10 @@ ADDITIONAL_INCLUDE_DIRS = -I$(GNUSTEP_SYSTEM_ROOT)/db -I../.. -I../GSWeb.frame
# Additional LDFLAGS to pass to the linker
ifeq ($(debug), yes)
ADDITIONAL_LDFLAGS = -lFoundationExt_d -lGSWeb_d -lGSANTLR_d
ADDITIONAL_LDFLAGS = -lGSWeb_d -lGSANTLR_d
#-lGSWExtensions_d
else
ADDITIONAL_LDFLAGS = -lFoundationExt -lGSWeb -lGSANTLR
ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR
#-lGSWExtensions
endif

View file

@ -7,6 +7,7 @@
$Revision$
$Date$
$Id$
This file is part of the GNUstep Web Library.
@ -27,14 +28,7 @@
</license>
**/
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
#ifdef NOEXTENSIONS
#else
#include <extensions/NGReflection.h>
#include <extensions/GarbageCollector.h>
#endif
#if GDL2 // GDL2 implementation
#include <EOAccess/EOModelGroup.h>
#endif
@ -212,6 +206,8 @@ int GSWApplicationMainReal(NSString* applicationClassName,
[newArgs setObject:argValue
forKey:argKey];
};
NSDebugFLog(@"NSArgumentDomain: %@ Args: %@",NSArgumentDomain,newArgs);
[defaults removeVolatileDomainForName:NSArgumentDomain];
[defaults setVolatileDomain:newArgs
forName:NSArgumentDomain];
};
@ -1095,8 +1091,8 @@ selfLockn,
-(NSString*)_directConnectURL
{
NSString* directConnectURL=nil;
NSString* cgiAdaptorURL=[[self class]cgiAdaptorURL]; //return http://titi.toto.com/cgi/GSWeb.exe
NSArray* adaptor=[self adaptors];
//Not used yet NSString* cgiAdaptorURL=[[self class]cgiAdaptorURL]; //return http://titi.toto.com/cgi/GSWeb.exe
//Not used yet NSArray* adaptor=[self adaptors];
//(call name)
LOGObjectFnNotImplemented(); //TODOFN
return directConnectURL; //return http://titi.toto.com:1436/cgi/GSWeb.exe/ObjCTest3
@ -1610,7 +1606,7 @@ selfLockn,
allFrameworks=[NSBundle allFrameworks];
for(frameworkN=0;frameworkN<[allFrameworks count];frameworkN++)
{
NSDictionary* infoDictionary=[[allFrameworks objectAtIndex:frameworkN] infoDictionary];
//Not used yet NSDictionary* infoDictionary=[[allFrameworks objectAtIndex:frameworkN] infoDictionary];
//TODO what ???
};
}
@ -2321,10 +2317,10 @@ selfLockn,
-(void)threadWillExit
{
// GSWLogC("GC** GarbageCollector collectGarbages START");
printf("GC** GarbageCollector collectGarbages START");
printf("GC** GarbageCollector collectGarbages START\n");
//TODO-NOW [GarbageCollector collectGarbages];//LAST //CLEAN
// GSWLogC("GC** GarbageCollector collectGarbages STOP");
printf("GC** GarbageCollector collectGarbages STOP");
printf("GC** GarbageCollector collectGarbages STOP\n");
};
//--------------------------------------------------------------------
@ -2745,7 +2741,7 @@ selfLockn,
monitor=[self _remoteMonitor];
if (monitor)
{
NSString* monitorApplicationName=[self _monitorApplicationName];
//Not used yet NSString* monitorApplicationName=[self _monitorApplicationName];
//TODO
};
}
@ -3003,7 +2999,7 @@ selfLockn,
[application name]);
GSWApp=application;
#if !GSWEB_WONAMES
WOApp=application;
WOApp=(WOApplication*)application;
#endif
};
@ -4482,17 +4478,12 @@ selfLockn,
{
int i=0;
NSString* aClassName=nil;
Class aClass=nil;
int newClassIndex=0;
Class* newClasses=(Class*)objc_malloc(sizeof(Class)*([classes count]+1));
memset(newClasses,0,sizeof(Class)*([classes count]+1));
NSMutableArray* newClasses=nil;
for(i=0;i<[classes count];i++)
{
aClassName=[classes objectAtIndex:i];
NSDebugMLLog(@"application",@"aClassName:%@",aClassName);
aClass=NSClassFromString(aClassName);
NSDebugMLLog(@"application",@"aClass:%@",aClass);
if (!aClass)
if (!NSClassFromString(aClassName))
{
NSString* superClassName=nil;
superClassName=[localDynCreateClassNames objectForKey:aClassName];
@ -4512,38 +4503,25 @@ selfLockn,
superClassName);
if (superClassName)
{
aClass=[NGObjCClass createClassWithName:aClassName
superClassName:superClassName
iVars:nil];
NSDebugMLLog(@"application",@"aClass:%p",aClass);
if (aClass)
NSValue* aClassPtr=GSObjCMakeClass(aClassName,superClassName,nil);
if (aClassPtr)
{
newClasses[newClassIndex]=aClass;
newClassIndex++;
if (!newClasses)
newClasses=[NSMutableArray array];
[newClasses addObject:aClassPtr];
}
else
{
LOGError(@"Can't create one of these classes %@ (super class: %@)",
aClassName,superClassName);
};
};
};
};
if (newClassIndex>0)
if ([newClasses count]>0)
{
NSString* moduleName=[NSString stringUniqueIdWithLength:4];//TODO
NGObjCModule* module=[NGObjCModule moduleWithName:moduleName];
ok=[module executeWithClassArray:newClasses];
NSDebugMLLog(@"application",@"ok:%d",(int)ok);
if (!ok)
{
//TODO
LOGError(@"Can't create one of these classes %@",classes);
}
else
{
/* infoClassNewClass=[NGObjCClass infoForClass:aNewClass];
[infoClassNewClass addMethods:[infoClass methods]];
[infoClassNewClass addClassMethods:[infoClass classMethods]];
*/
};
GSObjCAddClasses(newClasses);
};
objc_free(newClasses);
};
LOGClassFnStop();
return ok;

View file

@ -7,6 +7,7 @@
$Revision$
$Date$
$Id$
This file is part of the GNUstep Web Library.
@ -27,8 +28,6 @@
</license>
**/
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
//====================================================================
@ -425,7 +424,7 @@ languages:(NSArray*)languages
// If we haven't found a superclass, use GSWComponent as the superclass
if (!superClassName)
superClassName=@"GSWComponent";
NSDebugMLLog(@"gswcomponents",@"superClassName=%@",superClassName);
NSDebugMLLog(@"gswcomponents",@"_name=%@ superClassName=%@",_name,superClassName);
// Create class
createClassesOk=[GSWApplication createUnknownComponentClasses:[NSArray arrayWithObject:_name]

View file

@ -39,6 +39,10 @@
@interface GSWConditional: GSWDynamicElement
{
GSWAssociation* _condition;
//GSWeb Additions {
GSWAssociation* _value;
GSWAssociation* _conditionValue;
// }
GSWAssociation* _negate;
GSWHTMLStaticGroup* _childrenGroup;
};

View file

@ -7,6 +7,7 @@
$Revision$
$Date$
$Id$
<abstract></abstract>
@ -29,10 +30,22 @@
</license>
**/
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
/**
Bindings
condition if evaluated to YES (or NO if negate evaluted to YES), the enclosed code is emitted/used
value if evaluated value is equal to conditionValue evaluated value, the enclosed code is
emitted/used (or not equal if negate evaluated to YES);
conditionValue if evaluated value is equal to conditionValue evaluated value, the enclosed code is
emitted/used (or not equal if negate evaluated to YES);
negate If evaluated to yes, negate the condition (defaut=NO)
**/
//====================================================================
@implementation GSWConditional
@ -66,8 +79,31 @@ static char rcsId[] = "$Id$";
_childrenGroup=[[GSWHTMLStaticGroup alloc]initWithContentElements:elements];
_condition = [[associations objectForKey:condition__Key
withDefaultObject:[_condition autorelease]] retain];
withDefaultObject:[_condition autorelease]] retain];
NSDebugMLLog(@"gswdync",@"GSWConditional condition=%@",_condition);
if (!WOStrictFlag)
{
_value = [[associations objectForKey:value__Key
withDefaultObject:[_value autorelease]] retain];
NSDebugMLLog(@"gswdync",@"GSWConditional value=%@",_value);
_conditionValue = [[associations objectForKey:conditionValue__Key
withDefaultObject:[_conditionValue autorelease]] retain];
NSDebugMLLog(@"gswdync",@"GSWConditional conditionValue=%@",_conditionValue);
if (_conditionValue && !_value)
ExceptionRaise0(@"GSWConditional",
@"'conditionValue' parameter need 'value' parameter");
if (_value && !_conditionValue)
ExceptionRaise0(@"GSWConditional",
@"'value' parameter need 'conditionValue' parameter");
if (_conditionValue && _condition)
ExceptionRaise0(@"GSWConditional",
@"You can't have 'condition' parameter with 'value' and 'conditionValue' parameters");
};
_negate = [[associations objectForKey:negate__Key
withDefaultObject:[_negate autorelease]] retain];
NSDebugMLLog(@"gswdync",@"GSWConditional negate=%@",_negate);
@ -80,7 +116,11 @@ static char rcsId[] = "$Id$";
-(void)dealloc
{
DESTROY(_condition);
DESTROY(_value);
//GSWeb Additions {
DESTROY(_conditionValue);
DESTROY(_negate);
// }
DESTROY(_childrenGroup);
[super dealloc];
}
@ -115,8 +155,21 @@ static char rcsId[] = "$Id$";
LOGObjectFnStart();
GSWStartElement(aContext);
GSWAssertCorrectElementID(aContext);
condition=[self evaluateCondition:_condition
inContext:aContext];
if (!WOStrictFlag && _conditionValue)
{
GSWComponent* component=[aContext component];
id conditionValueValue=[_conditionValue valueInComponent:component];
id valueValue=[_value valueInComponent:component];
NSDebugMLog(@"_conditionValue=%@ conditionValueValue=%@",
_conditionValue,conditionValueValue);
NSDebugMLog(@"_value=%@ valueValue=%@",
_value,valueValue);
condition=SBIsValueEqual(conditionValueValue,valueValue);
}
else
condition=[self evaluateCondition:_condition
inContext:aContext];
negate=[self evaluateCondition:_negate
inContext:aContext];
doIt=condition;
@ -156,8 +209,21 @@ static char rcsId[] = "$Id$";
LOGObjectFnStart();
GSWStartElement(aContext);
GSWAssertCorrectElementID(aContext);
condition=[self evaluateCondition:_condition
inContext:aContext];
if (!WOStrictFlag && _conditionValue)
{
GSWComponent* component=[aContext component];
id conditionValueValue=[_conditionValue valueInComponent:component];
id valueValue=[_value valueInComponent:component];
NSDebugMLog(@"_conditionValue=%@ conditionValueValue=%@",
_conditionValue,conditionValueValue);
NSDebugMLog(@"_value=%@ valueValue=%@",
_value,valueValue);
condition=SBIsValueEqual(conditionValueValue,valueValue);
}
else
condition=[self evaluateCondition:_condition
inContext:aContext];
negate=[self evaluateCondition:_negate
inContext:aContext];
doIt=condition;
@ -198,8 +264,21 @@ static char rcsId[] = "$Id$";
LOGObjectFnStart();
GSWStartElement(aContext);
GSWSaveAppendToResponseElementID(aContext);
condition=[self evaluateCondition:_condition
inContext:aContext];
if (!WOStrictFlag && _conditionValue)
{
GSWComponent* component=[aContext component];
id conditionValueValue=[_conditionValue valueInComponent:component];
id valueValue=[_value valueInComponent:component];
NSDebugMLog(@"_conditionValue=%@ conditionValueValue=%@",
_conditionValue,conditionValueValue);
NSDebugMLog(@"_value=%@ valueValue=%@",
_value,valueValue);
condition=SBIsValueEqual(conditionValueValue,valueValue);
}
else
condition=[self evaluateCondition:_condition
inContext:aContext];
NSDebugMLLog(@"gswdync",@"condition=%s",condition ? "YES" : "NO");
negate=[self evaluateCondition:_negate
inContext:aContext];

View file

@ -263,6 +263,7 @@ extern id size__Key;
extern id selection__Key;
extern id checked__Key;
extern id condition__Key;
extern id conditionValue__Key;
extern id negate__Key;
extern id pageName__Key;
extern id elementName__Key;

View file

@ -269,6 +269,7 @@ id size__Key = @"size";
id selection__Key = @"selection";
id checked__Key = @"checked";
id condition__Key = @"condition";
id conditionValue__Key = @"conditionValue";
id negate__Key = @"negate";
id pageName__Key = @"pageName";
id elementName__Key = @"elementName";

View file

@ -81,7 +81,7 @@
@end
@interface GSWDeployedBundle (GSWDeployedBundleA)
+(GSWDeployedBundle*)bundleWithPath:(NSString*)aPath;
+(id)bundleWithPath:(NSString*)aPath;
@end
#endif //_GSWDeployedBundle_h__

View file

@ -8,6 +8,7 @@
$Revision$
$Date$
$Id$
This file is part of the GNUstep Web Library.
@ -28,8 +29,6 @@
</license>
**/
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
@class EOUndoManager;
@ -128,7 +127,7 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
[self setQualifier:
[unarchiver decodeObjectForKey:@"qualifier"]];
[self setDefaultStringMatchFormat:
[unarchiver decodeObjectForKey:@"formatForLikeQualifier"]];
[unarchiver decodeObjectForKey:@"defaultStringMatchFormat"]];
[self setInsertedObjectDefaultValues:
[unarchiver decodeObjectForKey:@"insertedObjectDefaultValues"]];
[self setQueryOperator:[unarchiver decodeObjectForKey:@"queryOperator"]];

View file

@ -92,4 +92,11 @@ secure:(BOOL)flag;
-(void)_validateAPI;
@end
//====================================================================
@interface GSWSessionStore (GSWSessionStoreInfo)
-(BOOL)containsSessionID:(NSString*)aSessionID;
-(NSArray *)allSessionIDs;
@end
#endif //_GSWSessionStore_h__

View file

@ -7,6 +7,7 @@
$Revision$
$Date$
$Id$
This file is part of the GNUstep Web Library.
@ -27,8 +28,6 @@
</license>
**/
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
@ -322,8 +321,7 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
+(GSWSessionStore*)serverSessionStore
{
LOGClassFnNotImplemented(); //TODOFN
return nil;
return [[GSWServerSessionStore new] autorelease];
};
@end
@ -349,13 +347,6 @@ static char rcsId[] = "$Id$";
return [[GSWSessionStorePage new] autorelease];
};
//--------------------------------------------------------------------
// serverSessionStore
+(GSWSessionStore*)serverSessionStore
{
return [[GSWSessionStoreServer new] autorelease];
};
*/
//--------------------------------------------------------------------
// restoreSession
@ -400,4 +391,19 @@ static char rcsId[] = "$Id$";
@end
//====================================================================
@implementation GSWSessionStore (GSWSessionStoreInfo)
-(BOOL)containsSessionID:(NSString*)aSessionID
{
return NO;
};
-(NSArray *)allSessionIDs
{
return nil;
}
@end

View file

@ -64,9 +64,9 @@ ADDITIONAL_INCLUDE_DIRS = -I. -I../.. @XML_CFLAGS@
# Additional LDFLAGS to pass to the linker
ifeq ($(debug), yes)
LIBRARIES_DEPENP_UPON += -lFoundationExt_d @AUX_LIBS@
LIBRARIES_DEPENP_UPON += @AUX_LIBS@
else
LIBRARIES_DEPEND_UPON += -lFoundationExt @AUX_LIBS@
LIBRARIES_DEPEND_UPON += @AUX_LIBS@
endif
# Additional library directories the linker should search

View file

@ -2,7 +2,7 @@
#
#
DYNAMIC_LINKER=simple
GDL2=no
GDL2=yes
LIBWRAP=yes
#Log Memory Alloc/Dealloc