public ContextualSubscriptionController getContextualSubscriptionController(UserRequest ureq, WindowControl wControl) {
ContextualSubscriptionController csc = null;
if (getSubscriptionContext() != null) {
if ((caller.equals(CalendarController.CALLER_COURSE) || caller.equals(CalendarManager.TYPE_COURSE)) && course != null) {
String businessPath = wControl.getBusinessControl().getAsString();
PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(CalendarManager.class), String.valueOf(course.getResourceableId()), businessPath);
csc = new ContextualSubscriptionController(ureq, wControl, getSubscriptionContext(), pdata);
}
if ((caller.equals(CalendarController.CALLER_COLLAB) || caller.equals(CalendarManager.TYPE_GROUP)) && businessGroup != null) {
String businessPath = wControl.getBusinessControl().getAsString();
PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(CalendarManager.class), String.valueOf(businessGroup.getResourceableId()), businessPath);
csc = new ContextualSubscriptionController(ureq, wControl, getSubscriptionContext(), pdata);
}
}
return csc;
}