]> err.no Git - scalable-opengroupware.org/blob - UI/Scheduler/UIxComponentEditor.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1017 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / Scheduler / UIxComponentEditor.h
1 /* UIxComponentEditor.h - this file is part of SOGo
2  *
3  * Copyright (C) 2006 Inverse groupe conseil
4  *
5  * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
6  *
7  * This file is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This file is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; see the file COPYING.  If not, write to
19  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef UIXCOMPONENTEDITOR_H
24 #define UIXCOMPONENTEDITOR_H
25
26 #import <SOGoUI/UIxComponent.h>
27
28 @class NSArray;
29 @class NSCalendarDate;
30 @class NSDictionary;
31 @class NSFormatter;
32 @class NSString;
33
34 @class iCalPerson;
35 @class iCalRecurrenceRule;
36 @class iCalRepeatableEntityObject;
37
38 @interface UIxComponentEditor : UIxComponent
39 {
40   NSString *iCalString;
41   NSString *errorText;
42   id item;
43   
44   /* individual values */
45   NSCalendarDate *startDate;
46   NSCalendarDate *cycleUntilDate;
47   NSString *title;
48   NSString *location;
49   NSString *comment;
50   NSString *url;
51   iCalPerson *organizer;
52   NSArray *participants;     /* array of iCalPerson's */
53   NSArray *resources;        /* array of iCalPerson's */
54   NSString *priority;
55   NSString *privacy;
56   NSString *status;
57   NSArray *categories;
58   BOOL checkForConflicts; /* default: NO */
59   NSDictionary *cycle;
60   NSString *cycleEnd;
61   NSString *componentOwner;
62
63   BOOL componentLoaded;
64 }
65
66 - (NSArray *) categoryItems;
67 - (void) setCategories: (NSArray *) _categories;
68 - (NSArray *) categories;
69 - (NSString *) itemCategoryText;
70
71 - (NSArray *) priorities;
72 - (void) setPriority: (NSString *) _priority;
73 - (NSString *) priority;
74 - (NSString *) itemPriorityText;
75
76 - (NSArray *) privacyClasses;
77 - (void) setPrivacy: (NSString *) _privacy;
78 - (NSString *) privacy;
79 - (NSString *) itemPrivacyText;
80
81 - (NSArray *) statusTypes;
82 - (void) setStatus: (NSString *) _status;
83 - (NSString *) status;
84 - (NSString *) itemStatusText;
85
86 - (void) setItem: (id) _item;
87 - (id) item;
88 - (NSString *) itemPriorityText;
89
90 - (void) setErrorText: (NSString *) _txt;
91 - (NSString *) errorText;
92 - (BOOL) hasErrorText;
93
94 - (void) setICalString: (NSString *) _s;
95 - (NSString *) iCalString;
96
97 - (NSCalendarDate *) newStartDate;
98
99 - (void) setStartDate: (NSCalendarDate *) _date;
100 - (NSCalendarDate *) startDate;
101
102 - (void) setTitle: (NSString *) _value;
103 - (NSString *) title;
104
105 - (void) setLocation: (NSString *) _value;
106 - (NSString *) location;
107
108 - (void) setComment: (NSString *) _value;
109 - (NSString *) comment;
110
111 - (void) setUrl: (NSString *) _url;
112 - (NSString *) url;
113
114 - (void) setParticipants: (NSArray *) _parts;
115 - (NSArray *) participants;
116
117 - (void) setResources: (NSArray *) _res;
118 - (NSArray *) resources;
119
120 - (void) setCheckForConflicts: (BOOL) _checkForConflicts;
121 - (BOOL) checkForConflicts;
122
123 - (NSArray *) cycles;
124 - (void) setCycle: (NSDictionary *) _cycle;
125 - (NSDictionary *) cycle;
126 - (BOOL) hasCycle;
127 - (NSString *) cycleLabel;
128 - (void) setCycleUntilDate: (NSCalendarDate *) _cycleUntilDate;
129 - (NSCalendarDate *) cycleUntilDate;
130 - (iCalRecurrenceRule *) rrule;
131 - (void) adjustCycleControlsForRRule: (iCalRecurrenceRule *) _rrule;
132 - (NSDictionary *) cycleMatchingRRule: (iCalRecurrenceRule *) _rrule;
133 - (NSArray *) cycleEnds;
134 - (void) setCycleEnd: (NSString *) _cycleEnd;
135 - (NSString *) cycleEnd;
136 - (BOOL) isCycleEndUntil;
137 - (void) setIsCycleEndUntil;
138 - (void) setIsCycleEndNever;
139
140 - (NSString *) componentOwner;
141 - (NSArray *) availableCalendars;
142
143 /* access */
144 - (BOOL) isMyComponent;
145 - (BOOL) canEditComponent;
146
147 /* helpers */
148 - (NSFormatter *) titleDateFormatter;
149 - (NSString *) completeURIForMethod: (NSString *) _method;
150 - (BOOL) isWriteableClientObject;
151 - (NSException *) validateObjectForStatusChange;
152
153 /* subclasses */
154 - (void) loadValuesFromComponent: (iCalRepeatableEntityObject *) component;
155
156 - (NSString *) iCalStringTemplate;
157 - (NSString *) iCalParticipantsAndResourcesStringFromQueryParameters;
158 - (NSString *) iCalParticipantsStringFromQueryParameters;
159 - (NSString *) iCalResourcesStringFromQueryParameters;
160 - (NSString *) iCalStringFromQueryParameter: (NSString *) _qp
161                                      format: (NSString *) _format;
162 - (NSString *) iCalOrganizerString;
163 - (NSString *) toolbar;
164
165 @end
166
167 #endif /* UIXCOMPONENTEDITOR_H */