From: helge Date: Thu, 17 Feb 2005 14:50:30 +0000 (+0000) Subject: enhanced resource associations to allow for framework names X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34493a2b49ec229653fb1647238546070a334b79;p=sope enhanced resource associations to allow for framework names git-svn-id: http://svn.opengroupware.org/SOPE/trunk@566 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.h b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.h index 2b5423fb..7f5e855e 100644 --- a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.h +++ b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.h @@ -42,6 +42,7 @@ { @private NSString *resourceName; + NSString *frameworkName; } /* accessors */ diff --git a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m index 8fcc28bc..81eee440 100644 --- a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m @@ -54,7 +54,16 @@ static BOOL doDebug = NO; return nil; } if ((self = [super init])) { - self->resourceName = [_name copy]; + NSRange r; + + r = [_name rangeOfString:@"/"]; + if (r.length == 0) + self->resourceName = [_name copy]; + else { + self->frameworkName = [[_name substringToIndex:r.location] copy]; + self->resourceName = + [[_name substringFromIndex:(r.location + r.length)] copy]; + } } return self; } @@ -63,7 +72,8 @@ static BOOL doDebug = NO; } - (void)dealloc { - [self->resourceName release]; + [self->resourceName release]; + [self->frameworkName release]; [super dealloc]; } @@ -73,7 +83,7 @@ static BOOL doDebug = NO; return self->resourceName; } - (NSString *)frameworkName { - return nil; + return self->frameworkName; } /* value */ diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index f39f03e0..8de3fad6 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -2,10 +2,14 @@ * WOApplication.m: the resource manager class to be used for a SOPE application can now be choosen using the 'WODefaultResourceManager' - default (defaults to WOResourceManager) (v4.5.116) + default (defaults to WOResourceManager) (v4.5.117) 2005-02-14 Helge Hess + * Associations/WOResourceURLAssociation.m: added support for + framework resources (can be specified as "fwname/resource") + (v4.5.116) + * SoObjects/SoObjectRequestHandler.m: added a safety limit on the URL to avoid excessive redirects to view URLs, the "stop suffix" can be configured using the 'WORedirectURISafetySuffix' default (v4.5.115) diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 06ed44f4..c2187ba3 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=116 +SUBMINOR_VERSION:=117 # v4.5.91 requires libNGExtensions v4.5.134 # v4.5.84 requires libNGExtensions v4.5.127