Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

LPS-44831 Regenerate #2818

Closed
wants to merge 5 commits into from

3 participants

This page is out of date. Refresh to see the latest.
Showing with 681 additions and 204 deletions.
  1. BIN  portlets/calendar-portlet/docroot/WEB-INF/lib/calendar-portlet-service.jar
  2. +5 −0 ...lets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalService.java
  3. +96 −56 ...s/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceClp.java
  4. +7 −0 .../calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceUtil.java
  5. +8 −0 ...lendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceWrapper.java
  6. +24 −0 portlets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingService.java
  7. +170 −0 portlets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceClp.java
  8. +37 −0 portlets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceUtil.java
  9. +37 −0 ...ts/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceWrapper.java
  10. +64 −52 ...ar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/base/CalendarBookingLocalServiceClpInvoker.java
  11. +62 −0 ...alendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/base/CalendarBookingServiceClpInvoker.java
  12. +66 −0 ...lets/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/http/CalendarBookingServiceSoap.java
  13. +28 −29 ...calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarBookingLocalServiceImpl.java
  14. +49 −0 ...lets/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarBookingServiceImpl.java
  15. +28 −67 portlets/calendar-portlet/docroot/js/javascript.js
View
BIN  portlets/calendar-portlet/docroot/WEB-INF/lib/calendar-portlet-service.jar
Binary file not shown
View
5 ...s/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalService.java
@@ -388,6 +388,11 @@ public int getCalendarBookingsCount(long calendarId,
long parentCalendarBookingId, int status)
throws com.liferay.portal.kernel.exception.SystemException;
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public long[] getChildCalendarIds(long calendarBookingId, long calendarId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException;
+
public com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
long userId, com.liferay.calendar.model.CalendarBooking calendarBooking)
throws com.liferay.portal.kernel.exception.PortalException,
View
152 ...alendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceClp.java
@@ -199,62 +199,66 @@ public CalendarBookingLocalServiceClp(
_methodParameterTypes37 = new String[] { "long", "int" };
- _methodName38 = "moveCalendarBookingToTrash";
+ _methodName38 = "getChildCalendarIds";
- _methodParameterTypes38 = new String[] {
- "long", "com.liferay.calendar.model.CalendarBooking"
- };
+ _methodParameterTypes38 = new String[] { "long", "long" };
_methodName39 = "moveCalendarBookingToTrash";
- _methodParameterTypes39 = new String[] { "long", "long" };
+ _methodParameterTypes39 = new String[] {
+ "long", "com.liferay.calendar.model.CalendarBooking"
+ };
- _methodName40 = "restoreCalendarBookingFromTrash";
+ _methodName40 = "moveCalendarBookingToTrash";
_methodParameterTypes40 = new String[] { "long", "long" };
- _methodName41 = "search";
+ _methodName41 = "restoreCalendarBookingFromTrash";
- _methodParameterTypes41 = new String[] {
+ _methodParameterTypes41 = new String[] { "long", "long" };
+
+ _methodName42 = "search";
+
+ _methodParameterTypes42 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "long", "long", "boolean", "int[][]", "int",
"int", "com.liferay.portal.kernel.util.OrderByComparator"
};
- _methodName42 = "search";
+ _methodName43 = "search";
- _methodParameterTypes42 = new String[] {
+ _methodParameterTypes43 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"long", "long", "boolean", "int[][]", "boolean", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator"
};
- _methodName43 = "searchCount";
+ _methodName44 = "searchCount";
- _methodParameterTypes43 = new String[] {
+ _methodParameterTypes44 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "long", "long", "int[][]"
};
- _methodName44 = "searchCount";
+ _methodName45 = "searchCount";
- _methodParameterTypes44 = new String[] {
+ _methodParameterTypes45 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"long", "long", "int[][]", "boolean"
};
- _methodName45 = "updateAsset";
+ _methodName46 = "updateAsset";
- _methodParameterTypes45 = new String[] {
+ _methodParameterTypes46 = new String[] {
"long", "com.liferay.calendar.model.CalendarBooking", "long[][]",
"java.lang.String[][]", "long[][]"
};
- _methodName46 = "updateCalendarBooking";
+ _methodName47 = "updateCalendarBooking";
- _methodParameterTypes46 = new String[] {
+ _methodParameterTypes47 = new String[] {
"long", "long", "long", "long[][]", "java.util.Map",
"java.util.Map", "java.lang.String", "long", "long", "boolean",
"java.lang.String", "long", "java.lang.String", "long",
@@ -262,9 +266,9 @@ public CalendarBookingLocalServiceClp(
"com.liferay.portal.service.ServiceContext"
};
- _methodName47 = "updateCalendarBooking";
+ _methodName48 = "updateCalendarBooking";
- _methodParameterTypes47 = new String[] {
+ _methodParameterTypes48 = new String[] {
"long", "long", "long", "java.util.Map", "java.util.Map",
"java.lang.String", "long", "long", "boolean",
"java.lang.String", "long", "java.lang.String", "long",
@@ -272,9 +276,9 @@ public CalendarBookingLocalServiceClp(
"com.liferay.portal.service.ServiceContext"
};
- _methodName48 = "updateCalendarBookingInstance";
+ _methodName49 = "updateCalendarBookingInstance";
- _methodParameterTypes48 = new String[] {
+ _methodParameterTypes49 = new String[] {
"long", "long", "long", "long[][]", "java.util.Map",
"java.util.Map", "java.lang.String", "long", "long", "boolean",
"java.lang.String", "boolean", "long", "java.lang.String",
@@ -282,9 +286,9 @@ public CalendarBookingLocalServiceClp(
"com.liferay.portal.service.ServiceContext"
};
- _methodName49 = "updateCalendarBookingInstance";
+ _methodName50 = "updateCalendarBookingInstance";
- _methodParameterTypes49 = new String[] {
+ _methodParameterTypes50 = new String[] {
"long", "long", "long", "java.util.Map", "java.util.Map",
"java.lang.String", "long", "long", "boolean",
"java.lang.String", "boolean", "long", "java.lang.String",
@@ -292,16 +296,16 @@ public CalendarBookingLocalServiceClp(
"com.liferay.portal.service.ServiceContext"
};
- _methodName50 = "updateStatus";
+ _methodName51 = "updateStatus";
- _methodParameterTypes50 = new String[] {
+ _methodParameterTypes51 = new String[] {
"long", "com.liferay.calendar.model.CalendarBooking", "int",
"com.liferay.portal.service.ServiceContext"
};
- _methodName51 = "updateStatus";
+ _methodName52 = "updateStatus";
- _methodParameterTypes51 = new String[] {
+ _methodParameterTypes52 = new String[] {
"long", "long", "int",
"com.liferay.portal.service.ServiceContext"
};
@@ -1505,8 +1509,7 @@ public int getCalendarBookingsCount(long calendarId,
}
@Override
- public com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
- long userId, com.liferay.calendar.model.CalendarBooking calendarBooking)
+ public long[] getChildCalendarIds(long calendarBookingId, long calendarId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null;
@@ -1514,6 +1517,41 @@ public int getCalendarBookingsCount(long calendarId,
try {
returnObj = _invokableLocalService.invokeMethod(_methodName38,
_methodParameterTypes38,
+ new Object[] { calendarBookingId, calendarId });
+ }
+ catch (Throwable t) {
+ t = ClpSerializer.translateThrowable(t);
+
+ if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
+ throw (com.liferay.portal.kernel.exception.PortalException)t;
+ }
+
+ if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
+ throw (com.liferay.portal.kernel.exception.SystemException)t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException)t;
+ }
+ else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (long[])ClpSerializer.translateOutput(returnObj);
+ }
+
+ @Override
+ public com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
+ long userId, com.liferay.calendar.model.CalendarBooking calendarBooking)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ Object returnObj = null;
+
+ try {
+ returnObj = _invokableLocalService.invokeMethod(_methodName39,
+ _methodParameterTypes39,
new Object[] {
userId,
@@ -1551,8 +1589,8 @@ public int getCalendarBookingsCount(long calendarId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName39,
- _methodParameterTypes39,
+ returnObj = _invokableLocalService.invokeMethod(_methodName40,
+ _methodParameterTypes40,
new Object[] { userId, calendarBookingId });
}
catch (Throwable t) {
@@ -1586,8 +1624,8 @@ public int getCalendarBookingsCount(long calendarId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName40,
- _methodParameterTypes40,
+ returnObj = _invokableLocalService.invokeMethod(_methodName41,
+ _methodParameterTypes41,
new Object[] { userId, calendarBookingId });
}
catch (Throwable t) {
@@ -1624,8 +1662,8 @@ public int getCalendarBookingsCount(long calendarId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName41,
- _methodParameterTypes41,
+ returnObj = _invokableLocalService.invokeMethod(_methodName42,
+ _methodParameterTypes42,
new Object[] {
companyId,
@@ -1686,8 +1724,8 @@ public int getCalendarBookingsCount(long calendarId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName42,
- _methodParameterTypes42,
+ returnObj = _invokableLocalService.invokeMethod(_methodName43,
+ _methodParameterTypes43,
new Object[] {
companyId,
@@ -1749,8 +1787,8 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName43,
- _methodParameterTypes43,
+ returnObj = _invokableLocalService.invokeMethod(_methodName44,
+ _methodParameterTypes44,
new Object[] {
companyId,
@@ -1800,8 +1838,8 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName44,
- _methodParameterTypes44,
+ returnObj = _invokableLocalService.invokeMethod(_methodName45,
+ _methodParameterTypes45,
new Object[] {
companyId,
@@ -1855,8 +1893,8 @@ public void updateAsset(long userId,
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
try {
- _invokableLocalService.invokeMethod(_methodName45,
- _methodParameterTypes45,
+ _invokableLocalService.invokeMethod(_methodName46,
+ _methodParameterTypes46,
new Object[] {
userId,
@@ -1906,8 +1944,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName46,
- _methodParameterTypes46,
+ returnObj = _invokableLocalService.invokeMethod(_methodName47,
+ _methodParameterTypes47,
new Object[] {
userId,
@@ -1982,8 +2020,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName47,
- _methodParameterTypes47,
+ returnObj = _invokableLocalService.invokeMethod(_methodName48,
+ _methodParameterTypes48,
new Object[] {
userId,
@@ -2057,8 +2095,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName48,
- _methodParameterTypes48,
+ returnObj = _invokableLocalService.invokeMethod(_methodName49,
+ _methodParameterTypes49,
new Object[] {
userId,
@@ -2135,8 +2173,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName49,
- _methodParameterTypes49,
+ returnObj = _invokableLocalService.invokeMethod(_methodName50,
+ _methodParameterTypes50,
new Object[] {
userId,
@@ -2206,8 +2244,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName50,
- _methodParameterTypes50,
+ returnObj = _invokableLocalService.invokeMethod(_methodName51,
+ _methodParameterTypes51,
new Object[] {
userId,
@@ -2250,8 +2288,8 @@ public void updateAsset(long userId,
Object returnObj = null;
try {
- returnObj = _invokableLocalService.invokeMethod(_methodName51,
- _methodParameterTypes51,
+ returnObj = _invokableLocalService.invokeMethod(_methodName52,
+ _methodParameterTypes52,
new Object[] {
userId,
@@ -2388,4 +2426,6 @@ public void updateAsset(long userId,
private String[] _methodParameterTypes50;
private String _methodName51;
private String[] _methodParameterTypes51;
+ private String _methodName52;
+ private String[] _methodParameterTypes52;
}
View
7 ...lendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceUtil.java
@@ -454,6 +454,13 @@ public static int getCalendarBookingsCount(long calendarId,
.getChildCalendarBookings(parentCalendarBookingId, status);
}
+ public static long[] getChildCalendarIds(long calendarBookingId,
+ long calendarId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return getService().getChildCalendarIds(calendarBookingId, calendarId);
+ }
+
public static com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
long userId, com.liferay.calendar.model.CalendarBooking calendarBooking)
throws com.liferay.portal.kernel.exception.PortalException,
View
8 ...dar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingLocalServiceWrapper.java
@@ -490,6 +490,14 @@ public int getCalendarBookingsCount(long calendarId,
}
@Override
+ public long[] getChildCalendarIds(long calendarBookingId, long calendarId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _calendarBookingLocalService.getChildCalendarIds(calendarBookingId,
+ calendarId);
+ }
+
+ @Override
public com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
long userId, com.liferay.calendar.model.CalendarBooking calendarBooking)
throws com.liferay.portal.kernel.exception.PortalException,
View
24 portlets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingService.java
@@ -252,4 +252,28 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
+
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException;
+
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException;
}
View
170 ...ets/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceClp.java
@@ -181,6 +181,26 @@ public CalendarBookingServiceClp(InvokableService invokableService) {
"long", "java.lang.String", "int",
"com.liferay.portal.service.ServiceContext"
};
+
+ _methodName28 = "updateCalendarBookingOffsetAndDuration";
+
+ _methodParameterTypes28 = new String[] {
+ "long", "long", "long[][]", "java.util.Map", "java.util.Map",
+ "java.lang.String", "long", "long", "boolean",
+ "java.lang.String", "long", "java.lang.String", "long",
+ "java.lang.String", "int",
+ "com.liferay.portal.service.ServiceContext"
+ };
+
+ _methodName29 = "updateCalendarBookingOffsetAndDuration";
+
+ _methodParameterTypes29 = new String[] {
+ "long", "long", "java.util.Map", "java.util.Map",
+ "java.lang.String", "long", "long", "boolean",
+ "java.lang.String", "long", "java.lang.String", "long",
+ "java.lang.String", "int",
+ "com.liferay.portal.service.ServiceContext"
+ };
}
@Override
@@ -1428,6 +1448,152 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
return (com.liferay.calendar.model.CalendarBooking)ClpSerializer.translateOutput(returnObj);
}
+ @Override
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ Object returnObj = null;
+
+ try {
+ returnObj = _invokableService.invokeMethod(_methodName28,
+ _methodParameterTypes28,
+ new Object[] {
+ calendarBookingId,
+
+ calendarId,
+
+ ClpSerializer.translateInput(childCalendarIds),
+
+ ClpSerializer.translateInput(titleMap),
+
+ ClpSerializer.translateInput(descriptionMap),
+
+ ClpSerializer.translateInput(location),
+
+ offset,
+
+ duration,
+
+ allDay,
+
+ ClpSerializer.translateInput(recurrence),
+
+ firstReminder,
+
+ ClpSerializer.translateInput(firstReminderType),
+
+ secondReminder,
+
+ ClpSerializer.translateInput(secondReminderType),
+
+ status,
+
+ ClpSerializer.translateInput(serviceContext)
+ });
+ }
+ catch (Throwable t) {
+ t = ClpSerializer.translateThrowable(t);
+
+ if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
+ throw (com.liferay.portal.kernel.exception.PortalException)t;
+ }
+
+ if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
+ throw (com.liferay.portal.kernel.exception.SystemException)t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException)t;
+ }
+ else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.liferay.calendar.model.CalendarBooking)ClpSerializer.translateOutput(returnObj);
+ }
+
+ @Override
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ Object returnObj = null;
+
+ try {
+ returnObj = _invokableService.invokeMethod(_methodName29,
+ _methodParameterTypes29,
+ new Object[] {
+ calendarBookingId,
+
+ calendarId,
+
+ ClpSerializer.translateInput(titleMap),
+
+ ClpSerializer.translateInput(descriptionMap),
+
+ ClpSerializer.translateInput(location),
+
+ offset,
+
+ duration,
+
+ allDay,
+
+ ClpSerializer.translateInput(recurrence),
+
+ firstReminder,
+
+ ClpSerializer.translateInput(firstReminderType),
+
+ secondReminder,
+
+ ClpSerializer.translateInput(secondReminderType),
+
+ status,
+
+ ClpSerializer.translateInput(serviceContext)
+ });
+ }
+ catch (Throwable t) {
+ t = ClpSerializer.translateThrowable(t);
+
+ if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
+ throw (com.liferay.portal.kernel.exception.PortalException)t;
+ }
+
+ if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
+ throw (com.liferay.portal.kernel.exception.SystemException)t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException)t;
+ }
+ else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.liferay.calendar.model.CalendarBooking)ClpSerializer.translateOutput(returnObj);
+ }
+
private InvokableService _invokableService;
private String _methodName0;
private String[] _methodParameterTypes0;
@@ -1483,4 +1649,8 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
private String[] _methodParameterTypes26;
private String _methodName27;
private String[] _methodParameterTypes27;
+ private String _methodName28;
+ private String[] _methodParameterTypes28;
+ private String _methodName29;
+ private String[] _methodParameterTypes29;
}
View
37 ...ts/calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceUtil.java
@@ -333,6 +333,43 @@ public static int searchCount(long companyId, long[] groupIds,
secondReminder, secondReminderType, status, serviceContext);
}
+ public static com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return getService()
+ .updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, childCalendarIds, titleMap, descriptionMap, location,
+ offset, duration, allDay, recurrence, firstReminder,
+ firstReminderType, secondReminder, secondReminderType, status,
+ serviceContext);
+ }
+
+ public static com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return getService()
+ .updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, titleMap, descriptionMap, location, offset, duration,
+ allDay, recurrence, firstReminder, firstReminderType,
+ secondReminder, secondReminderType, status, serviceContext);
+ }
+
public static void clearService() {
_service = null;
}
View
37 ...calendar-portlet/docroot/WEB-INF/service/com/liferay/calendar/service/CalendarBookingServiceWrapper.java
@@ -344,6 +344,43 @@ public int searchCount(long companyId, long[] groupIds, long[] calendarIds,
secondReminder, secondReminderType, status, serviceContext);
}
+ @Override
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _calendarBookingService.updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, childCalendarIds, titleMap, descriptionMap, location,
+ offset, duration, allDay, recurrence, firstReminder,
+ firstReminderType, secondReminder, secondReminderType, status,
+ serviceContext);
+ }
+
+ @Override
+ public com.liferay.calendar.model.CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ java.util.Map<java.util.Locale, java.lang.String> titleMap,
+ java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
+ java.lang.String location, long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _calendarBookingService.updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, titleMap, descriptionMap, location, offset, duration,
+ allDay, recurrence, firstReminder, firstReminderType,
+ secondReminder, secondReminderType, status, serviceContext);
+ }
+
/**
* @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
*/
View
116 ...portlet/docroot/WEB-INF/src/com/liferay/calendar/service/base/CalendarBookingLocalServiceClpInvoker.java
@@ -211,62 +211,66 @@ public CalendarBookingLocalServiceClpInvoker() {
_methodParameterTypes141 = new String[] { "long", "int" };
- _methodName142 = "moveCalendarBookingToTrash";
+ _methodName142 = "getChildCalendarIds";
- _methodParameterTypes142 = new String[] {
- "long", "com.liferay.calendar.model.CalendarBooking"
- };
+ _methodParameterTypes142 = new String[] { "long", "long" };
_methodName143 = "moveCalendarBookingToTrash";
- _methodParameterTypes143 = new String[] { "long", "long" };
+ _methodParameterTypes143 = new String[] {
+ "long", "com.liferay.calendar.model.CalendarBooking"
+ };
- _methodName144 = "restoreCalendarBookingFromTrash";
+ _methodName144 = "moveCalendarBookingToTrash";
_methodParameterTypes144 = new String[] { "long", "long" };
- _methodName145 = "search";
+ _methodName145 = "restoreCalendarBookingFromTrash";
+
+ _methodParameterTypes145 = new String[] { "long", "long" };
- _methodParameterTypes145 = new String[] {
+ _methodName146 = "search";
+
+ _methodParameterTypes146 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "long", "long", "boolean", "int[][]", "int",
"int", "com.liferay.portal.kernel.util.OrderByComparator"
};
- _methodName146 = "search";
+ _methodName147 = "search";
- _methodParameterTypes146 = new String[] {
+ _methodParameterTypes147 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"long", "long", "boolean", "int[][]", "boolean", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator"
};
- _methodName147 = "searchCount";
+ _methodName148 = "searchCount";
- _methodParameterTypes147 = new String[] {
+ _methodParameterTypes148 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "long", "long", "int[][]"
};
- _methodName148 = "searchCount";
+ _methodName149 = "searchCount";
- _methodParameterTypes148 = new String[] {
+ _methodParameterTypes149 = new String[] {
"long", "long[][]", "long[][]", "long[][]", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"long", "long", "int[][]", "boolean"
};
- _methodName149 = "updateAsset";
+ _methodName150 = "updateAsset";
- _methodParameterTypes149 = new String[] {
+ _methodParameterTypes150 = new String[] {
"long", "com.liferay.calendar.model.CalendarBooking", "long[][]",
"java.lang.String[][]", "long[][]"
};
- _methodName150 = "updateCalendarBooking";
+ _methodName151 = "updateCalendarBooking";
- _methodParameterTypes150 = new String[] {
+ _methodParameterTypes151 = new String[] {
"long", "long", "long", "long[][]", "java.util.Map",
"java.util.Map", "java.lang.String", "long", "long", "boolean",
"java.lang.String", "long", "java.lang.String", "long",
@@ -274,9 +278,9 @@ public CalendarBookingLocalServiceClpInvoker() {
"com.liferay.portal.service.ServiceContext"
};
- _methodName151 = "updateCalendarBooking";
+ _methodName152 = "updateCalendarBooking";
- _methodParameterTypes151 = new String[] {
+ _methodParameterTypes152 = new String[] {
"long", "long", "long", "java.util.Map", "java.util.Map",
"java.lang.String", "long", "long", "boolean",
"java.lang.String", "long", "java.lang.String", "long",
@@ -284,9 +288,9 @@ public CalendarBookingLocalServiceClpInvoker() {
"com.liferay.portal.service.ServiceContext"
};
- _methodName152 = "updateCalendarBookingInstance";
+ _methodName153 = "updateCalendarBookingInstance";
- _methodParameterTypes152 = new String[] {
+ _methodParameterTypes153 = new String[] {
"long", "long", "long", "long[][]", "java.util.Map",
"java.util.Map", "java.lang.String", "long", "long", "boolean",
"java.lang.String", "boolean", "long", "java.lang.String",
@@ -294,9 +298,9 @@ public CalendarBookingLocalServiceClpInvoker() {
"com.liferay.portal.service.ServiceContext"
};
- _methodName153 = "updateCalendarBookingInstance";
+ _methodName154 = "updateCalendarBookingInstance";
- _methodParameterTypes153 = new String[] {
+ _methodParameterTypes154 = new String[] {
"long", "long", "long", "java.util.Map", "java.util.Map",
"java.lang.String", "long", "long", "boolean",
"java.lang.String", "boolean", "long", "java.lang.String",
@@ -304,16 +308,16 @@ public CalendarBookingLocalServiceClpInvoker() {
"com.liferay.portal.service.ServiceContext"
};
- _methodName154 = "updateStatus";
+ _methodName155 = "updateStatus";
- _methodParameterTypes154 = new String[] {
+ _methodParameterTypes155 = new String[] {
"long", "com.liferay.calendar.model.CalendarBooking", "int",
"com.liferay.portal.service.ServiceContext"
};
- _methodName155 = "updateStatus";
+ _methodName156 = "updateStatus";
- _methodParameterTypes155 = new String[] {
+ _methodParameterTypes156 = new String[] {
"long", "long", "int",
"com.liferay.portal.service.ServiceContext"
};
@@ -573,24 +577,30 @@ public Object invokeMethod(String name, String[] parameterTypes,
if (_methodName142.equals(name) &&
Arrays.deepEquals(_methodParameterTypes142, parameterTypes)) {
- return CalendarBookingLocalServiceUtil.moveCalendarBookingToTrash(((Long)arguments[0]).longValue(),
- (com.liferay.calendar.model.CalendarBooking)arguments[1]);
+ return CalendarBookingLocalServiceUtil.getChildCalendarIds(((Long)arguments[0]).longValue(),
+ ((Long)arguments[1]).longValue());
}
if (_methodName143.equals(name) &&
Arrays.deepEquals(_methodParameterTypes143, parameterTypes)) {
return CalendarBookingLocalServiceUtil.moveCalendarBookingToTrash(((Long)arguments[0]).longValue(),
- ((Long)arguments[1]).longValue());
+ (com.liferay.calendar.model.CalendarBooking)arguments[1]);
}
if (_methodName144.equals(name) &&
Arrays.deepEquals(_methodParameterTypes144, parameterTypes)) {
- return CalendarBookingLocalServiceUtil.restoreCalendarBookingFromTrash(((Long)arguments[0]).longValue(),
+ return CalendarBookingLocalServiceUtil.moveCalendarBookingToTrash(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue());
}
if (_methodName145.equals(name) &&
Arrays.deepEquals(_methodParameterTypes145, parameterTypes)) {
+ return CalendarBookingLocalServiceUtil.restoreCalendarBookingFromTrash(((Long)arguments[0]).longValue(),
+ ((Long)arguments[1]).longValue());
+ }
+
+ if (_methodName146.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes146, parameterTypes)) {
return CalendarBookingLocalServiceUtil.search(((Long)arguments[0]).longValue(),
(long[])arguments[1], (long[])arguments[2],
(long[])arguments[3], ((Long)arguments[4]).longValue(),
@@ -603,8 +613,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.kernel.util.OrderByComparator)arguments[12]);
}
- if (_methodName146.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes146, parameterTypes)) {
+ if (_methodName147.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes147, parameterTypes)) {
return CalendarBookingLocalServiceUtil.search(((Long)arguments[0]).longValue(),
(long[])arguments[1], (long[])arguments[2],
(long[])arguments[3], ((Long)arguments[4]).longValue(),
@@ -619,8 +629,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.kernel.util.OrderByComparator)arguments[15]);
}
- if (_methodName147.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes147, parameterTypes)) {
+ if (_methodName148.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes148, parameterTypes)) {
return CalendarBookingLocalServiceUtil.searchCount(((Long)arguments[0]).longValue(),
(long[])arguments[1], (long[])arguments[2],
(long[])arguments[3], ((Long)arguments[4]).longValue(),
@@ -629,8 +639,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
((Long)arguments[7]).longValue(), (int[])arguments[8]);
}
- if (_methodName148.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes148, parameterTypes)) {
+ if (_methodName149.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes149, parameterTypes)) {
return CalendarBookingLocalServiceUtil.searchCount(((Long)arguments[0]).longValue(),
(long[])arguments[1], (long[])arguments[2],
(long[])arguments[3], ((Long)arguments[4]).longValue(),
@@ -641,8 +651,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
((Boolean)arguments[11]).booleanValue());
}
- if (_methodName149.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes149, parameterTypes)) {
+ if (_methodName150.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes150, parameterTypes)) {
CalendarBookingLocalServiceUtil.updateAsset(((Long)arguments[0]).longValue(),
(com.liferay.calendar.model.CalendarBooking)arguments[1],
(long[])arguments[2], (java.lang.String[])arguments[3],
@@ -651,8 +661,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
return null;
}
- if (_methodName150.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes150, parameterTypes)) {
+ if (_methodName151.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes151, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateCalendarBooking(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue(), (long[])arguments[3],
@@ -671,8 +681,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.service.ServiceContext)arguments[16]);
}
- if (_methodName151.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes151, parameterTypes)) {
+ if (_methodName152.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes152, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateCalendarBooking(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue(),
@@ -691,8 +701,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.service.ServiceContext)arguments[15]);
}
- if (_methodName152.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes152, parameterTypes)) {
+ if (_methodName153.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes153, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateCalendarBookingInstance(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue(), (long[])arguments[3],
@@ -712,8 +722,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.service.ServiceContext)arguments[17]);
}
- if (_methodName153.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes153, parameterTypes)) {
+ if (_methodName154.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes154, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateCalendarBookingInstance(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue(),
@@ -733,16 +743,16 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.service.ServiceContext)arguments[16]);
}
- if (_methodName154.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes154, parameterTypes)) {
+ if (_methodName155.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes155, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(),
(com.liferay.calendar.model.CalendarBooking)arguments[1],
((Integer)arguments[2]).intValue(),
(com.liferay.portal.service.ServiceContext)arguments[3]);
}
- if (_methodName155.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes155, parameterTypes)) {
+ if (_methodName156.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes156, parameterTypes)) {
return CalendarBookingLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Integer)arguments[2]).intValue(),
@@ -860,4 +870,6 @@ public Object invokeMethod(String name, String[] parameterTypes,
private String[] _methodParameterTypes154;
private String _methodName155;
private String[] _methodParameterTypes155;
+ private String _methodName156;
+ private String[] _methodParameterTypes156;
}
View
62 ...ndar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/base/CalendarBookingServiceClpInvoker.java
@@ -181,6 +181,26 @@ public CalendarBookingServiceClpInvoker() {
"long", "java.lang.String", "int",
"com.liferay.portal.service.ServiceContext"
};
+
+ _methodName129 = "updateCalendarBookingOffsetAndDuration";
+
+ _methodParameterTypes129 = new String[] {
+ "long", "long", "long[][]", "java.util.Map", "java.util.Map",
+ "java.lang.String", "long", "long", "boolean",
+ "java.lang.String", "long", "java.lang.String", "long",
+ "java.lang.String", "int",
+ "com.liferay.portal.service.ServiceContext"
+ };
+
+ _methodName130 = "updateCalendarBookingOffsetAndDuration";
+
+ _methodParameterTypes130 = new String[] {
+ "long", "long", "java.util.Map", "java.util.Map",
+ "java.lang.String", "long", "long", "boolean",
+ "java.lang.String", "long", "java.lang.String", "long",
+ "java.lang.String", "int",
+ "com.liferay.portal.service.ServiceContext"
+ };
}
public Object invokeMethod(String name, String[] parameterTypes,
@@ -452,6 +472,44 @@ public Object invokeMethod(String name, String[] parameterTypes,
(com.liferay.portal.service.ServiceContext)arguments[15]);
}
+ if (_methodName129.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes129, parameterTypes)) {
+ return CalendarBookingServiceUtil.updateCalendarBookingOffsetAndDuration(((Long)arguments[0]).longValue(),
+ ((Long)arguments[1]).longValue(), (long[])arguments[2],
+ (java.util.Map<java.util.Locale, java.lang.String>)arguments[3],
+ (java.util.Map<java.util.Locale, java.lang.String>)arguments[4],
+ (java.lang.String)arguments[5],
+ ((Long)arguments[6]).longValue(),
+ ((Long)arguments[7]).longValue(),
+ ((Boolean)arguments[8]).booleanValue(),
+ (java.lang.String)arguments[9],
+ ((Long)arguments[10]).longValue(),
+ (java.lang.String)arguments[11],
+ ((Long)arguments[12]).longValue(),
+ (java.lang.String)arguments[13],
+ ((Integer)arguments[14]).intValue(),
+ (com.liferay.portal.service.ServiceContext)arguments[15]);
+ }
+
+ if (_methodName130.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes130, parameterTypes)) {
+ return CalendarBookingServiceUtil.updateCalendarBookingOffsetAndDuration(((Long)arguments[0]).longValue(),
+ ((Long)arguments[1]).longValue(),
+ (java.util.Map<java.util.Locale, java.lang.String>)arguments[2],
+ (java.util.Map<java.util.Locale, java.lang.String>)arguments[3],
+ (java.lang.String)arguments[4],
+ ((Long)arguments[5]).longValue(),
+ ((Long)arguments[6]).longValue(),
+ ((Boolean)arguments[7]).booleanValue(),
+ (java.lang.String)arguments[8],
+ ((Long)arguments[9]).longValue(),
+ (java.lang.String)arguments[10],
+ ((Long)arguments[11]).longValue(),
+ (java.lang.String)arguments[12],
+ ((Integer)arguments[13]).intValue(),
+ (com.liferay.portal.service.ServiceContext)arguments[14]);
+ }
+
throw new UnsupportedOperationException();
}
@@ -509,4 +567,8 @@ public Object invokeMethod(String name, String[] parameterTypes,
private String[] _methodParameterTypes127;
private String _methodName128;
private String[] _methodParameterTypes128;
+ private String _methodName129;
+ private String[] _methodParameterTypes129;
+ private String _methodName130;
+ private String[] _methodParameterTypes130;
}
View
66 ...s/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/http/CalendarBookingServiceSoap.java
@@ -545,5 +545,71 @@ public static int searchCount(long companyId, long[] groupIds,
}
}
+ public static com.liferay.calendar.model.CalendarBookingSoap updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ java.lang.String[] titleMapLanguageIds,
+ java.lang.String[] titleMapValues,
+ java.lang.String[] descriptionMapLanguageIds,
+ java.lang.String[] descriptionMapValues, java.lang.String location,
+ long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws RemoteException {
+ try {
+ Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
+ titleMapValues);
+ Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
+ descriptionMapValues);
+
+ com.liferay.calendar.model.CalendarBooking returnValue = CalendarBookingServiceUtil.updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, childCalendarIds, titleMap, descriptionMap,
+ location, offset, duration, allDay, recurrence,
+ firstReminder, firstReminderType, secondReminder,
+ secondReminderType, status, serviceContext);
+
+ return com.liferay.calendar.model.CalendarBookingSoap.toSoapModel(returnValue);
+ }
+ catch (Exception e) {
+ _log.error(e, e);
+
+ throw new RemoteException(e.getMessage());
+ }
+ }
+
+ public static com.liferay.calendar.model.CalendarBookingSoap updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ java.lang.String[] titleMapLanguageIds,
+ java.lang.String[] titleMapValues,
+ java.lang.String[] descriptionMapLanguageIds,
+ java.lang.String[] descriptionMapValues, java.lang.String location,
+ long offset, long duration, boolean allDay,
+ java.lang.String recurrence, long firstReminder,
+ java.lang.String firstReminderType, long secondReminder,
+ java.lang.String secondReminderType, int status,
+ com.liferay.portal.service.ServiceContext serviceContext)
+ throws RemoteException {
+ try {
+ Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
+ titleMapValues);
+ Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
+ descriptionMapValues);
+
+ com.liferay.calendar.model.CalendarBooking returnValue = CalendarBookingServiceUtil.updateCalendarBookingOffsetAndDuration(calendarBookingId,
+ calendarId, titleMap, descriptionMap, location, offset,
+ duration, allDay, recurrence, firstReminder,
+ firstReminderType, secondReminder, secondReminderType,
+ status, serviceContext);
+
+ return com.liferay.calendar.model.CalendarBookingSoap.toSoapModel(returnValue);
+ }
+ catch (Exception e) {
+ _log.error(e, e);
+
+ throw new RemoteException(e.getMessage());
+ }
+ }
+
private static Log _log = LogFactoryUtil.getLog(CalendarBookingServiceSoap.class);
}
View
57 ...endar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarBookingLocalServiceImpl.java
@@ -497,6 +497,34 @@ public int getCalendarBookingsCount(
parentCalendarBookingId, status);
}
+ public long[] getChildCalendarIds(long calendarBookingId, long calendarId)
+ throws PortalException, SystemException {
+
+ CalendarBooking calendarBooking =
+ calendarBookingPersistence.findByPrimaryKey(calendarBookingId);
+
+ List<CalendarBooking> childCalendarBookings =
+ calendarBookingPersistence.findByParentCalendarBookingId(
+ calendarBookingId);
+
+ long[] childCalendarIds = new long[childCalendarBookings.size()];
+
+ for (int i = 0; i < childCalendarIds.length; i++) {
+ CalendarBooking childCalendarBooking = childCalendarBookings.get(i);
+
+ if (childCalendarBooking.getCalendarId() ==
+ calendarBooking.getCalendarId()) {
+
+ childCalendarIds[i] = calendarId;
+ }
+ else {
+ childCalendarIds[i] = childCalendarBooking.getCalendarId();
+ }
+ }
+
+ return childCalendarIds;
+ }
+
@Override
public CalendarBooking moveCalendarBookingToTrash(
long userId, CalendarBooking calendarBooking)
@@ -1081,35 +1109,6 @@ protected void addChildCalendarBookings(
}
}
- protected long[] getChildCalendarIds(
- long calendarBookingId, long calendarId)
- throws PortalException, SystemException {
-
- CalendarBooking calendarBooking =
- calendarBookingPersistence.findByPrimaryKey(calendarBookingId);
-
- List<CalendarBooking> childCalendarBookings =
- calendarBookingPersistence.findByParentCalendarBookingId(
- calendarBookingId);
-
- long[] childCalendarIds = new long[childCalendarBookings.size()];
-
- for (int i = 0; i < childCalendarIds.length; i++) {
- CalendarBooking childCalendarBooking = childCalendarBookings.get(i);
-
- if (childCalendarBooking.getCalendarId() ==
- calendarBooking.getCalendarId()) {
-
- childCalendarIds[i] = calendarId;
- }
- else {
- childCalendarIds[i] = childCalendarBooking.getCalendarId();
- }
- }
-
- return childCalendarIds;
- }
-
protected String getExtraDataJSON(CalendarBooking calendarBooking) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
View
49 ...s/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarBookingServiceImpl.java
@@ -20,6 +20,7 @@
import com.liferay.calendar.service.permission.CalendarPermission;
import com.liferay.calendar.util.ActionKeys;
import com.liferay.calendar.util.CalendarUtil;
+import com.liferay.calendar.util.JCalendarUtil;
import com.liferay.calendar.util.RSSUtil;
import com.liferay.calendar.workflow.CalendarBookingApprovalWorkflow;
import com.liferay.portal.kernel.bean.BeanReference;
@@ -474,6 +475,54 @@ public CalendarBooking updateCalendarBookingInstance(
secondReminderType, status, serviceContext);
}
+ @Override
+ public CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId, long[] childCalendarIds,
+ Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
+ String location, long offset, long duration, boolean allDay,
+ String recurrence, long firstReminder, String firstReminderType,
+ long secondReminder, String secondReminderType, int status,
+ ServiceContext serviceContext)
+ throws PortalException, SystemException {
+
+ CalendarBooking calendarBooking =
+ calendarBookingPersistence.fetchByPrimaryKey(calendarBookingId);
+
+ java.util.Calendar startTimeJCalendar = JCalendarUtil.getJCalendar(
+ calendarBooking.getStartTime() + offset);
+
+ java.util.Calendar endTimeJCalendar = JCalendarUtil.getJCalendar(
+ startTimeJCalendar.getTimeInMillis() + duration);
+
+ return calendarBookingService.updateCalendarBooking(
+ calendarBookingId, calendarId, childCalendarIds, titleMap,
+ descriptionMap, location, startTimeJCalendar.getTimeInMillis(),
+ endTimeJCalendar.getTimeInMillis(), allDay, recurrence,
+ firstReminder, firstReminderType, secondReminder,
+ secondReminderType, status, serviceContext);
+ }
+
+ @Override
+ public CalendarBooking updateCalendarBookingOffsetAndDuration(
+ long calendarBookingId, long calendarId,
+ Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
+ String location, long offset, long duration, boolean allDay,
+ String recurrence, long firstReminder, String firstReminderType,
+ long secondReminder, String secondReminderType, int status,
+ ServiceContext serviceContext)
+ throws PortalException, SystemException {
+
+ long[] childCalendarIds =
+ calendarBookingLocalService.getChildCalendarIds(
+ calendarBookingId, calendarId);
+
+ return updateCalendarBookingOffsetAndDuration(
+ calendarBookingId, calendarId, childCalendarIds, titleMap,
+ descriptionMap, location, offset, duration, allDay, recurrence,
+ firstReminder, firstReminderType, secondReminder,
+ secondReminderType, status, serviceContext);
+ }
+
protected String exportToRSS(
String name, String description, String type, double version,
String displayStyle, String feedURL,
View
95 portlets/calendar-portlet/docroot/js/javascript.js
@@ -451,38 +451,6 @@ AUI.add(
return A.JSON.stringify(map);
},
- getNewStartTimeAndDurationCalendarBooking: function(calendarBookingId, offset, duration, success) {
- var instance = this;
-
- var schedulerEvent = null;
-
- instance.invokeService(
- {
- '/calendar-portlet.calendarbooking/get-new-start-time-and-duration-calendar-booking': {
- calendarBookingId: calendarBookingId,
- offset: offset,
- duration: duration
- }
- },
- {
- success: function(data) {
- if (data) {
- if (data.exception) {
- return;
- }
- else {
- schedulerEvent = instance.createSchedulerEvent(data);
- }
- }
-
- if (success) {
- success.call(this, schedulerEvent);
- }
- }
- }
- );
- },
-
hasChildCalendarBookings: function(schedulerEvent, callback) {
var instance = this;
@@ -684,27 +652,26 @@ AUI.add(
return DateMath.subtract(date, DateMath.MINUTES, date.getTimezoneOffset());
},
- updateEvent: function(schedulerEvent, success) {
+ updateEvent: function(schedulerEvent, offset, duration, success) {
var instance = this;
instance.invokeService(
{
- '/calendar-portlet.calendarbooking/update-calendar-booking': {
+ '/calendar-portlet.calendarbooking/update-calendar-booking-offset-and-duration': {
allDay: schedulerEvent.get('allDay'),
calendarBookingId: schedulerEvent.get('calendarBookingId'),
calendarId: schedulerEvent.get('calendarId'),
descriptionMap: instance.getLocalizationMap(schedulerEvent.get('description')),
- endTime: CalendarUtil.toUTC(schedulerEvent.get('endDate')).getTime(),
+ duration: duration,
firstReminder: schedulerEvent.get('firstReminder'),
firstReminderType: schedulerEvent.get('firstReminderType'),
location: schedulerEvent.get('location'),
+ offset: offset,
recurrence: schedulerEvent.get('recurrence'),
secondReminder: schedulerEvent.get('secondReminder'),
secondReminderType: schedulerEvent.get('secondReminderType'),
- startTime: CalendarUtil.toUTC(schedulerEvent.get('startDate')).getTime(),
status: schedulerEvent.get('status'),
- titleMap: instance.getLocalizationMap(Liferay.Util.unescapeHTML(schedulerEvent.get('content'))),
- userId: USER_ID
+ titleMap: instance.getLocalizationMap(Liferay.Util.unescapeHTML(schedulerEvent.get('content')))
}
},
{
@@ -1394,25 +1361,24 @@ AUI.add(
}
},
- _getNewStartTimeAndDurationCalendarBookingPromise: function(schedulerEvent, changedAttributes) {
+ _getCalendarBookingDuration: function(schedulerEvent) {
var instance = this;
- return A.Promise(
- function(resolve) {
- var calendarbookingId = schedulerEvent.get('calendarBookingId');
+ var duration = schedulerEvent.getSecondsDuration()*Time.SECOND;
- var offset = 0;
- var duration = schedulerEvent.getSecondsDuration()*Time.SECOND;
+ return duration;
+ },
- if (changedAttributes.startDate) {
- offset = changedAttributes.startDate.newVal.getTime() - changedAttributes.startDate.prevVal.getTime();
- }
+ _getCalendarBookingOffset: function(schedulerEvent, changedAttributes) {
+ var instance = this;
- CalendarUtil.getNewStartTimeAndDurationCalendarBooking(calendarbookingId, offset, duration, function(rootSchedulerEvent) {
- resolve(rootSchedulerEvent);
- });
- }
- );
+ var offset = 0;
+
+ if (changedAttributes.startDate) {
+ offset = changedAttributes.startDate.newVal.getTime() - changedAttributes.startDate.prevVal.getTime();
+ }
+
+ return offset;
},
_hasChildCalendarBookingsPromise: function(schedulerEvent) {
@@ -1519,7 +1485,8 @@ AUI.add(
A.batch(
schedulerEvent,
- instance._getNewStartTimeAndDurationCalendarBookingPromise(schedulerEvent, changedAttributes),
+ instance._getCalendarBookingOffset(schedulerEvent, changedAttributes),
+ instance._getCalendarBookingDuration(schedulerEvent),
instance._hasChildCalendarBookingsPromise(schedulerEvent),
answers
)
@@ -1533,7 +1500,7 @@ AUI.add(
_promptSchedulerEventUpdate: function(data) {
var instance = this;
- var hasChild = data[2];
+ var hasChild = data[3];
var schedulerEvent = data[0];
instance.queue = new A.AsyncQueue();
@@ -1600,8 +1567,9 @@ AUI.add(
_queueableQuestionResolver: function(data) {
var instance = this;
- var answers = data[3];
- var rootSchedulerEvent = data[1];
+ var answers = data[4];
+ var duration = data[2];
+ var offset = data[1];
var schedulerEvent = data[0];
var showNextQuestion = A.bind(instance.queue.run, instance.queue);
@@ -1613,21 +1581,14 @@ AUI.add(
CalendarUtil.updateEventInstance(schedulerEvent, !!answers.allFollowing, showNextQuestion);
}
else {
- schedulerEvent.copyDates(
- rootSchedulerEvent,
- {
- silent: true
- }
- );
-
- CalendarUtil.updateEvent(schedulerEvent, showNextQuestion);
+ CalendarUtil.updateEvent(schedulerEvent, offset, duration, showNextQuestion);
}
},
_queueableQuestionUpdateAllInvited: function(data) {
var instance = this;
- var answers = data[3];
+ var answers = data[4];
var showNextQuestion = A.bind(instance.queue.run, instance.queue);
@@ -1654,7 +1615,7 @@ AUI.add(
_queueableQuestionUpdateRecurring: function(data) {
var instance = this;
- var answers = data[3];
+ var answers = data[4];
var showNextQuestion = A.bind(instance.queue.run, instance.queue);
@@ -1690,7 +1651,7 @@ AUI.add(
_queueableQuestionUserCalendarOnly: function(data) {
var instance = this;
- var answers = data[3];
+ var answers = data[4];
var schedulerEvent = data[0];
var showNextQuestion = A.bind(instance.queue.run, instance.queue);
Something went wrong with that request. Please try again.