1   package hudsonfog.voc.model;
2   
3   import com.fogx.webdav.DavResource;
4   import com.fogx.webdav.DavClass;
5   import com.fogx.webdav.DavBean;
6   import com.fogx.webdav.DavProperty;
7   import static com.fogx.webdav.DavProperty.*;
8   import com.fogx.webdav.packages.DavBeanPackage;
9   import com.fogx.webdav.util.DavResourceSupport;
10  import com.fogx.webdav.util.UrlUtil;
11  import java.util.Date;
12  import java.util.Map;
13  import java.util.HashMap;
14  import java.util.List;
15  import java.util.Collections;
16  import java.util.Arrays;
17  
18  import hudsonfog.voc.system.primitiveTypes.*;
19  import hudsonfog.voc.system.behavior.*;
20  import hudsonfog.voc.model.workflow.*;
21  import hudsonfog.voc.system.XMLSchema.*;
22  
23  import hudsonfog.voc.system.fog.*;
24  
25  
26  public abstract class recurrence {
27  
28    /**
29   * any scheduled item. like project, task, delivery
30   */
31    public static interface ScheduledItem extends Cancellable {
32           @_icon("icons/start.gif")
33           public ComplexDate                   start = null; //* at what date/time event should start
34           @_icon("icons/end.gif")
35           public ComplexDate                   end = null; //* at what date/time event should end
36           public Boolean                       conflict = null; //* indicates if this item is in conflict - (overlapping) with some other item
37           @_readOnly
38           @_notSearchable
39           @_backLink("scheduledItem")
40           public ReminderAlert[]               reminders = null; //* reminder alerts that have been sent for this item
41           public Duration                      duration = null; //* duration of the event
42           @_avoidDisplaying // parameter used by WebDAV client internally (not shown in UI)
43           @_parameter
44           public ComplexDate                   groupby = null; // this property is used an an internal parameter for grouping allocations
45           public ComplexDate                   eventTime = null;
46    }
47  
48    /**
49   * recurrent pattern
50   */
51    @DavClass._aLiteral
52    public static class Frequency extends hudsonfog.voc.system.XMLSchema.stringLiteral {
53      private String value;
54      public Frequency(String value) {
55        this.value = value;
56      }
57  
58      public String getValue() {
59        return value;
60      }
61    }
62  
63    /**
64   * any scheduled item with a recurrent pattern, like a weekly meeting, birthday, etc.
65   */
66    public static interface RecurrentItem extends ScheduledItem {
67           @_notSearchable // this makes no sense in Filter
68           public Frequency                     frequency = null; //* defines the recurrent pattern
69           @_dateFormat("~MMM-dd, yyyy")
70           @_avoidDisplayingInView // do not display in view mode (this is read and written only by FrequencyPropertyEditor)
71           @_alwaysReturnToClient
72           @_avoidDisplayingInEdit // do not display in edit mode (this is read and written only by FrequencyPropertyEditor)
73           @_avoidDisplayingOnCreate
74           public Long                          repeatFrom = null; //* marks that this event should not start repeating until this date
75           @_dateFormat("~MMM-dd, yyyy")
76           @_avoidDisplayingInView // do not display in view mode (this is read and written only by FrequencyPropertyEditor)
77           @_alwaysReturnToClient
78           @_avoidDisplayingInEdit // do not display in edit mode (this is read and written only by FrequencyPropertyEditor)
79           @_avoidDisplayingOnCreate
80           public Long                          repeatUntil = null; //* marks that this event should not stop repeating after this date
81           @_avoidDisplayingInEdit // do not display in edit mode (this is read and written only by FrequencyPropertyEditor)
82           public Integer                       maxRepetitions = null; //* marks that this event should stop repeating after this many iterations
83    }
84  }
85