public void removeCalendarEvent(String siteId, String eventId){ try{ String calendarId = calendarReference(siteId, SiteService.MAIN_CONTAINER); Calendar calendar = getCalendar(calendarId); if(calendar != null && eventId != null && !"".equals(eventId)){ try{ CalendarEvent calendarEvent = calendar.getEvent(eventId); calendar.removeEvent(calendar.getEditEvent(calendarEvent.getId(), CalendarService.EVENT_REMOVE_CALENDAR)); }catch (PermissionException | InUseException | IdUnusedException e) { log.warn(e.getMessage(), e); } } }catch (IdUnusedException | PermissionException e) { log.warn(e.getMessage(), e); } }
public String toString() { return super.toString() + ((m_ref != null) ? (" : " + m_ref) : ""); } }
public void removeCalendarEvent(String siteId, String eventId){ try{ String calendarId = calendarReference(siteId, SiteService.MAIN_CONTAINER); Calendar calendar = getCalendar(calendarId); if(calendar != null && eventId != null && !"".equals(eventId)){ try{ CalendarEvent calendarEvent = calendar.getEvent(eventId); calendar.removeEvent(calendar.getEditEvent(calendarEvent.getId(), CalendarService.EVENT_REMOVE_CALENDAR)); }catch (PermissionException | InUseException | IdUnusedException e) { log.warn(e.getMessage(), e); } } }catch (IdUnusedException | PermissionException e) { log.warn(e.getMessage(), e); } }
public String toString() { return super.toString() + " ref: " + m_id; } }
logger.error(ex.getMessage(), ex);
public String toString() { return super.toString() + " ref: " + m_id; } }
M_log.debug(e.getMessage());
public String toString() { return super.toString() + ((m_ref != null) ? (" : " + m_ref) : ""); } }
preferencesService.commit(preferences); } catch (SakaiException e1) { log.error(e1.getMessage(), e1);
protected boolean ensureMediaCollection(String id) { SecurityAdvisor resourceAdvisor = pushAdvisor(); try { ContentCollection coll = contentHostingService.getCollection(id); } catch (IdUnusedException ie) { log.debug("Creating collection: " + id); String name = id; if (name.endsWith("/")) { name = id.substring(0, id.length() - 1); } name = name.substring(name.lastIndexOf('/') + 1); try { ContentCollectionEdit edit = contentHostingService.addCollection(id); ResourcePropertiesEdit props = edit.getPropertiesEdit(); props.addProperty(ResourceProperties.PROP_DISPLAY_NAME, name); contentHostingService.commitCollection(edit); } catch (IdUsedException | IdInvalidException | PermissionException | InconsistentException collex) { log.warn("[Samigo Media Attachments] Exception while creating collection (" + id + "): " + collex.toString()); return false; } } catch (TypeException | PermissionException e) { log.warn("[Samigo Media Attachments] General exception while ensuring collection: " + e.toString()); } finally { popAdvisor(resourceAdvisor); } return true; }
log.warn(e.getMessage(), e);
protected boolean ensureMediaCollection(String id) { SecurityAdvisor resourceAdvisor = pushAdvisor(); try { ContentCollection coll = contentHostingService.getCollection(id); } catch (IdUnusedException ie) { log.debug("Creating collection: " + id); String name = id; if (name.endsWith("/")) { name = id.substring(0, id.length() - 1); } name = name.substring(name.lastIndexOf('/') + 1); try { ContentCollectionEdit edit = contentHostingService.addCollection(id); ResourcePropertiesEdit props = edit.getPropertiesEdit(); props.addProperty(ResourceProperties.PROP_DISPLAY_NAME, name); contentHostingService.commitCollection(edit); } catch (IdUsedException | IdInvalidException | PermissionException | InconsistentException collex) { log.warn("[Samigo Media Attachments] Exception while creating collection (" + id + "): " + collex.toString()); return false; } } catch (TypeException | PermissionException e) { log.warn("[Samigo Media Attachments] General exception while ensuring collection: " + e.toString()); } finally { popAdvisor(resourceAdvisor); } return true; }
log.warn(e.getMessage(), e);
protected ContentResource getMediaContentResource(MediaData mediaData) { if (mediaData.getContentResource() != null) { return mediaData.getContentResource(); } String id = getMediaPath(mediaData); log.debug("=====> Reading media: " + id); if (id != null) { SecurityAdvisor resourceAdvisor = pushAdvisor(); try { ContentResource res = contentHostingService.getResource(id); return res; } catch (IdUnusedException ie) { log.info("Nonexistent resource when trying to load media (id: " + mediaData.getMediaId() + "): " + id); } catch (PermissionException | TypeException e) { log.debug("Exception while reading media from content (" + mediaData.getMediaId() + "):" + e.toString()); } finally { popAdvisor(resourceAdvisor); } } return null; }
preferencesService.commit(preferences); } catch (SakaiException e1) { log.error(e1.getMessage(), e1);
protected ContentResource getMediaContentResource(MediaData mediaData) { if (mediaData.getContentResource() != null) { return mediaData.getContentResource(); } String id = getMediaPath(mediaData); log.debug("=====> Reading media: " + id); if (id != null) { SecurityAdvisor resourceAdvisor = pushAdvisor(); try { ContentResource res = contentHostingService.getResource(id); return res; } catch (IdUnusedException ie) { log.info("Nonexistent resource when trying to load media (id: " + mediaData.getMediaId() + "): " + id); } catch (PermissionException | TypeException e) { log.debug("Exception while reading media from content (" + mediaData.getMediaId() + "):" + e.toString()); } finally { popAdvisor(resourceAdvisor); } } return null; }
log.warn(pe.getMessage(), pe);
log.warn(pe.getMessage(), pe);
log.warn(pe.getMessage(), pe);
log.warn(pe.getMessage(), pe);