Package org.codice.ddf.rest.service
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codice.ddf.attachment.AttachmentParserprotected ddf.catalog.data.AttributeRegistryprotected ddf.catalog.CatalogFrameworkstatic final Stringprotected static javax.activation.MimeTypeprotected List<ddf.catalog.content.StorageProvider> Fields inherited from interface org.codice.ddf.rest.api.CatalogService
CONTEXT_ROOT, SOURCES_PATH -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCatalogService(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 Summary
Modifier and TypeMethodDescriptionaddDocument(List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message) addDocument(List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message) booleancontainsErrors(ddf.catalog.content.operation.ReadStorageResponse response) ddf.catalog.data.BinaryContentcreateMetacard(javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam) ddf.catalog.data.BinaryContentcreateMetacard(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam) voiddeleteDocument(String id) doesLocalResourceExist(String metacardId, String sourceId) protected org.osgi.framework.BundleContextddf.catalog.data.BinaryContentgetDocument(String encodedSourceId, String encodedId, String transformerParam, URI absolutePath, javax.ws.rs.core.MultivaluedMap<String, String> queryParameters, javax.servlet.http.HttpServletRequest httpRequest) getFileExtensionForMimeType(String mimeType) ddf.catalog.filter.FilterBuilderddf.catalog.data.BinaryContentgetHeaders(String sourceid, String id, URI absolutePath, javax.ws.rs.core.MultivaluedMap<String, String> queryParameters) abstract ddf.catalog.data.BinaryContentorg.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) Map.Entry<org.codice.ddf.attachment.AttachmentInfo, ddf.catalog.data.Metacard> parseParts(Collection<javax.servlet.http.Part> contentParts, String transformerParam) voidsetFilterBuilder(ddf.catalog.filter.FilterBuilder filterBuilder) voidsetMimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper mimeTypeToTransformerMapper) voidsetTikaMimeTypeResolver(ddf.mime.MimeTypeResolver mimeTypeResolver) voidsetUuidGenerator(org.codice.ddf.platform.util.uuidgenerator.UuidGenerator uuidGenerator) net.minidev.json.JSONObjectsourceActionToJSON(ddf.action.Action action) voidupdateDocument(String id, List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message) voidupdateDocument(String id, List<String> contentTypeList, javax.servlet.http.HttpServletRequest httpServletRequest, String transformerParam, InputStream message, Map<String, Serializable> properties) voidupdateDocument(String id, List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message) voidupdateDocument(String id, List<String> contentTypeList, org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody, String transformerParam, InputStream message, Map<String, Serializable> properties)
-
Field Details
-
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
-
-
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:
getHeadersin interfaceorg.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:
getSourcesInfoin interfaceorg.codice.ddf.rest.api.CatalogService
-
doesLocalResourceExist
public String doesLocalResourceExist(String metacardId, String sourceId) throws org.codice.ddf.rest.api.CatalogServiceException - Specified by:
doesLocalResourceExistin interfaceorg.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:
getDocumentin interfaceorg.codice.ddf.rest.api.CatalogService- Throws:
org.codice.ddf.rest.api.CatalogServiceExceptionddf.catalog.resource.DataUsageLimitExceededExceptionjavax.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:
createMetacardin interfaceorg.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:
createMetacardin interfaceorg.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:
updateDocumentin interfaceorg.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:
updateDocumentin interfaceorg.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:
updateDocumentin interfaceorg.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:
updateDocumentin interfaceorg.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:
addDocumentin interfaceorg.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:
addDocumentin interfaceorg.codice.ddf.rest.api.CatalogService- Throws:
org.codice.ddf.rest.api.CatalogServiceException
-
parseAttachments
-
parseParts
public Map.Entry<org.codice.ddf.attachment.AttachmentInfo,ddf.catalog.data.Metacard> parseParts(Collection<javax.servlet.http.Part> contentParts, String transformerParam) - Specified by:
parsePartsin interfaceorg.codice.ddf.rest.api.CatalogService
-
deleteDocument
- Specified by:
deleteDocumentin interfaceorg.codice.ddf.rest.api.CatalogService- Throws:
org.codice.ddf.rest.api.CatalogServiceException
-
getFileExtensionForMimeType
- Specified by:
getFileExtensionForMimeTypein interfaceorg.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)
-