/** Initialize the Database service */ public void init() { RoleRemovalListenerService.getService().registerListener(new DatabaseUserRoleRemovalListener()); DatabaseMyLuteceUserFieldListenerService.getService() .registerListener(new DatabaseUserFieldListener()); _baseAuthentication = SpringContextService.getBean(AUTHENTICATION_BEAN_NAME); if (_baseAuthentication != null) { MultiLuteceAuthentication.registerAuthentication(_baseAuthentication); } else { AppLogService.error( "BaseAuthentication not found, please check your database_context.xml configuration"); } }
/** * Remove asynchronous file * * @param recordField the record field * @param plugin the plugin */ public void removeAsynchronousFile(RecordField recordField, Plugin plugin) { if ((recordField != null) && (recordField.getEntry() != null)) { IEntry entry = recordField.getEntry(); String strWSRestUrl = getWSRestUrl(entry, plugin); if (StringUtils.isNotBlank(strWSRestUrl)) { try { DirectoryAsynchronousUploadHandler.getHandler() .doRemoveFile(recordField, entry, strWSRestUrl); } catch (Exception e) { AppLogService.error(e); } } } }
/** * Register a Portal Content Include * * @param entry The PageInclude entry * @throws LuteceInitException If an error occured */ public static void registerPageInclude(PageIncludeEntry entry) throws LuteceInitException { try { PageInclude pageInclude = (PageInclude) Class.forName(entry.getClassName()).newInstance(); entry.setPageInclude(pageInclude); _mapPageIncludes.put(entry.getId(), entry); AppLogService.info( "New Page Include Service registered : " + entry.getId() + ((!entry.isEnabled()) ? " (disabled)" : "")); } catch (ClassNotFoundException e) { throw new LuteceInitException(e.getMessage(), e); } catch (IllegalAccessException e) { throw new LuteceInitException(e.getMessage(), e); } catch (InstantiationException e) { throw new LuteceInitException(e.getMessage(), e); } }