001/* 002 * Copyright 2015 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.web.indexing.solr; 017 018import org.apache.avalon.framework.component.Component; 019import org.apache.avalon.framework.logger.AbstractLogEnabled; 020import org.apache.avalon.framework.service.ServiceException; 021import org.apache.avalon.framework.service.ServiceManager; 022import org.apache.avalon.framework.service.Serviceable; 023 024import org.ametys.cms.search.model.SystemPropertyExtensionPoint; 025import org.ametys.cms.search.solr.SolrClientProvider; 026 027/** 028 * Component realizing various web-specific tasks relative to solr indexing. 029 */ 030public class SolrWebIndexer extends AbstractLogEnabled implements Component, Serviceable 031{ 032 033 /** The component role. */ 034 public static final String ROLE = SolrWebIndexer.class.getName(); 035 036 /** The Solr client provider */ 037 protected SolrClientProvider _solrClientProvider; 038 039 /** The system property extension point. */ 040 protected SystemPropertyExtensionPoint _systemPropEP; 041 042 @Override 043 public void service(ServiceManager serviceManager) throws ServiceException 044 { 045 _solrClientProvider = (SolrClientProvider) serviceManager.lookup(SolrClientProvider.ROLE); 046 _systemPropEP = (SystemPropertyExtensionPoint) serviceManager.lookup(SystemPropertyExtensionPoint.ROLE); 047 } 048 049 // TODO ? 050// public void indexSharedResources() 051 052}