]> err.no Git - sope/commitdiff
enhanced resource associations to allow for framework names
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 17 Feb 2005 14:50:30 +0000 (14:50 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 17 Feb 2005 14:50:30 +0000 (14:50 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@566 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.h
sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m
sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/Version

index 2b5423fb903eaebdb09cf2059d57f3f0438e7601..7f5e855ee2ab83f61433ac689eeb847776811c6d 100644 (file)
@@ -42,6 +42,7 @@
 {
 @private
   NSString *resourceName;
+  NSString *frameworkName;
 }
 
 /* accessors */
index 8fcc28bc6ad1879a8bb55ecdb8ab19115a9b6643..81eee440e6df9b64129e193bcfd9480332d4d392 100644 (file)
@@ -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 */
index f39f03e0b16bcccb92ecc784d9335e2c534c3487..8de3fad640e7f99cedd9bb03ae87de314a941646 100644 (file)
@@ -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  <helge.hess@opengroupware.org>
 
+       * 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)
index 06ed44f42ecc461f5b1ade1fea266bfb73862ed4..c2187ba337b18d0f44f29cc399c7bca106265b86 100644 (file)
@@ -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