Class SearchServiceInstanceManager
- java.lang.Object
-
- org.ametys.web.frontoffice.search.instance.SearchServiceInstanceManager
-
- All Implemented Interfaces:
Disposable,Component,Serviceable
public class SearchServiceInstanceManager extends Object implements Component, Serviceable, Disposable
The component managing allSearchServiceInstances.
-
-
Field Summary
Fields Modifier and Type Field Description private SearchServiceInstanceFactory_factoryprivate Map<String,SearchServiceInstance>_instancesprivate AmetysObjectResolver_resolverstatic StringROLEAvalon Role
-
Constructor Summary
Constructors Constructor Description SearchServiceInstanceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_clearCache()voiddispose()SearchServiceInstanceget(String zoneItemId)Gets, or creates if it does not exist yet, theSearchServiceInstancewhich is placed at the givenZoneItem.booleanisSearchServiceInstance(String zoneItemId)voidremove(String zoneItemId)Removes theSearchServiceInstancewhich is placed at the givenZoneItem.voidservice(ServiceManager manager)
-
-
-
Field Detail
-
_resolver
private AmetysObjectResolver _resolver
-
_factory
private SearchServiceInstanceFactory _factory
-
_instances
private Map<String,SearchServiceInstance> _instances
-
-
Constructor Detail
-
SearchServiceInstanceManager
public SearchServiceInstanceManager()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
dispose
public void dispose()
- Specified by:
disposein interfaceDisposable
-
_clearCache
private void _clearCache()
-
isSearchServiceInstance
public boolean isSearchServiceInstance(String zoneItemId)
- Parameters:
zoneItemId- the id of theZoneItem- Returns:
trueif the given id of aZoneItemis an instance of aSearchService
-
get
public SearchServiceInstance get(String zoneItemId)
Gets, or creates if it does not exist yet, theSearchServiceInstancewhich is placed at the givenZoneItem.
You must callisSearchServiceInstancebefore to ensure that the given id is an instance ofSearchService(this check is not done in this method)- Parameters:
zoneItemId- the id of theZoneItem- Returns:
- the
SearchServiceInstancewhich is placed at the givenZoneItem
-
remove
public void remove(String zoneItemId)
Removes theSearchServiceInstancewhich is placed at the givenZoneItem.- Parameters:
zoneItemId- the id of theZoneItem
-
-