com.silverpeas.export.ical.ical4j
Class ICal4JDateCodec

java.lang.Object
  extended by com.silverpeas.export.ical.ical4j.ICal4JDateCodec

public class ICal4JDateCodec
extends Object

A decoder/encoder of iCal4J dates with Silverpeas dates.


Constructor Summary
ICal4JDateCodec()
           
 
Method Summary
static ICal4JDateCodec anICal4JDateCodec()
          Gets an instance of the ICal4JDateCodec class.
 net.fortuna.ical4j.model.Date encode(Datable<?> aDate)
          Encodes a Silverpeas date into an iCal4J date.
 net.fortuna.ical4j.model.Date encode(Datable<?> aDate, boolean inUTC)
          Encodes the specified Silverpeas date into an iCal4J date set or not in UTC according to the specified UTC flag.
 net.fortuna.ical4j.model.Date encodeInUTC(Datable<?> aDate)
          Encodes the specified Silverpeas date into an iCal4J date set in UTC.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICal4JDateCodec

public ICal4JDateCodec()
Method Detail

anICal4JDateCodec

public static ICal4JDateCodec anICal4JDateCodec()
Gets an instance of the ICal4JDateCodec class.

Returns:
an ICal4JDateCodec instance.

encode

public net.fortuna.ical4j.model.Date encode(Datable<?> aDate)
                                     throws EncodingException
Encodes a Silverpeas date into an iCal4J date.

Parameters:
aDate - the date to encode.
Returns:
an iCal4J date.
Throws:
EncodingException - if the encoding fails.

encodeInUTC

public net.fortuna.ical4j.model.Date encodeInUTC(Datable<?> aDate)
                                          throws EncodingException
Encodes the specified Silverpeas date into an iCal4J date set in UTC.

Parameters:
aDate - the date to encode.
Returns:
an iCal4J date.
Throws:
EncodingException - if the encoding fails.

encode

public net.fortuna.ical4j.model.Date encode(Datable<?> aDate,
                                            boolean inUTC)
                                     throws EncodingException
Encodes the specified Silverpeas date into an iCal4J date set or not in UTC according to the specified UTC flag. If the UTC flag is positioned at false, then the encoded date is set in the same timezone than the specified date to encode.

Parameters:
aDate - the date to encode.
inUTC - the UTC flag indicating whether the iCal4J date must be set in UTC. If false, the encoded date will be in the same timezone than the specified date.
Returns:
an iCal4J date.
Throws:
EncodingException - if the encoding fails.


Copyright © 2016 Silverpeas. All Rights Reserved.