Class AbstractCatalogService

java.lang.Object
org.codice.ddf.rest.service.AbstractCatalogService
All Implemented Interfaces:
org.codice.ddf.rest.api.CatalogService

public abstract class AbstractCatalogService extends Object implements org.codice.ddf.rest.api.CatalogService
  • Field Details

    • DEFAULT_METACARD_TRANSFORMER

      public static final String DEFAULT_METACARD_TRANSFORMER
      See Also:
    • jsonMimeType

      protected static javax.activation.MimeType jsonMimeType
    • attachmentParser

      protected org.codice.ddf.attachment.AttachmentParser attachmentParser
    • attributeRegistry

      protected ddf.catalog.data.AttributeRegistry attributeRegistry
    • catalogFramework

      protected ddf.catalog.CatalogFramework catalogFramework
    • storageProviders

      protected List<ddf.catalog.content.StorageProvider> storageProviders
  • Constructor Details

    • AbstractCatalogService

      public AbstractCatalogService(ddf.catalog.CatalogFramework framework, org.codice.ddf.attachment.AttachmentParser attachmentParser, ddf.catalog.data.AttributeRegistry attributeRegistry, List<ddf.catalog.content.StorageProvider> storageProviders, List<org.codice.ddf.checksum.ChecksumProvider> checksumProviders)
  • Method Details

    • getBundleContext

      protected org.osgi.framework.BundleContext getBundleContext()
    • getHeaders

      public ddf.catalog.data.BinaryContent getHeaders(String sourceid, String id, URI absolutePath, javax.ws.rs.core.MultivaluedMap<String,String> queryParameters) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      getHeaders in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • sourceActionToJSON

      public net.minidev.json.JSONObject sourceActionToJSON(ddf.action.Action action)
    • getSourcesInfo

      public abstract ddf.catalog.data.BinaryContent getSourcesInfo()
      Specified by:
      getSourcesInfo in interface org.codice.ddf.rest.api.CatalogService
    • doesLocalResourceExist

      public String doesLocalResourceExist(String metacardId, String sourceId) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      doesLocalResourceExist in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • containsErrors

      public boolean containsErrors(ddf.catalog.content.operation.ReadStorageResponse response)
    • getDocument

      public ddf.catalog.data.BinaryContent getDocument(String encodedSourceId, String encodedId, String transformerParam, URI absolutePath, javax.ws.rs.core.MultivaluedMap<String,String> queryParameters, javax.servlet.http.HttpServletRequest httpRequest) throws org.codice.ddf.rest.api.CatalogServiceException, ddf.catalog.resource.DataUsageLimitExceededException, javax.ws.rs.InternalServerErrorException
      Specified by:
      getDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
      ddf.catalog.resource.DataUsageLimitExceededException
      javax.ws.rs.InternalServerErrorException
    • createMetacard

      public ddf.catalog.data.BinaryContent createMetacard(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      createMetacard in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • createMetacard

      public ddf.catalog.data.BinaryContent createMetacard(javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      createMetacard in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • updateDocument

      public void updateDocument(String id, List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message, Map<String,Serializable> properties) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      updateDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • updateDocument

      public void updateDocument(String id, List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      updateDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • updateDocument

      public void updateDocument(String id, List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      updateDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • updateDocument

      public void updateDocument(String id, List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message, Map<String,Serializable> properties) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      updateDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • addDocument

      public String addDocument(List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      addDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • addDocument

      public String addDocument(List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      addDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • parseAttachments

      public org.apache.commons.lang3.tuple.Pair<org.codice.ddf.attachment.AttachmentInfo,ddf.catalog.data.Metacard> parseAttachments(List<org.apache.cxf.jaxrs.ext.multipart.Attachment> contentParts, String transformerParam)
    • parseParts

      public Map.Entry<org.codice.ddf.attachment.AttachmentInfo,ddf.catalog.data.Metacard> parseParts(Collection<javax.servlet.http.Part> contentParts, String transformerParam)
      Specified by:
      parseParts in interface org.codice.ddf.rest.api.CatalogService
    • deleteDocument

      public void deleteDocument(String id) throws org.codice.ddf.rest.api.CatalogServiceException
      Specified by:
      deleteDocument in interface org.codice.ddf.rest.api.CatalogService
      Throws:
      org.codice.ddf.rest.api.CatalogServiceException
    • getFileExtensionForMimeType

      public String getFileExtensionForMimeType(String mimeType)
      Specified by:
      getFileExtensionForMimeType in interface org.codice.ddf.rest.api.CatalogService
    • setMimeTypeToTransformerMapper

      public void setMimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper mimeTypeToTransformerMapper)
    • getFilterBuilder

      public ddf.catalog.filter.FilterBuilder getFilterBuilder()
    • setFilterBuilder

      public void setFilterBuilder(ddf.catalog.filter.FilterBuilder filterBuilder)
    • setTikaMimeTypeResolver

      public void setTikaMimeTypeResolver(ddf.mime.MimeTypeResolver mimeTypeResolver)
    • setUuidGenerator

      public void setUuidGenerator(org.codice.ddf.platform.util.uuidgenerator.UuidGenerator uuidGenerator)