public class SearchServiceInstanceManager extends Object implements Component, Serviceable, Disposable
SearchServiceInstance
s.Modifier and Type | Field and Description |
---|---|
private SearchServiceInstanceFactory |
_factory |
private Map<String,SearchServiceInstance> |
_instances |
private AmetysObjectResolver |
_resolver |
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
SearchServiceInstanceManager() |
Modifier and Type | Method and Description |
---|---|
private void |
_clearCache() |
void |
dispose() |
SearchServiceInstance |
get(String zoneItemId)
Gets, or creates if it does not exist yet, the
SearchServiceInstance which is placed at the given ZoneItem . |
boolean |
isSearchServiceInstance(String zoneItemId)
|
void |
remove(String zoneItemId)
Removes the
SearchServiceInstance which is placed at the given ZoneItem . |
void |
service(ServiceManager manager) |
private AmetysObjectResolver _resolver
private SearchServiceInstanceFactory _factory
private Map<String,SearchServiceInstance> _instances
public SearchServiceInstanceManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void dispose()
dispose
in interface Disposable
private void _clearCache()
public boolean isSearchServiceInstance(String zoneItemId)
zoneItemId
- the id of the ZoneItem
true
if the given id of a ZoneItem
is an instance of a SearchService
public SearchServiceInstance get(String zoneItemId)
SearchServiceInstance
which is placed at the given ZoneItem
.
isSearchServiceInstance
before to ensure that the given id is an instance of SearchService
(this check is not done in this method)zoneItemId
- the id of the ZoneItem
SearchServiceInstance
which is placed at the given ZoneItem
public void remove(String zoneItemId)
SearchServiceInstance
which is placed at the given ZoneItem
.zoneItemId
- the id of the ZoneItem