- (id)initWithPath:(NSString *)_path primaryKey:(id)_folderId
folderTypeName:(NSString *)_ftname folderType:(OCSFolderType *)_ftype
- location:(NSURL *)_loc
+ location:(NSURL *)_loc quickLocation:(NSURL *)_qloc
folderManager:(OCSFolderManager *)_fm
{
if ((self = [super init])) {
self->folderName = [[_path lastPathComponent] copy];
self->path = [_path copy];
self->location = [_loc retain];
- self->folderType = [_ftname copy];
+ self->quickLocation = [_qloc retain];
+ self->folderTypeName = [_ftname copy];
}
return self;
}
- (id)init {
return [self initWithPath:nil primaryKey:nil
folderTypeName:nil folderType:nil
- location:nil folderManager:nil];
+ location:nil quickLocation:nil
+ folderManager:nil];
}
- (void)dealloc {
[self->folderName release];
[self->path release];
[self->location release];
- [self->folderType release];
+ [self->quickLocation release];
+ [self->folderTypeName release];
[super dealloc];
}
}
- (NSString *)folderTypeName {
- return self->folderType;
+ return self->folderTypeName;
}
/* description */
OCSFolderType *folderType;
NSString *folderTypeName, *locationString, *folderName, *path;
NSNumber *folderId;
- NSURL *location;
+ NSURL *location, *quickLocation;
if (_record == nil) return nil;
__PRETTY_FUNCTION__, _record];
return nil;
}
+
+ locationString = [_record objectForKey:@"cLocation"];
+ quickLocation = [locationString isNotNull]
+ ? [NSURL URLWithString:locationString]
+ : nil;
folder = [[OCSFolder alloc] initWithPath:path primaryKey:folderId
folderTypeName:folderTypeName
folderType:folderType
- location:location folderManager:self];
+ location:location quickLocation:quickLocation
+ folderManager:self];
return [folder autorelease];
}
DEFAULT nextval('SOGo_folder_info_seq')
NOT NULL
PRIMARY KEY, -- the primary key
- c_path VARCHAR(255) NOT NULL, -- the full path to the folder
- c_path1 VARCHAR(255) NOT NULL, -- individual parts (for fast queries)
- c_path2 VARCHAR(255) NULL, -- individual parts (for fast queries)
- c_path3 VARCHAR(255) NULL, -- individual parts (for fast queries)
- c_path4 VARCHAR(255) NULL, -- individual parts (for fast queries)
- c_foldername VARCHAR(255) NOT NULL, -- last path component
- c_location VARCHAR(2048) NOT NULL, -- URL to database of the folder
- c_folder_type VARCHAR(255) NOT NULL -- the folder type ...
+ c_path VARCHAR(255) NOT NULL, -- the full path to the folder
+ c_path1 VARCHAR(255) NOT NULL, -- parts (for fast queries)
+ c_path2 VARCHAR(255) NULL, -- parts (for fast queries)
+ c_path3 VARCHAR(255) NULL, -- parts (for fast queries)
+ c_path4 VARCHAR(255) NULL, -- parts (for fast queries)
+ c_foldername VARCHAR(255) NOT NULL, -- last path component
+ c_location VARCHAR(2048) NOT NULL, -- URL to folder
+ c_quick_location VARCHAR(2048) NULL, -- URL to quicktable of folder
+ c_folder_type VARCHAR(255) NOT NULL -- the folder type ...
);
INSERT INTO SOGo_folder_info
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_folder_type )
+ c_location, c_quick_location, c_folder_type )
VALUES
( '/Users',
'Users',
NULL,
NULL,
NULL,
- 'Calendar',
- 'http://OGo:OGo@localhost/test', 'Container' );
+ 'Users',
+ 'http://OGo:OGo@localhost/test/SOGo_user_folder',
+ 'http://OGo:OGo@localhost/test/SOGo_user_folder_quick',
+ 'Container' );
INSERT INTO SOGo_folder_info
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_folder_type )
+ c_location, c_quick_location, c_folder_type )
VALUES
( '/Users/helge',
'Users',
'helge',
NULL,
NULL,
- 'Calendar',
- 'http://OGo:OGo@localhost/test', 'Container' );
+ 'helge',
+ 'http://OGo:OGo@localhost/test/SOGo_user_folder',
+ 'http://OGo:OGo@localhost/test/SOGo_user_folder_quick',
+ 'Container' );
INSERT INTO SOGo_folder_info
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_folder_type )
+ c_location, c_quick_location, c_folder_type )
VALUES
( '/Users/helge/Calendar',
'Users',
'Calendar',
NULL,
'Calendar',
- 'http://OGo:OGo@localhost/test', 'Appointment' );
+ 'http://OGo:OGo@localhost/test/SOGo_helge_privcal',
+ 'http://OGo:OGo@localhost/test/SOGo_helge_privcal_quick',
+ 'Appointment' );