/** * Reads all configured mime mapping (config/server/MIMEMapping). */ public static void load() { MIMEMapping.cachedContent.clear(); try { final Session session = MgnlContext.getSystemContext().getJCRSession(RepositoryConstants.CONFIG); final Iterable<Node> mimeList = NodeUtil.getNodes(session.getNode(NODEPATH), NodeTypes.ContentNode.NAME); MIMEMapping.cacheContent(mimeList.iterator()); log.debug("MIMEMapping loaded from {}", NODEPATH); } catch (PathNotFoundException e) { log.warn("No MIMEMapping info configured at {}", NODEPATH); } catch (RepositoryException e) { log.error("Failed to load MIMEMapping: {}", e.getMessage(), e); } }