Package ddf.catalog.source
Interface Source
- All Superinterfaces:
Describable,org.codice.ddf.platform.services.common.Describable
- All Known Subinterfaces:
CatalogProvider,CatalogStore,ConnectedSource,FederatedSource,OAuthFederatedSource,RemoteSource,SourceCache
The Source is used to represent a system that has Metacards in a catalog. A Source may be remote
or local. A local source may be a
CatalogProvider or ConnectedSource. A remote
source is typically a FederatedSource, but can be a ConnectedSource.-
Method Summary
Modifier and TypeMethodDescriptionGets theContentTypes that are currently stored by theSource.Gets the map of security attributes associated with this sourcebooleanThis method states whether this source is available, typically connecting and performing some sort of simple query or ping to the native catalog.booleanisAvailable(SourceMonitor callback) This method is the same asisAvailable()but allows a caller to provide aSourceMonitorcallback object which is meant to be used as a way for theSourceto dynamically contact the caller with its availability.query(QueryRequest request) Methods inherited from interface ddf.catalog.util.Describable
getDescription, getId, getOrganization, getTitle, getVersion
-
Method Details
-
isAvailable
boolean isAvailable()This method states whether this source is available, typically connecting and performing some sort of simple query or ping to the native catalog.This is expected to be an expensive operation, possibly involving network I/O. Typically only
CatalogFrameworkimplementations will call this and only periodically.- Returns:
- true - if the site is available (up), false - if the site is unavailable (down)
-
isAvailable
This method is the same asisAvailable()but allows a caller to provide aSourceMonitorcallback object which is meant to be used as a way for theSourceto dynamically contact the caller with its availability. The intent is to return a boolean as to whether theSourceis available at this very moment and also to use theSourceMonitorobject to update the caller of this method if this Source's availability changes later in the future.- Parameters:
callback- - used to notify the caller of this method when theSourceobject wants to update its availability.- Returns:
- true - if the site is available (up), false - if the site is unavailable (down)
-
query
- Parameters:
request- the query to execute- Returns:
- a
SourceResponsewith query results and query response details - Throws:
UnsupportedQueryException- when the query is not understood, malformed, or not supported by aSource
-
getContentTypes
Set<ContentType> getContentTypes()Gets theContentTypes that are currently stored by theSource. Notice the return object is aSet, meaning it returns all unique content types found in the Source without duplications.- Returns:
- a
SetofContentTypes currently available from thisSource.
-
getSecurityAttributes
Gets the map of security attributes associated with this source- Returns:
- a map of security attributes
-