protected boolean existsDirectory(String path) { try { contentHostingService.getCollection(path); } catch (IdUnusedException e) { return false; } catch (TypeException e) { log.error(e.getMessage(), e); } catch (PermissionException e) { log.error("ResourcesHandler.existsDirectory: {}", e.toString()); } return true; }
protected boolean existsDirectory(String path) { try { contentHostingService.getCollection(path); } catch (IdUnusedException e) { return false; } catch (TypeException e) { log.error(e.getMessage(), e); } catch (PermissionException e) { log.error("ResourcesHandler.existsDirectory: {}", e.toString()); } return true; }
} catch (TypeException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("TypeException from ContentHostingService:" + e.getMessage()); } catch (InUseException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
} catch (TypeException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("TypeException from ContentHostingService:" + e.getMessage()); } catch (InUseException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
/** * Pulls a ContentResource from ContentHostingService. * * @param String * The resourceId of the resource to get * * @return ContentResource * If found, null otherwise */ private ContentResource getAResource(String resourceId) throws PermissionException, IdUnusedException { ContentResource crEdit = null; try { crEdit = contentHostingService.getResource(resourceId); } catch (TypeException e) { LOG.error("TypeException while attempting to pull resource: " + resourceId + " for site: " + getSiteId() + ". " + e.getMessage(), e); throw new PodcastException(e); } return crEdit; }
log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e); } catch (InUseException e) { log.error(e.getMessage(), e);
log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e); } catch (InUseException e) { log.error(e.getMessage(), e);
/** * Returns the file's URL * * @param String * The resource Id * * @return String The URL for the resource */ public String getPodcastFileURL(String resourceId) throws PermissionException, IdUnusedException { String Url = null; try { Url = contentHostingService.getResource(resourceId).getUrl(); } catch (TypeException e) { LOG.error("TypeException while getting the resource " + resourceId + "'s URL. Resource from site " + getSiteId() + ". " + e.getMessage(), e); throw new PodcastException(e); } return Url; }
+ siteId + ": " + e.getMessage(), e); throw new PodcastException(e);
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.error(e.getMessage(), e);
+ siteId + ": " + e.getMessage(), e); throw new PodcastException(e);
/** * Pulls a ContentResourceEdit from ContentHostingService. * * @param String * The resourceId of the resource to get * * @return ContentResourceEdit * If found, null otherwise */ private ContentResourceEdit getAResourceEdit(String resourceId) throws PermissionException, IdUnusedException { ContentResourceEdit crEdit = null; try { enablePodcastSecurityAdvisor(); crEdit = contentHostingService.editResource(resourceId); } catch (TypeException e) { LOG.error("TypeException while attempting to pull resource: " + resourceId + " for site: " + getSiteId() + ". " + e.getMessage(), e); throw new PodcastException(e); } catch (InUseException e) { // Weirdness, should not be in use return null; } finally{ securityService.popAdvisor(); } return crEdit; }
log.error(e1.getMessage(), e1); } catch (TypeException e1) { log.error(e1.getMessage(), e1); } catch (InUseException e1) { log.error(e1.getMessage(), e1);
+ " for site: " + siteId + ". " + e1.getMessage(), e1); throw new PodcastException(e1); + " for site: " + siteId + ". " + e.getMessage(), e); throw new PodcastException(e);
log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e);
log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e); } catch (InUseException e) { log.error(e.getMessage(), e); log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e); } catch (InUseException e) { log.error(e.getMessage(), e); log.error(e.getMessage(), e); } catch (TypeException e) { log.error(e.getMessage(), e); } catch (PermissionException e) { log.error(e.getMessage(), e);
LOG.error(e.getMessage() + " while revising podcasts for site: " + getSiteId() + ". ", e); throw new PodcastException(e);
log.error(e1.getMessage(), e1); } catch (TypeException e1) { log.error(e1.getMessage(), e1); } catch (InUseException e1) { log.error(e1.getMessage(), e1);