001
014
015 package com.liferay.portal.util;
016
017 import com.liferay.portal.kernel.security.pacl.DoPrivileged;
018 import com.liferay.portal.kernel.util.CalendarFactory;
019
020 import java.util.Calendar;
021 import java.util.GregorianCalendar;
022 import java.util.Locale;
023 import java.util.TimeZone;
024
025
028 @DoPrivileged
029 public class CalendarFactoryImpl implements CalendarFactory {
030
031 public Calendar getCalendar() {
032 return new GregorianCalendar();
033 }
034
035 public Calendar getCalendar(int year, int month, int date) {
036 return new GregorianCalendar(year, month, date);
037 }
038
039 public Calendar getCalendar(
040 int year, int month, int date, int hour, int minute) {
041
042 return new GregorianCalendar(year, month, date, hour, minute);
043 }
044
045 public Calendar getCalendar(
046 int year, int month, int date, int hour, int minute, int second) {
047
048 return new GregorianCalendar(year, month, date, hour, minute, second);
049 }
050
051 public Calendar getCalendar(Locale locale) {
052 return new GregorianCalendar(locale);
053 }
054
055 public Calendar getCalendar(TimeZone timeZone) {
056 return new GregorianCalendar(timeZone);
057 }
058
059 public Calendar getCalendar(TimeZone timeZone, Locale locale) {
060 return new GregorianCalendar(timeZone, locale);
061 }
062
063 }