Monotone-Parent: 54ec8c39f5bb2075a087aabb062d28af978421de
Monotone-Revision: 36eb21ac828a920f7994e922c1c7e6fe481c62ac Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-01-16T18:57:58 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
8731c448c3
commit
d36fb810d5
|
@ -1,5 +1,9 @@
|
||||||
2008-01-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2008-01-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/SOGo/SOGoUser.m ([SOGoUser
|
||||||
|
+userWithLogin:newLoginroles:newRoles]): try to retrieve the
|
||||||
|
specified user from the SOGoCache.
|
||||||
|
|
||||||
* SoObjects/SOGo/SOGoObject.m ([SOGoObject
|
* SoObjects/SOGo/SOGoObject.m ([SOGoObject
|
||||||
-lookupName:lookupNameinContext:localContextacquire:acquire]): try
|
-lookupName:lookupNameinContext:localContextacquire:acquire]): try
|
||||||
to retrieve the object specified from the cache and returns it if
|
to retrieve the object specified from the cache and returns it if
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#import <WEExtensions/WEResourceManager.h>
|
#import <WEExtensions/WEResourceManager.h>
|
||||||
|
|
||||||
|
#import <SoObjects/SOGo/SOGoCache.h>
|
||||||
#import <SoObjects/SOGo/SOGoDAVAuthenticator.h>
|
#import <SoObjects/SOGo/SOGoDAVAuthenticator.h>
|
||||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||||
#import <SoObjects/SOGo/SOGoUserFolder.h>
|
#import <SoObjects/SOGo/SOGoUserFolder.h>
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
@interface SOGo : SoApplication
|
@interface SOGo : SoApplication
|
||||||
{
|
{
|
||||||
NSMutableDictionary *localeLUT;
|
NSMutableDictionary *localeLUT;
|
||||||
|
SOGoCache *cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) currentLocaleConsideringLanguages:(NSArray *)_langs;
|
- (NSDictionary *) currentLocaleConsideringLanguages:(NSArray *)_langs;
|
||||||
|
@ -390,7 +392,9 @@ static BOOL debugObjectAllocation = NO;
|
||||||
static NSArray *runLoopModes = nil;
|
static NSArray *runLoopModes = nil;
|
||||||
WOResponse *resp;
|
WOResponse *resp;
|
||||||
|
|
||||||
|
cache = [SOGoCache sharedCache];
|
||||||
resp = [super dispatchRequest: _request];
|
resp = [super dispatchRequest: _request];
|
||||||
|
[SOGoCache killCache];
|
||||||
|
|
||||||
if (![self isTerminating])
|
if (![self isTerminating])
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#import <SaxObjC/XMLNamespaces.h>
|
#import <SaxObjC/XMLNamespaces.h>
|
||||||
|
|
||||||
// #import <NGObjWeb/SoClassSecurityInfo.h>
|
// #import <NGObjWeb/SoClassSecurityInfo.h>
|
||||||
|
#import <SOGo/SOGoCache.h>
|
||||||
#import <SOGo/SOGoCustomGroupFolder.h>
|
#import <SOGo/SOGoCustomGroupFolder.h>
|
||||||
#import <SOGo/LDAPUserManager.h>
|
#import <SOGo/LDAPUserManager.h>
|
||||||
#import <SOGo/SOGoPermissions.h>
|
#import <SOGo/SOGoPermissions.h>
|
||||||
|
@ -403,6 +404,11 @@ static NSNumber *sharedYes = nil;
|
||||||
obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
|
obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj)
|
||||||
|
[[SOGoCache sharedCache] registerObject: obj
|
||||||
|
withName: _key
|
||||||
|
inContainer: container];
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#import "NSDictionary+Utilities.h"
|
#import "NSDictionary+Utilities.h"
|
||||||
#import "NSString+Utilities.h"
|
#import "NSString+Utilities.h"
|
||||||
|
|
||||||
|
#import "SOGoCache.h"
|
||||||
#import "SOGoObject.h"
|
#import "SOGoObject.h"
|
||||||
|
|
||||||
@interface SOGoObject(Content)
|
@interface SOGoObject(Content)
|
||||||
|
@ -560,10 +561,19 @@ static BOOL kontactGroupDAV = YES;
|
||||||
acquire: (BOOL) acquire
|
acquire: (BOOL) acquire
|
||||||
{
|
{
|
||||||
id obj;
|
id obj;
|
||||||
|
SOGoCache *cache;
|
||||||
|
|
||||||
obj = [[self soClass] lookupKey: lookupName inContext: localContext];
|
cache = [SOGoCache sharedCache];
|
||||||
if (obj)
|
obj = [cache objectNamed: lookupName inContainer: self];
|
||||||
[obj bindToObject: self inContext: localContext];
|
if (!obj)
|
||||||
|
{
|
||||||
|
obj = [[self soClass] lookupKey: lookupName inContext: localContext];
|
||||||
|
if (obj)
|
||||||
|
{
|
||||||
|
[obj bindToObject: self inContext: localContext];
|
||||||
|
[cache registerObject: obj withName: lookupName inContainer: self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,11 @@
|
||||||
|
|
||||||
#import "AgenorUserDefaults.h"
|
#import "AgenorUserDefaults.h"
|
||||||
#import "LDAPUserManager.h"
|
#import "LDAPUserManager.h"
|
||||||
|
#import "NSArray+Utilities.h"
|
||||||
|
#import "SOGoCache.h"
|
||||||
#import "SOGoDateFormatter.h"
|
#import "SOGoDateFormatter.h"
|
||||||
#import "SOGoObject.h"
|
#import "SOGoObject.h"
|
||||||
#import "SOGoPermissions.h"
|
#import "SOGoPermissions.h"
|
||||||
#import "NSArray+Utilities.h"
|
|
||||||
|
|
||||||
#import "SOGoUser.h"
|
#import "SOGoUser.h"
|
||||||
|
|
||||||
|
@ -124,10 +125,18 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||||
+ (SOGoUser *) userWithLogin: (NSString *) newLogin
|
+ (SOGoUser *) userWithLogin: (NSString *) newLogin
|
||||||
roles: (NSArray *) newRoles
|
roles: (NSArray *) newRoles
|
||||||
{
|
{
|
||||||
|
SOGoCache *cache;
|
||||||
SOGoUser *user;
|
SOGoUser *user;
|
||||||
|
|
||||||
user = [[self alloc] initWithLogin: newLogin roles: newRoles];
|
cache = [SOGoCache sharedCache];
|
||||||
[user autorelease];
|
user = [cache userNamed: newLogin];
|
||||||
|
if (!user)
|
||||||
|
{
|
||||||
|
user = [[self alloc] initWithLogin: newLogin roles: newRoles];
|
||||||
|
[user autorelease];
|
||||||
|
[cache registerUser: user];
|
||||||
|
}
|
||||||
|
[user setPrimaryRoles: newRoles];
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
@ -181,6 +190,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setPrimaryRoles: (NSArray *) newRoles
|
||||||
|
{
|
||||||
|
ASSIGN (roles, newRoles);
|
||||||
|
}
|
||||||
|
|
||||||
- (void) setCurrentPassword: (NSString *) newPassword
|
- (void) setCurrentPassword: (NSString *) newPassword
|
||||||
{
|
{
|
||||||
ASSIGN (currentPassword, newPassword);
|
ASSIGN (currentPassword, newPassword);
|
||||||
|
|
Loading…
Reference in New Issue