|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DLProcessor
Provides a common interface for all the processors of the document library. All document library processors must implement this interface. A DLProcessor (processor) is responsible for extracting additional metadata or assets from a Documents and Media file entry. Here are a couple examples of such metadata and assets:
DLProcessor:
@Component(service = DLProcessor.class)
public class MyDLProcessor implements DLProcessor {
}
Implementing classes are responsible for managing any storage required by the
generated resources and for providing access to any generated assets. See
current implementations for examples.
AudioProcessor,
DLPreviewableProcessor,
ImageProcessor,
PDFProcessor,
RawMetadataProcessor,
VideoProcessor| 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. |
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 |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the destination file version. |
| Method Detail |
|---|
void afterPropertiesSet()
throws Exception
Exceptionvoid cleanUp(FileEntry fileEntry)
fileEntry - the file entry for which resources are cleaned upvoid cleanUp(FileVersion fileVersion)
cleanUp(FileEntry)
if you want to clean up everything.
fileVersion - the file version for which resources will be cleaned
up
void copy(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
sourceFileVersion - the file version to copy resources fromdestinationFileVersion - the file version to copy resources to
void exportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
throws Exception
portletDataContext - 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 into
Exception - if an error occurred while exporting the file entry
resourcesString getType()
DLProcessorConstants for the
set of predefined processor types.
void importGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
throws Exception
PortletDataContext.isPerformDirectBinaryImport()), the resources are
directly copied from the file entry; otherwise, they're extracted from
the file entry element.
portletDataContext - 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 supported
Exception - if an error occurred while importing the file entry
resourcesboolean isSupported(FileVersion fileVersion)
true if the file version is supported by this
processor.
fileVersion - the file version
true if this processor supports the file version;
false otherwiseboolean isSupported(String mimeType)
true if the given file MIME type is supported by
this processor.
mimeType - the MIME type
true if this processor supports the MIME type;
false otherwise
void trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
sourceFileVersion - 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 | |||||||||