Interface Source

All Superinterfaces:
Describable, org.codice.ddf.platform.services.common.Describable
All Known Subinterfaces:
CatalogProvider, CatalogStore, ConnectedSource, FederatedSource, OAuthFederatedSource, RemoteSource, SourceCache

public interface Source extends Describable
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 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 CatalogFramework implementations will call this and only periodically.

      Returns:
      true - if the site is available (up), false - if the site is unavailable (down)
    • isAvailable

      boolean isAvailable(SourceMonitor callback)
      This method is the same as isAvailable() but allows a caller to provide a SourceMonitor callback object which is meant to be used as a way for the Source to dynamically contact the caller with its availability. The intent is to return a boolean as to whether the Source is available at this very moment and also to use the SourceMonitor object 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 the Source object 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 SourceResponse with query results and query response details
      Throws:
      UnsupportedQueryException - when the query is not understood, malformed, or not supported by a Source
    • getContentTypes

      Set<ContentType> getContentTypes()
      Gets the ContentTypes that are currently stored by the Source. Notice the return object is a Set, meaning it returns all unique content types found in the Source without duplications.
      Returns:
      a Set of ContentTypes currently available from this Source.
    • getSecurityAttributes

      default Map<String,Set<String>> getSecurityAttributes()
      Gets the map of security attributes associated with this source
      Returns:
      a map of security attributes