public class RawMetadataProcessorImpl extends java.lang.Object implements DLProcessor, RawMetadataProcessor
| Constructor and Description |
|---|
RawMetadataProcessorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
cleanUp(FileEntry fileEntry)
Cleans up any resources that the processor created for the file entry.
|
void |
cleanUp(FileVersion fileVersion)
Cleans up any resources that the processor created for the given file
version.
|
void |
copy(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Copies all resources generated for the source file version, reusing them
for destination file version.
|
void |
exportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
Exports any resources generated for the file entry into file entry
element.
|
void |
generateMetadata(FileVersion fileVersion)
Generates the raw metadata associated with the file entry.
|
java.lang.String |
getType()
Returns the processor's type.
|
void |
importGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
Imports any existing resources from the file entry or file entry element.
|
boolean |
isSupported(FileVersion fileVersion)
Returns
true if the file version is supported by this
processor. |
boolean |
isSupported(java.lang.String mimeType)
Returns
true if the given file MIME type is supported by
this processor. |
void |
saveMetadata(FileVersion fileVersion)
Saves the raw metadata present in the file version.
|
void |
trigger(FileVersion fileVersion)
Launches extraction of raw metadata from the file version.
|
void |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the destination file
version.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroypublic void afterPropertiesSet()
afterPropertiesSet in interface DLProcessorpublic void cleanUp(FileEntry fileEntry)
DLProcessorcleanUp in interface DLProcessorcleanUp in interface RawMetadataProcessorfileEntry - the file entry for which resources are cleaned uppublic void cleanUp(FileVersion fileVersion)
DLProcessorDLProcessor.cleanUp(FileEntry)
if you want to clean up everything.cleanUp in interface DLProcessorcleanUp in interface RawMetadataProcessorfileVersion - the file version for which resources will be cleaned
uppublic void copy(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
DLProcessorcopy in interface DLProcessorsourceFileVersion - the file version to copy resources fromdestinationFileVersion - the file version to copy resources topublic void exportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
DLProcessorexportGeneratedFiles in interface DLProcessorportletDataContext - the portlet data context to use during this
export operationfileEntry - the file entry for which resources are exportedfileEntryElement - the file entry element to save resources intopublic void generateMetadata(FileVersion fileVersion)
RawMetadataProcessorgenerateMetadata in interface RawMetadataProcessorfileVersion - the file version from which the raw metatada is to be
generatedpublic java.lang.String getType()
DLProcessorcom.liferay.portlet.documentlibrary.model.DLProcessorConstants for the
set of predefined processor types.getType in interface DLProcessorpublic void importGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement)
DLProcessorPortletDataContext.isPerformDirectBinaryImport()), the resources are
directly copied from the file entry; otherwise, they're extracted from
the file entry element.importGeneratedFiles in interface DLProcessorportletDataContext - the portlet data context to use during this
import operationfileEntry - the file entry to import resources from, if direct
binary import is supportedimportedFileEntry - the file entry for which resources are importedfileEntryElement - the file entry element to import resources from,
if direct binary import is not supportedpublic boolean isSupported(FileVersion fileVersion)
DLProcessortrue if the file version is supported by this
processor.isSupported in interface DLProcessorisSupported in interface RawMetadataProcessorfileVersion - the file versiontrue if this processor supports the file version;
false otherwisepublic boolean isSupported(java.lang.String mimeType)
DLProcessortrue if the given file MIME type is supported by
this processor.isSupported in interface DLProcessorisSupported in interface RawMetadataProcessormimeType - the MIME typetrue if this processor supports the MIME type;
false otherwisepublic void saveMetadata(FileVersion fileVersion) throws PortalException
RawMetadataProcessor
The raw metadata present in the file version is extracted and persisted
using com.liferay.portal.metadata.TikaRawMetadataProcessor.
saveMetadata in interface RawMetadataProcessorfileVersion - the file version from which the raw metatada is to be
extracted and persistedPortalExceptionpublic void trigger(FileVersion fileVersion)
RawMetadataProcessorThe raw metadata extraction is done asynchronously.
trigger in interface RawMetadataProcessorfileVersion - the latest file version from which the raw metadata is
to be generatedpublic void trigger(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
DLProcessortrigger in interface DLProcessorsourceFileVersion - the file version to copy previews and thumbnails
from (optionally null)destinationFileVersion - the latest file version to process