} catch (PermissionException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("PermissionException from ContentHostingService:" + e.getMessage()); } catch (IdUnusedException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
} catch (PermissionException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("PermissionException from ContentHostingService:" + e.getMessage()); } catch (IdUnusedException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
public TaggableActivity getActivity(String activityRef, TaggingProvider provider) { // We aren't picky about the provider, so ignore that argument. TaggableActivity activity = null; if (checkReference(activityRef)) { try { Assignment assignment = assignmentService.getAssignment(activityRef); if (assignment != null) activity = new AssignmentActivityImpl(assignment, this); } catch (IdUnusedException iue) { logger.error(iue.getMessage(), iue); } catch (PermissionException pe) { logger.error(pe.getMessage(), pe); } } return activity; }
/** * Returns podcast folder id using either 'podcasts' or 'Podcasts'. If it * cannot find or is denied access, it will return null. * * @param siteId * The site to search * * @return String * Contains the complete id for the podcast folder */ public String retrievePodcastFolderId(String siteId) { String podcastFolderId = null; try { enablePodfeedSecurityAdvisor(); podcastFolderId = podcastService.retrievePodcastFolderId(siteId); } catch (PermissionException e) { // log and return null to indicate there was a problem generating LOG.error("PermissionException while trying to retrieve Podcast folder Id string " + "while generating feed for site " + siteId + e.getMessage(), e); } finally { securityService.popAdvisor(); } return podcastFolderId; }
log.error(e.getMessage(), e); } catch (PermissionException e) { log.error(e.getMessage(), e); } catch (InconsistentException e) { log.error(e.getMessage(), e);
private AnnouncementChannel getAnnouncementChannel(String contextId) { AnnouncementService aService = org.sakaiproject.announcement.cover.AnnouncementService.getInstance(); AnnouncementChannel channel = null; String channelId = m_serverConfigurationService.getString(m_announcementService.ANNOUNCEMENT_CHANNEL_PROPERTY, null); if (channelId == null) { channelId = m_announcementService.channelReference(contextId, SiteService.MAIN_CONTAINER); try { channel = aService.getAnnouncementChannel(channelId); } catch (IdUnusedException e) { M_log.warn("getAnnouncement:No announcement channel found"); channel = null; } catch (PermissionException e) { M_log.warn("getAnnouncement:Current user not authorized to deleted annc associated " + "with assignment. " + e.getMessage()); channel = null; } } return channel; }
private ContentResource getFirstAcceptableAttachement(List attachments) { for( int i =0; i < attachments.size();i++ ) { Reference attachment = (Reference)attachments.get(i); try { ContentResource res = m_contentHostingService.getResource(attachment.getId()); if (contentReviewService.isAcceptableContent(res)) { return res; } } catch (PermissionException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (IdUnusedException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (TypeException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } } return null; }
M_log.warn(":getAllAcceptableAttachments " + e.getMessage());
log.info("PermissionException for removal of calendar: " + e.getMessage());
+ siteId + ": " + e.getMessage(), e);
log.error(e.getMessage(), e);
+ siteId + " " + e.getMessage(), e); throw e;
M_log.debug(e.getMessage()); return null;
log.error("Error removing site: " + s.getId() + ", " + e.getMessage()); } catch (IdUnusedException e) { log.error("Error removing site: " + s.getId() + ", " + e.getMessage());
/** * Returns (from content hosting) whether the podcast folder is PUBLIC or * SITE * * @return int * 0 = Display to non-members, 1 = Display to Site */ public int getOptions() { String podcastsCollection = null; try { podcastsCollection = retrievePodcastFolderId(getSiteId()); if (isPublic(podcastsCollection)) { return PUBLIC; } else { return SITE; } } catch (PermissionException e) { LOG.warn("PermissionException attempting to retrieve podcast folder id " + " for site " + getSiteId() + ". " + e.getMessage(), e); throw new PodcastException(e); } }
/** * Will determine if there is an announcement associated * with this assignment and removes it, if found. * @param channel AnnouncementChannel * @param aEdit AssignmentEdit * @param pEdit ResourcePropertiesEdit */ private void removeAssociatedAnnouncementItem(AnnouncementChannel channel, AssignmentEdit aEdit, ResourcePropertiesEdit pEdit) { if (channel != null) { String openDateAnnounced = StringUtils.trimToNull(pEdit.getProperty("new_assignment_open_date_announced")); String openDateAnnouncementId = StringUtils.trimToNull(pEdit.getProperty(ResourceProperties.PROP_ASSIGNMENT_OPENDATE_ANNOUNCEMENT_MESSAGE_ID)); if (openDateAnnounced != null && openDateAnnouncementId != null) { try { channel.removeMessage(openDateAnnouncementId); } catch (PermissionException e) { M_log.warn(":removeAnnouncement " + e.getMessage()); } } } }
public TaggableItem getItem(String itemRef, TaggingProvider provider, boolean getMyItemsOnly, String taggedItem) { // We aren't picky about the provider, so ignore that argument. TaggableItem item = null; if (checkReference(itemRef)) { try { AssignmentSubmission submission = assignmentService .getSubmission(parseSubmissionRef(itemRef)); item = new AssignmentItemImpl(submission, parseAuthor(itemRef), new AssignmentActivityImpl(submission.getAssignment(), this)); } catch (IdUnusedException iue) { logger.error(iue.getMessage(), iue); } catch (PermissionException pe) { logger.error(pe.getMessage(), pe); } } return item; }
/** * Go through all of the messages to find the max, put this message at the Maximum + 1 * * @param msg * The message to edit * @return The currentMax value determined (To save on future execution) */ private int setMessageOrderMax(MessageEdit msg) { int currentMax = 0; try { List<MessageEdit> msglist = (List<MessageEdit>) this.getMessages(null, false); for (MessageEdit me:msglist) { if (me.getHeaderEdit().getMessage_order()>currentMax) currentMax = me.getHeaderEdit().getMessage_order(); } msg.getHeaderEdit().setMessage_order(++currentMax); } catch (PermissionException ex) { M_log.error(ex.getMessage()); } return currentMax; }
M_log.warn(" getEntityDescription(): " + e.getMessage() + " ref=" + ref.getReference());
+ " for site " + getSiteId() + ". " + e.getMessage(), e); throw new PodcastException(e);