Package lumis.portal.file.metadata
Class MetadataExtractorFactory
- java.lang.Object
-
- lumis.portal.file.metadata.MetadataExtractorFactory
-
public class MetadataExtractorFactory extends Object
Factory for meta data extractors.- Since:
- 6.1.0
- Version:
- $Revision: 15055 $ $Date: 2012-11-29 18:48:37 -0200 (Thu, 29 Nov 2012) $
-
-
Constructor Summary
Constructors Constructor Description MetadataExtractorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static IMetadataExtractor
getDefaultExtractor(FileMacrotype fileMetadataType)
Returns the defaultIMetadataExtractor
instance, based on theFileMacrotype
.static IMetadataExtractor
getExtractor(FileMacrotype type, String serviceInstanceId)
Returns anextractor
based on service instance andFileMacrotype
.
-
-
-
Method Detail
-
getExtractor
public static IMetadataExtractor getExtractor(FileMacrotype type, String serviceInstanceId) throws PortalException, IllegalArgumentException
Returns anextractor
based on service instance andFileMacrotype
. To discover the correctIMetadataExtractor
implementation class for the given parameter, a search in custom properties is done.
If no custom property was defined, the default Extractor is called by#getDefaultMetadataExtractor(String)
.- Parameters:
type
- theFileMacrotype
of the file.serviceInstanceId
- the service instance of the file.- Returns:
- the
IMetadataExtractor
instance - Throws:
PortalException
- if the specified class is not found;
or if this Class represents an abstract class, an interface, an array class, a primitive type, or void;
or if the class has no nullary constructor;
or if the instantiation fails for some other reason.IllegalArgumentException
- if any parameter is null.- Since:
- 7.0.0
-
getDefaultExtractor
protected static IMetadataExtractor getDefaultExtractor(FileMacrotype fileMetadataType) throws PortalException
Returns the defaultIMetadataExtractor
instance, based on theFileMacrotype
.- Parameters:
fileMetadataType
- theFileMacrotype
.- Returns:
- the default
IMetadataExtractor
instance, based on theFileMacrotype
. - Throws:
PortalException
- Since:
- 7.0.0
-
-