Class RFC5545Util
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.calendar.RFC5545Util
-
public final class RFC5545Util extends Object
-
-
Constructor Summary
Constructors Constructor Description RFC5545Util()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequence
encodeText(Object p_value)
Encode text according to RFC 5545, 3.3.11.CharSequence
encodeText(Object p_firstLineOffset, Object p_value)
Encode text according to RFC 5545, 3.3.11.CharSequence
encodeTextNotNull(Object p_value)
Encode text according to RFC 5545, 3.3.11.CharSequence
encodeTextNotNull(Object p_firstLineOffset, Object p_value)
Encode text according to RFC 5545, 3.3.11.CharSequence
foldContentLine(Object p_value)
Fold the given content line according to RFC 5545, 3.1.CharSequence
foldContentLine(Object p_firstLineOffset, Object p_value)
Fold the given content line according to RFC 5545, 3.1.CharSequence
foldContentLineNotNull(Object p_value)
Fold the given content line according to RFC 5545, 3.1.CharSequence
foldContentLineNotNull(Object p_firstLineOffset, Object p_value)
Fold the given content line according to RFC 5545, 3.1.String
formatDateTimeLocal(Object p_date, TimeZone p_tz)
The format the given value, according to RFC 5545,FORM #1: DATE WITH LOCAL TIME
.String
formatDateTimeLocalWithTimeZoneReference(Object p_date, TimeZone p_tz)
The format the given value, according to RFC 5545,FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE
.String
formatDateTimeUTC(Object p_date)
The format the given value, according to RFC 5545,FORM #2: DATE WITH UTC TIME
.String
getProdId()
The product identifierPRODID
, according to RFC 5545, 3.7.3.String
quotePropertyParameterValue(Object p_value)
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.String
quotePropertyParameterValueNotNull(Object p_value)
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.
-
-
-
Method Detail
-
getProdId
public String getProdId()
The product identifierPRODID
, according to RFC 5545, 3.7.3.- Returns:
- The product identifier.
-
foldContentLine
public CharSequence foldContentLine(Object p_firstLineOffset, Object p_value)
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_firstLineOffset
- The first line offset, either an integer, or a character sequence from which the length is taken.p_value
- The content line. If this isnull
, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The folded content line.
-
foldContentLineNotNull
public CharSequence foldContentLineNotNull(Object p_firstLineOffset, Object p_value)
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_firstLineOffset
- The first line offset, either an integer, or a character sequence from which the length is taken.p_value
- The content line. If this isnull
, or a value holder that does not contain a value, anIllegalArgumentException
is thrown.- Returns:
- The folded content line.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
foldContentLine
public CharSequence foldContentLine(Object p_value)
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_value
- The content line. If this isnull
, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The folded content line.
-
foldContentLineNotNull
public CharSequence foldContentLineNotNull(Object p_value)
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_value
- The content line. If this isnull
, or a value holder that does not contain a value, anIllegalArgumentException
is thrown.- Returns:
- The folded content line.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
encodeText
public CharSequence encodeText(Object p_firstLineOffset, Object p_value)
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_firstLineOffset
- The first line offset, either an integer, or a character sequence from which the length is taken.p_value
- The text. If this isnull
, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The encoded text.
-
encodeTextNotNull
public CharSequence encodeTextNotNull(Object p_firstLineOffset, Object p_value)
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_firstLineOffset
- The first line offset, either an integer, or a character sequence from which the length is taken.p_value
- The text. If this isnull
, or a value holder that does not contain a value, anIllegalArgumentException
is thrown.- Returns:
- The encoded text.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
encodeText
public CharSequence encodeText(Object p_value)
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_value
- The text. If this isnull
, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The encoded text.
-
encodeTextNotNull
public CharSequence encodeTextNotNull(Object p_value)
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_value
- The text. If this isnull
, or a value holder that does not contain a value, anIllegalArgumentException
is thrown.- Returns:
- The encoded text.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
quotePropertyParameterValue
public String quotePropertyParameterValue(Object p_value)
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.- Parameters:
p_value
- The property parameter value. If this isnull
, or a value holder that does not contain a value, the value is assumed to be empty and no exception is thrown.- Returns:
- The optionally quoted property parameter value.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
quotePropertyParameterValueNotNull
public String quotePropertyParameterValueNotNull(Object p_value)
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.- Parameters:
p_value
- The property parameter value. If this isnull
, or a value holder that does not contain a value, anIllegalArgumentException
is thrown.- Returns:
- The optionally quoted property parameter value.
- Throws:
IllegalArgumentException
- Ifp_value
isnull
, or a value holder that does not contain a value.
-
formatDateTimeLocal
public String formatDateTimeLocal(Object p_date, TimeZone p_tz)
The format the given value, according to RFC 5545,FORM #1: DATE WITH LOCAL TIME
.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date
- An object that references a date.p_tz
- The local time zone.- Returns:
- The product identifier.
-
formatDateTimeLocalWithTimeZoneReference
public String formatDateTimeLocalWithTimeZoneReference(Object p_date, TimeZone p_tz)
The format the given value, according to RFC 5545,FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE
.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date
- An object that references a date.p_tz
- The local time zone.- Returns:
- The product identifier.
-
formatDateTimeUTC
public String formatDateTimeUTC(Object p_date)
The format the given value, according to RFC 5545,FORM #2: DATE WITH UTC TIME
.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date
- An object that references a date.- Returns:
- The product identifier.
-
-