/** Handle PRE create extensions */ public void preCreate(Session session, Ref<Node> parentNode, Ref<Folder> fld) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, DatabaseException, ExtensionException { log.debug("preCreate({}, {}, {})", new Object[] {session, parentNode, fld}); try { ExtensionManager em = ExtensionManager.getInstance(); List<FolderExtension> col = em.getPlugins(FolderExtension.class); Collections.sort(col, new OrderComparator<FolderExtension>()); for (FolderExtension ext : col) { log.debug("Extension class: {}", ext.getClass().getCanonicalName()); ext.preCreate(session, parentNode, fld); } } catch (ServiceConfigurationError e) { log.error(e.getMessage(), e); } }