Liferay 6.1.2-ce-ga3

com.liferay.portlet.documentlibrary.util
Class RawMetadataProcessorImpl

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl
All Implemented Interfaces:
DLProcessor, RawMetadataProcessor

public class RawMetadataProcessorImpl
extends Object
implements DLProcessor, RawMetadataProcessor


Constructor Summary
RawMetadataProcessorImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 void cleanUp(FileEntry fileEntry)
           
 void cleanUp(FileVersion fileVersion)
           
 void exportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
           
 void generateMetadata(FileVersion fileVersion)
          Generates the raw metadata associated with the file entry.
 void importGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement)
           
 boolean isSupported(FileVersion fileVersion)
           
 boolean isSupported(String mimeType)
           
 void saveMetadata(FileVersion fileVersion)
          Saves the raw metadata present in the file version.
 void trigger(FileVersion fileVersion)
          Launches the processor's work with respect to the given file version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawMetadataProcessorImpl

public RawMetadataProcessorImpl()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface DLProcessor

cleanUp

public void cleanUp(FileEntry fileEntry)
Specified by:
cleanUp in interface DLProcessor
Specified by:
cleanUp in interface RawMetadataProcessor

cleanUp

public void cleanUp(FileVersion fileVersion)
Specified by:
cleanUp in interface DLProcessor
Specified by:
cleanUp in interface RawMetadataProcessor

exportGeneratedFiles

public void exportGeneratedFiles(PortletDataContext portletDataContext,
                                 FileEntry fileEntry,
                                 Element fileEntryElement)
                          throws Exception
Specified by:
exportGeneratedFiles in interface DLProcessor
Throws:
Exception

generateMetadata

public void generateMetadata(FileVersion fileVersion)
                      throws SystemException
Description copied from interface: RawMetadataProcessor
Generates the raw metadata associated with the file entry.

Specified by:
generateMetadata in interface RawMetadataProcessor
Parameters:
fileVersion - the file version from which the raw metatada is to be generated
Throws:
SystemException - if a system exception occurred

importGeneratedFiles

public void importGeneratedFiles(PortletDataContext portletDataContext,
                                 FileEntry fileEntry,
                                 FileEntry importedFileEntry,
                                 Element fileEntryElement)
                          throws Exception
Specified by:
importGeneratedFiles in interface DLProcessor
Throws:
Exception

isSupported

public boolean isSupported(FileVersion fileVersion)
Specified by:
isSupported in interface DLProcessor
Specified by:
isSupported in interface RawMetadataProcessor

isSupported

public boolean isSupported(String mimeType)
Specified by:
isSupported in interface DLProcessor
Specified by:
isSupported in interface RawMetadataProcessor

saveMetadata

public void saveMetadata(FileVersion fileVersion)
                  throws PortalException,
                         SystemException
Description copied from interface: RawMetadataProcessor
Saves the raw metadata present in the file version.

The raw metadata present in the file version is extracted and persisted using TikaRawMetadataProcessor.

Specified by:
saveMetadata in interface RawMetadataProcessor
Parameters:
fileVersion - the file version from which the raw metatada is to be extracted and persisted
Throws:
PortalException - if an error occurred in the metadata extraction
SystemException - if a system exception occurred

trigger

public void trigger(FileVersion fileVersion)
Description copied from interface: DLProcessor
Launches the processor's work with respect to the given file version.

Specified by:
trigger in interface DLProcessor
Specified by:
trigger in interface RawMetadataProcessor
Parameters:
fileVersion - the latest file version to process

Liferay 6.1.2-ce-ga3