Class FormatIdentifierFactory
- java.lang.Object
-
- fr.gouv.vitam.common.format.identification.FormatIdentifierFactory
-
public class FormatIdentifierFactory extends java.lang.Object
Format Identifier Factory : used to retrieve the FormatIdentifier implementations
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFormatIdentifier(java.lang.String formatIdentifierId, FormatIdentifierConfiguration configuration)
Add a format identifier configurationvoid
changeConfigurationFile(java.lang.String configurationPath)
Change client configuration from the Json fileFormatIdentifier
getFormatIdentifierFor(java.lang.String formatIdentifierId)
Instantiate the format identifier identifiedstatic FormatIdentifierFactory
getInstance()
Get the FormatIdentifierFactory instancevoid
removeFormatIdentifier(java.lang.String formatIdentifierId)
Remove a format identifier configuration by its id
-
-
-
Method Detail
-
changeConfigurationFile
public final void changeConfigurationFile(java.lang.String configurationPath)
Change client configuration from the Json file- Parameters:
configurationPath
- the path to the configuration file
-
getInstance
public static FormatIdentifierFactory getInstance()
Get the FormatIdentifierFactory instance- Returns:
- the instance
-
getFormatIdentifierFor
public FormatIdentifier getFormatIdentifierFor(java.lang.String formatIdentifierId) throws FormatIdentifierNotFoundException, FormatIdentifierFactoryException, FormatIdentifierTechnicalException
Instantiate the format identifier identified- Parameters:
formatIdentifierId
- format identifier id- Returns:
- the Format Identifier implementation
- Throws:
FormatIdentifierNotFoundException
- if the configuration was not foundFormatIdentifierFactoryException
- if the implementation was not foundFormatIdentifierTechnicalException
- if any technical error occursjava.lang.IllegalArgumentException
- if formatIdentifierId parameter is null
-
addFormatIdentifier
public void addFormatIdentifier(java.lang.String formatIdentifierId, FormatIdentifierConfiguration configuration)
Add a format identifier configuration- Parameters:
formatIdentifierId
- format identifier idconfiguration
- format identifier configuration- Throws:
java.lang.IllegalArgumentException
- if the parameters are null : formatIdentifierId, configuration, configuration.type
-
removeFormatIdentifier
public void removeFormatIdentifier(java.lang.String formatIdentifierId) throws FormatIdentifierNotFoundException
Remove a format identifier configuration by its id- Parameters:
formatIdentifierId
- format identifier id- Throws:
FormatIdentifierNotFoundException
- if no configuration is registered for the given formatIdentifierIdjava.lang.IllegalArgumentException
- if the parameters are null : formatIdentifierId
-
-