Exo Calendar's documentation

How to initialize the default calendar, default group calendar, event categories and calendar setting?

  • You should have 'cs-plugins-configuration.xml' in exo.cd.web.portal project.
  • In 'cs-plugins-configuration.xml', you have to define some elements like these:
To Create default calendar for each user: Normally, when an user works with eXo portal, he/she uses Organization portlet to create new user, so the Calendar service will create default calendar Categories, default Calendar, event categories for the created user. To do that, you have to configure like:
<component-plugin>
  <name>calendar.new.user.event.listener</name>
  <set-method>addListenerPlugin</set-method>
  <type>org.exoplatform.calendar.service.impl.NewUserListener</type>
  <description>description</description>
  <init-params>      
    <value-param>
      <name>defaultCalendarCategory</name>
      <value>My group</value>
    </value-param>
    <value-param>
      <name>defaultCalendar</name>
      <value>Default</value>
    </value-param>
    <value-param>
      <name>defaultEventCategories</name>
      <value>Anniversary,Calls,Clients,Holiday,Meeting</value>
    </value-param>       
  <init-params>
</component-plugin>

  • calendar.new.user.event.listener: unique key to avoid duplicate names.
  • addListenerPlugin:This API of Organization service to allow other listener overwrite.
  • org.exoplatform.calendar.service.impl.NewUserListener: The object is used to define Calendar Service to insert database.
  • description: Some brief descriptions about plugin.
  • Name: DefaultCalendarCategory: The key to define the NewUserListener .class. Value: My group ? the name of the category of Calendar(it is single velue)
  • Name: defaultCalendar: Can't change this name because it is defined in this class org.exoplatform.calendar.service.impl.NewUserListener. Value: Default the name of a Calendar that will be created for that user and can use comma ',' to create more calendars. For example: default calendar 1, default calendar 2,...
  • Name: defaultEventCategories: The key to define some event categories 's name. Value: Anniversary,Calls,Clients,Holiday,Meeting: the name of categories of event that will be defined.
Addition to, Calendar Service also creates a Calendar Default Setting for the created user. To do that, you have to do like that:
<value-param>
    <name>viewType</name>
    <value>1</value>
  </value-param>        
  <value-param>
    <name>timeInterval</name>
    <value>15</value>
  </value-param>        
  <value-param>
    <name>weekStartOn</name>
    <value>2</value>
  </value-param>        
  <value-param>
    <name>dateFormat</name>
    <value>MM/dd/yyyy</value>
  </value-param>        
  <value-param>
    <name>timeFormat</name>
    <value>HH:mm</value> 
  </value-param>        
  <value-param>
    <name>localeId</name>
    <value>BEL</value>
  </value-param>        
  <value-param>
    <name>timezoneId</name>
    <value>Europe/Brussels</value>
  </value-param>        
  <value-param>
    <name>baseUrlForRss</name>
    <value></value>
  </value-param>        
  <value-param>
    <name>isShowWorkingTime</name>
    <value>false</value>
  </value-param>        
  <value-param>
    <name>workingTimeBegin</name>
    <value>08:00</value>
  </value-param>        
  <value-param>
    <name>workingTimeEnd</name>
    <value>18:00</value>
  </value-param>
  • Name: viewType default view after user logins and goes to Calendar portlet : value: 1 (mean we use week view as default) and we supported 7 types of view :
    • 0 : Day view
    • 1 : Week view
    • 2 : Month view
    • 3 : Year view
    • 4 : List view
    • 5 : Schedule view
    • 6 : Working days view
  • Name: timeInterval: the space when you drag and move the event (in Day view and Week view only) value:15 (in minutes)
  • Name: weekStartOn: only affect on Week view. It means: The start day of a week . value: 2: The start day is Monday. If you choose another value, the start date will be changed , follow these values :
    • 1 : Sunday
    • 2: Monday
    • 3: Tuesday
    • 4: Wednesday
    • 5: Thursday
    • 6: Friday
    • 7: Saturday
  • Name: dateFormat, The format of date. This format will be shown in Views. value: MM/dd/yyyy
  • Name: timeFormat, The format of time. value: HH:mm
  • Name: localeId: ID of geography locale value: BEL . You can visit: http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html for more about locale ids.
  • Name: timezoneId: ID of time zone value: Europe/Brussels . See more for Timezone ids at http://www.unicode.org/cldr/data/docs/design/formatting/zone_log.html#windows_ids
  • Name: isShowWorkingTime: The option to make the selected time interval (working time) highlight or not. value: false (Boolean value)
  • Name: workingTimeBegin: the start time in working time. value: 08:00
  • Name: workingTimeEnd: the end time in working time. value: 18:00
  • Note: Both Start time and End time format depends on the timeFormat that you define.
