]> err.no Git - sope/blob - sope-appserver/NGObjWeb/SoObjects/SoProduct.h
added some WebDrive WebDAV properties
[sope] / sope-appserver / NGObjWeb / SoObjects / SoProduct.h
1 /*
2   Copyright (C) 2002-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with SOPE; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #ifndef __SoObjects_SoProduct_H__
23 #define __SoObjects_SoProduct_H__
24
25 #import <Foundation/NSObject.h>
26
27 /*
28   SoProduct
29   
30   SoProduct are packages of SOPE pages, methods, resources etc. SoProducts
31   are usually represented by bundles and defined using the product.plist
32   manifest resource inside of the bundle.
33   
34   The manifest.plist has four root keys:
35     "classes"         - classes declared by the product
36     "categories"      - categories declared by the product
37     "requires"        - products this product depends upon
38     "publicResources" - names of the resources exported to the web
39 */
40
41 @class NSString, NSException, NSBundle, NSMutableDictionary, NSArray;
42 @class WOApplication, WOResourceManager;
43 @class SoProductResourceManager;
44
45 @interface SoProduct : NSObject
46 {
47   NSBundle                 *bundle;
48   NSMutableDictionary      *classes;
49   NSMutableDictionary      *categories;
50   NSArray                  *requiredProducts;
51   NSArray                  *publicResources;
52   SoProductResourceManager *resourceManager;
53   
54   struct {
55     BOOL isLoaded:1;
56     BOOL isCodeLoaded:1;
57     int  reserved:30;
58   } flags;
59 }
60
61 - (id)initWithBundle:(NSBundle *)_bundle;
62
63 /* accessors */
64
65 - (NSArray *)requiredProducts;
66 - (BOOL)isPublicResource:(NSString *)_key;
67 - (NSBundle *)bundle;
68 - (NSString *)productName;
69 - (BOOL)isMainProduct;
70
71 /* loading */
72
73 - (BOOL)load;
74 - (BOOL)reloadIfPossible;
75
76 /* resource manager */
77
78 - (WOResourceManager *)resourceManager;
79
80 @end
81
82 #endif /* __SoObjects_SoProduct_H__ */