|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl
public class RawMetadataProcessorImpl
| Constructor Summary | |
|---|---|
RawMetadataProcessorImpl()
|
|
| Method Summary | |
|---|---|
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. |
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(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RawMetadataProcessorImpl()
| Method Detail |
|---|
public void afterPropertiesSet()
afterPropertiesSet in interface DLProcessorpublic void cleanUp(FileEntry fileEntry)
DLProcessor
cleanUp 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
up
public void copy(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
DLProcessor
copy in interface DLProcessorsourceFileVersion - the file version to copy resources fromdestinationFileVersion - the file version to copy resources to
public void exportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
DLProcessor
exportGeneratedFiles 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)
RawMetadataProcessor
generateMetadata in interface RawMetadataProcessorfileVersion - the file version from which the raw metatada is to be
generatedpublic String getType()
DLProcessorDLProcessorConstants for the
set of predefined processor types.
getType in interface DLProcessor
public 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 version
true if this processor supports the file version;
false otherwisepublic boolean isSupported(String mimeType)
DLProcessortrue if the given file MIME type is supported by
this processor.
isSupported in interface DLProcessorisSupported in interface RawMetadataProcessormimeType - the MIME type
true if this processor supports the MIME type;
false otherwise
public void saveMetadata(FileVersion fileVersion)
throws PortalException
RawMetadataProcessor
The raw metadata present in the file version is extracted and persisted
using TikaRawMetadataProcessor.
saveMetadata in interface RawMetadataProcessorfileVersion - the file version from which the raw metatada is to be
extracted and persisted
PortalExceptionpublic 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 generated
public void trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
DLProcessor
trigger in interface DLProcessorsourceFileVersion - the file version to copy previews and thumbnails
from (optionally null)destinationFileVersion - the latest file version to process
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||