Permalink
Browse files

LPS-28447 Source formatting

  • Loading branch information...
1 parent f9139a0 commit e3cc71e6731f41956213b9fb658368beadb9084f @brianchandotcom brianchandotcom committed Sep 5, 2012
View
22 .../calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/recurrence/Recurrence.java
@@ -24,15 +24,15 @@
public class Recurrence {
public void addExceptionDate(Calendar calendar) {
- _exceptionDates.add(calendar);
+ _exceptionJCalendars.add(calendar);
}
public int getCount() {
return _count;
}
- public List<Calendar> getExceptionDates() {
- return _exceptionDates;
+ public List<Calendar> getExceptionJCalendars() {
+ return _exceptionJCalendars;
}
public Frequency getFrequency() {
@@ -43,8 +43,8 @@ public int getInterval() {
return _interval;
}
- public Calendar getUntil() {
- return _until;
+ public Calendar getUntilJCalendar() {
+ return _untilJCalendar;
}
public List<Weekday> getWeekdays() {
@@ -55,8 +55,8 @@ public void setCount(int count) {
_count = count;
}
- public void setExceptionDates(List<Calendar> exceptionDates) {
- _exceptionDates = exceptionDates;
+ public void setExceptionJCalendars(List<Calendar> exceptionJCalendars) {
+ _exceptionJCalendars = exceptionJCalendars;
}
public void setFrequency(Frequency frequency) {
@@ -67,19 +67,19 @@ public void setInterval(int interval) {
_interval = interval;
}
- public void setUntil(Calendar until) {
- _until = until;
+ public void setUntilJCalendar(Calendar untilJCalendar) {
+ _untilJCalendar = untilJCalendar;
}
public void setWeekdays(List<Weekday> weekdays) {
_weekdays = weekdays;
}
private int _count;
- private List<Calendar> _exceptionDates = new ArrayList<Calendar>();
+ private List<Calendar> _exceptionJCalendars = new ArrayList<Calendar>();
private Frequency _frequency;
private int _interval;
- private Calendar _until;
+ private Calendar _untilJCalendar;
private List<Weekday> _weekdays;
}
View
17 ...portlet/docroot/WEB-INF/service/com/liferay/calendar/recurrence/RecurrenceSerializer.java
@@ -74,7 +74,7 @@ public static Recurrence deserialize(String data) {
if (dateValue != null) {
Calendar jCalendar = _toJCalendar(dateValue);
- recurrence.setUntil(jCalendar);
+ recurrence.setUntilJCalendar(jCalendar);
}
List<Weekday> weekdays = new ArrayList<Weekday>();
@@ -123,7 +123,7 @@ public static String serialize(Recurrence recurrence) {
rRule.setInterval(recurrence.getInterval());
- Calendar jCalendar = recurrence.getUntil();
+ Calendar jCalendar = recurrence.getUntilJCalendar();
if (jCalendar != null) {
DateValue dateValue = _toDateValue(jCalendar);
@@ -133,20 +133,21 @@ public static String serialize(Recurrence recurrence) {
String data = rRule.toIcal();
- List<Calendar> exceptionDates = recurrence.getExceptionDates();
+ List<Calendar> exceptionJCalendars =
+ recurrence.getExceptionJCalendars();
- if (!exceptionDates.isEmpty()) {
- DateValue[] dateValues = new DateValue[exceptionDates.size()];
+ if (!exceptionJCalendars.isEmpty()) {
+ DateValue[] dateValues = new DateValue[exceptionJCalendars.size()];
- for (int i = 0; i < exceptionDates.size(); i++) {
- dateValues[i] = _toDateValue(exceptionDates.get(i));
+ for (int i = 0; i < exceptionJCalendars.size(); i++) {
+ dateValues[i] = _toDateValue(exceptionJCalendars.get(i));
}
RDateList rDateList = new RDateList(
TimeZone.getTimeZone(StringPool.UTC));
- rDateList.setName(_EXDATE);
rDateList.setDatesUtc(dateValues);
+ rDateList.setName(_EXDATE);
data = data.concat(StringPool.NEW_LINE).concat(rDateList.toIcal());
}
View
2 ...ts/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/portlet/CalendarPortlet.java
@@ -457,7 +457,7 @@ protected String getRecurrence(ActionRequest actionRequest) {
untilJCalendar.set(java.util.Calendar.YEAR, untilDateYear);
}
- recurrence.setUntil(untilJCalendar);
+ recurrence.setUntilJCalendar(untilJCalendar);
List<Weekday> weekdays = new ArrayList<Weekday>();
View
4 ...ocroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarBookingLocalServiceImpl.java
@@ -216,7 +216,7 @@ public void deleteCalendarBookingInstance(
if (allFollowing) {
jCalendar.add(java.util.Calendar.DATE, -1);
- recurrenceObj.setUntil(jCalendar);
+ recurrenceObj.setUntilJCalendar(jCalendar);
}
else {
recurrenceObj.addExceptionDate(jCalendar);
@@ -570,6 +570,4 @@ protected void validate(
@BeanReference(type = CalendarBookingApprovalWorkflow.class)
protected CalendarBookingApprovalWorkflow calendarBookingApprovalWorkflow;
- private static final String _EXDATE = "EXDATE:";
-
}
View
15 ...lendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/util/CalendarICalDataHandler.java
@@ -204,9 +204,9 @@ protected void importICalEvent(long calendarId, VEvent vEvent)
if (!propertyList.isEmpty()) {
StringBundler sb = new StringBundler();
- for (Iterator<ExDate> iterator = propertyList.iterator();
- iterator.hasNext();) {
+ Iterator<ExDate> iterator = propertyList.iterator();
+ while (iterator.hasNext()) {
ExDate exDate = iterator.next();
DateList dateList = exDate.getDates();
@@ -683,19 +683,20 @@ protected VEvent toICalEvent(CalendarBooking calendarBooking)
}
protected ExDate toICalExDate(Recurrence recurrence) {
- List<java.util.Calendar> exceptionDates =
- recurrence.getExceptionDates();
+ List<java.util.Calendar> exceptionJCalendars =
+ recurrence.getExceptionJCalendars();
- if (exceptionDates.isEmpty()) {
+ if (exceptionJCalendars.isEmpty()) {
return null;
}
DateList dateList = new DateList();
dateList.setUtc(true);
- for (java.util.Calendar exceptionDate : exceptionDates) {
- DateTime dateTime = toICalDateTime(exceptionDate.getTimeInMillis());
+ for (java.util.Calendar exceptionJCalendar : exceptionJCalendars) {
+ DateTime dateTime = toICalDateTime(
+ exceptionJCalendar.getTimeInMillis());
dateList.add(dateTime);
}
View
2 portlets/calendar-portlet/docroot/calendar_booking_recurrence_container.jspf
@@ -30,7 +30,7 @@ if (recurrence != null) {
interval = recurrence.getInterval();
if (recurrence.getUntil() != null) {
- untilJCalendar = recurrence.getUntil();
+ untilJCalendar = recurrence.getUntilJCalendar();
}
weekdays = recurrence.getWeekdays();
View
1 portlets/calendar-portlet/docroot/js/components.js
@@ -1064,6 +1064,7 @@
confirmationPanel.onlyThisInstanceFn = onlyThisInstanceFn;
confirmationPanel.allFollowingFn = allFollowingFn;
confirmationPanel.allEventsInFn = allEventsInFn;
+
instance.confirmationPanel = confirmationPanel;
}

0 comments on commit e3cc71e

Please sign in to comment.