use of org.apache.archiva.indexer.merger.IndexMerger in project archiva by apache.
the class TemporaryGroupIndexSessionCleaner method sessionCreated.
@Override
public void sessionCreated(HttpSessionEvent httpSessionEvent) {
// ensure the map is here to avoid NPE
if (httpSessionEvent.getSession().getAttribute(TEMPORARY_INDEX_SESSION_KEY) == null) {
httpSessionEvent.getSession().setAttribute(TEMPORARY_INDEX_SESSION_KEY, new HashMap<>());
}
if (indexMerger == null) {
WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(httpSessionEvent.getSession().getServletContext());
indexMerger = webApplicationContext.getBean(IndexMerger.class);
}
}
use of org.apache.archiva.indexer.merger.IndexMerger in project archiva by apache.
the class TemporaryGroupIndexSessionCleaner method getIndexMerger.
private IndexMerger getIndexMerger(HttpSessionEvent httpSessionEvent) {
if (indexMerger == null) {
WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(httpSessionEvent.getSession().getServletContext());
indexMerger = webApplicationContext.getBean(IndexMerger.class);
}
return indexMerger;
}
Aggregations