Calendar - Technical documentation
Application packaging
Calendar application is packaged in following java packages:
org.cyklotron.calendar net.cyklotron.modules.actions.calendar net.cyklotron.modules.components.calendar net.cyklotron.modules.views.calendar
Configuration options
The calendar manager component need to be present in main container configuration.
<component class-key="org.cyklotron.calendar.CalendarManager"
class="org.cyklotron.calendar.DefaultCalendarManager"/>
Data model
Resource classes used in calendar application.
Calendar application defines following resource classes:
calendar.ApplicationNode
Resource class calendar.ApplicationNode represents the calendar application node and contains parameters set in for this application in High level resource scope.
atribute |
type |
constraint |
default |
description |
|---|---|---|---|---|
parameters |
parameters |
- |
- |
parameters container with local setting for application |
calendar.Year
Resource class calendar.Year represents year node in date structure described below.
The class does not containe any attributes.
calendar.Month
Resource class calendar.Month represents month node in date structure described below.
The class does not containe any attributes.
calendar.Day
Resource class calendar.Day represents day node in date structure described below.
The class does not containe any attributes.
calendar.Event
Resource class calendar.Event represents single event in calendar.
The resource class contains following attributes:
atribute |
type |
constraint |
default |
description |
|---|---|---|---|---|
description |
string |
- |
- |
event description |
startDate |
date |
- |
- |
event start date |
endDate |
date |
- |
- |
event end date |
personal |
boolean |
- |
- |
personal event marker |
allday |
boolean |
- |
- |
all day event marker |
duration |
integer |
- |
- |
event duration |
priority |
integer |
- |
- |
event priority |
location |
string |
- |
- |
event location |
street |
string |
- |
- |
street of event |
city |
string |
- |
- |
city of event |
phone |
string |
- |
- |
contact phone number |
calendar.EventTail
Resource class calendar.EventTail play the marker role to indicate that longer event takes place on parent day.
The resource class contains only reference to calendar.Event resource.
atribute |
type |
constraint |
default |
description |
|---|---|---|---|---|
head |
resource(calendar.Event) |
- |
- |
event reference |
calendar.ApplicationDefinition
Resource class calendar.ApplicationDefinition represents calendar application in registry.
Resources structure
The calendar are defined using tree structure data model. The calendar definition represented by application root node contains nodes describing years, months and days. The events are stored under the days. Events longer than one day are represented with calendar.EventTail stored under each day the event takes place.
Year, month and day nodes are created on demand when new event is created. When event is deleted the tree is being pruned to delete useless nodes.
Calendar application tree structure looks as follows:
- <HLR>/applications/calendar (of calendar.ApplicationNode resource class)
- <HLR>/applications/calendar/<YEAR>/ (of calendar.Year resource class)
- <HLR>/applications/calendar/<YEAR>/<MONTH>/ (of calendar.Month resource class)
- <HLR>/applications/calendar/<YEAR>/<MONTH>/<DAY>/ (of calendar.Day resource class)
- <HLR>/applications/calendar/<YEAR>/<MONTH>/<DAY>/<EVENT> (of calendar.Event resource class)
- <HLR>/applications/calendar/<YEAR>/<MONTH>/<DAY>/<EVENT_TAIL> (of calendar.EventTail resource class)
Security
The security is based on four permissions listed below:
- calendar.Add - checked to see whether the user is allowed to add new events.
- calendar.View - checked to see whether the user is allowed to view events in calendar.
- calendar.Modify - is checked to see whether the user is allowed to modify events.
- calendar.Remove - is checked to see whether the user is allowed to delete events.
By default Administrator and Visitor privileges are created and granted to respective High level resource Adminstrator and Member roles.
I18n
The application is ready for localisation. By default there are two i18n bundle files for pl_PL and en_US locale:
TODO