To create a default group calendar: Beside using the Organization Portlet to create an user, we also use it to create a group. Calendar service will generate a Calendar for that group (Group calendar means : we have a calendar for all users in that group and the user can do actions in that Calendar ). To do that we have some more listeners define below:
<component-plugin>
  <name>calendar.new.group.event.listener</name>
  <set-method>addListenerPlugin</set-method>
  <type>org.exoplatform.calendar.service.impl.NewGroupListener</type>
  <description>description</description>
  <init-params>
    <value-param>
      <name>defaultEditPermission</name>
      <value>*.*</value> 
    </value-param>
    <value-param>
      <name>defaultViewPermission</name>
      <value>*.*</value>
    </value-param>        
    <value-param>
      <name>defaultLocale</name>
      <value>BEL</value>
    </value-param>      
    <value-param>
      <name>defaultTimeZone</name>
      <value>Europe/Brussels</value>
    </value-param>         
  </init-params>    
</component-plugin>
  • Name: defaultEditPermission: The default Edit permission value: . it means all users in that group have modify and add, remove calendar, events of calendar .(Multi value membership, use coma (,) to split values)
  • Name: defaultViewPermission. Value: . stands for all in that group can view this calendar and all the events of this calendar (Multi value membership, use coma (,) to split values)
  • Name: defaultLocale: the default locale of the calendar Value: BEL (see more locale ids http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html )
  • Name: defaultTimeZone. The default time zone of calendar value: Europe/Brussels (see more for timeZone ids http://www.unicode.org/cldr/data/docs/design/formatting/zone_log.html#windows_ids)
  • Note: the permission you can define by two ways : use user name or use membership type permission is suitable (ex: *.manager,root,*.moderator).

How to Configure plug-in to send email reminder?

Notify to users when you create an event in calendar system is necessary job and for sending email notification you have to configure the reminder in this file ?cs-plugins-configuration.xml' :

<external-component-plugins>
    <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
    <component-plugin>
      <name>RecordsJob</name>
      <set-method>addPeriodJob</set-method>
      <type>org.exoplatform.calendar.service.ReminderPeriodJob</type>
      <description>add a job to the JobSchedulerService</description>
      <init-params>
        <properties-param>
          <name>job.info</name>
          <description>save the monitor data  periodically</description>
          <property name="jobName" value="ReminderJob"/>
          <property name="groupName" value="CollaborationSuite"/>
          <property name="job" value="org.exoplatform.calendar.service.ReminderJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="180000"/>     
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>               
        </properties-param>
        <properties-param>
          <name>reminder.info</name>
          <description>save the monitor data  periodically</description>
          <property name="" value="This is TimeZone"/>          
          <property name="accotimeZoneunt" value="exoservice@gmail.com"/>          
          <property name="password" value="exoadmin"/>          
          <property name="ssl" value="true"/> 
          <property name="outgoing" value="smtp.gmail.com"/>          
          <property name="port" value="465"/>          
       </properties-param>       
    </init-params>
  </component-plugin>
</external-component-plugins>

Below are some explanations about property parameters:

  • target-component : org.exoplatform.services.scheduler.JobSchedulerService: unique key for this plug-in.
  • Name: RecordsJob: name of a schedule job.
  • set-method: addPeriodJob:
  • type: org.exoplatform.calendar.service.ReminderPeriodJob:
These properties to define how is job doing:
  • job.info: key of property
  • jobName: the name of job.
  • groupName: the job group's name.
  • job: refer to a Object 'org.exoplatform.calendar.service.ReminderJob' that implement a schedule job.
  • repeatCount: the times to run this job. (='0': always run)
  • period: the time interval that job will run again.(millisecond)
These properties to define how to use an account of some smtp mail server to send mail
  • reminder.info: key for property.
  • Timezone: default time zone of mail server
  • Account: email account id
password: email password SSL: the option to use Secure Socket Layer(Security protocol for Internet communications) or not. (boolean value) Outgoing: SMTP Server's address. (ex: smtp.gmail.com) Port: SMTP Server's port.

 
Navigation

Creator: minhnguyen on 2008/07/08 10:56
Copyright (c) 2000-2009. Allright reserved - eXo platform SAS
1.6.13286