public class BinaryMetadataServiceImpl extends Object implements BinaryMetadataService
Constructor and Description |
---|
BinaryMetadataServiceImpl() |
Modifier and Type | Method and Description |
---|---|
LinkedList<MetadataMappingDescriptor> |
getSyncMapping(DocumentModel doc,
DocumentEventContext docCtx) |
void |
handleSyncUpdate(DocumentModel doc,
DocumentEventContext docCtx)
Handle document and blob updates according to following rules in an event context: - Define if rule should be
executed in async or sync mode.
|
void |
handleUpdate(List<MetadataMappingDescriptor> mappingDescriptors,
DocumentModel doc,
DocumentEventContext docCtx)
Handle document and blob updates according to following rules in an event context: - Define if rule should be
executed in async or sync mode.
|
Map<String,Object> |
readMetadata(Blob blob)
Read and return metadata from a given binary with Nuxeo default processor.
|
Map<String,Object> |
readMetadata(Blob blob,
List<String> metadataNames)
Read and return metadata from a given binary and a given metadata list with Nuxeo default processor.
|
Map<String,Object> |
readMetadata(String processorName,
Blob blob)
Read and return metadata from a given binary with a given processor.
|
Map<String,Object> |
readMetadata(String processorName,
Blob blob,
List<String> metadataNames)
Read and return metadata from a given binary and a given metadata list with a given processor.
|
boolean |
writeMetadata(Blob blob,
Map<String,Object> metadata)
Write given metadata into a given binary with a Nuxeo default processor.
|
boolean |
writeMetadata(Blob blob,
String mappingDescriptorId,
DocumentModel doc)
Write given metadata mapping id into a given binary with a Nuxeo default processor.
|
void |
writeMetadata(DocumentModel doc,
CoreSession session)
Write metadata (from a binary) into a given Nuxeo Document according to the metadata mapping and rules
contributions.
|
void |
writeMetadata(DocumentModel doc,
CoreSession session,
String mappingDescriptorId)
Apply metadata mapping and override document properties according to the contribution.
|
boolean |
writeMetadata(String processorName,
Blob blob,
Map<String,Object> metadata)
Write given metadata into a given binary with a given processor.
|
boolean |
writeMetadata(String processorName,
Blob blob,
String mappingDescriptorId,
DocumentModel doc)
Write given metadata mapping id into a given binary with a Nuxeo default processor.
|
public Map<String,Object> readMetadata(String processorName, Blob blob, List<String> metadataNames)
BinaryMetadataService
readMetadata
in interface BinaryMetadataService
processorName
- Name of the contributed processor to run.blob
- Binary which metadata are read.metadataNames
- Metadata list to extract from the binary.public Map<String,Object> readMetadata(Blob blob, List<String> metadataNames)
BinaryMetadataService
readMetadata
in interface BinaryMetadataService
blob
- Binary which metadata are read.metadataNames
- Metadata list to extract from the binary.public Map<String,Object> readMetadata(Blob blob)
BinaryMetadataService
readMetadata
in interface BinaryMetadataService
blob
- Binary which metadata are read.public Map<String,Object> readMetadata(String processorName, Blob blob)
BinaryMetadataService
readMetadata
in interface BinaryMetadataService
processorName
- Name of the contributed processor to run.blob
- Binary which metadata are read.public boolean writeMetadata(String processorName, Blob blob, Map<String,Object> metadata)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
processorName
- Name of the contributed processor to run.blob
- Binary which metadata are written.metadata
- Injected metadata.public boolean writeMetadata(Blob blob, Map<String,Object> metadata)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
blob
- Binary which metadata are written.metadata
- Injected metadata.public boolean writeMetadata(String processorName, Blob blob, String mappingDescriptorId, DocumentModel doc)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
processorName
- Name of the contributed processor to run.blob
- Binary which metadata are written.mappingDescriptorId
- The metadata mapping to apply on the document.doc
- Document from properties will be read.public boolean writeMetadata(Blob blob, String mappingDescriptorId, DocumentModel doc)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
blob
- Binary which metadata are written.mappingDescriptorId
- The metadata mapping to apply on the document.doc
- Document from properties will be read.public void writeMetadata(DocumentModel doc, CoreSession session)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
doc
- Nuxeo Document which metadata are written.public void writeMetadata(DocumentModel doc, CoreSession session, String mappingDescriptorId)
BinaryMetadataService
writeMetadata
in interface BinaryMetadataService
doc
- The input document.session
- core session.mappingDescriptorId
- The metadata mapping to apply on the document.public void handleSyncUpdate(DocumentModel doc, DocumentEventContext docCtx)
BinaryMetadataService
handleSyncUpdate
in interface BinaryMetadataService
public void handleUpdate(List<MetadataMappingDescriptor> mappingDescriptors, DocumentModel doc, DocumentEventContext docCtx)
BinaryMetadataService
handleUpdate
in interface BinaryMetadataService
public LinkedList<MetadataMappingDescriptor> getSyncMapping(DocumentModel doc, DocumentEventContext docCtx)
Copyright © 2015 Nuxeo SA. All rights reserved.