Class FormatIdentifierFactory
java.lang.Object
fr.gouv.vitam.common.format.identification.FormatIdentifierFactory
Format Identifier Factory : used to retrieve the FormatIdentifier implementations
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormatIdentifier(String formatIdentifierId, FormatIdentifierConfiguration configuration) Add a format identifier configurationfinal voidchangeConfigurationFile(String configurationPath) Change client configuration from the Json filegetFormatIdentifierFor(String formatIdentifierId) Instantiate the format identifier identifiedstatic FormatIdentifierFactoryGet the FormatIdentifierFactory instancevoidremoveFormatIdentifier(String formatIdentifierId) Remove a format identifier configuration by its id
-
Method Details
-
changeConfigurationFile
Change client configuration from the Json file- Parameters:
configurationPath- the path to the configuration file
-
getInstance
Get the FormatIdentifierFactory instance- Returns:
- the instance
-
getFormatIdentifierFor
public FormatIdentifier getFormatIdentifierFor(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 occursIllegalArgumentException- if formatIdentifierId parameter is null
-
addFormatIdentifier
public void addFormatIdentifier(String formatIdentifierId, FormatIdentifierConfiguration configuration) Add a format identifier configuration- Parameters:
formatIdentifierId- format identifier idconfiguration- format identifier configuration- Throws:
IllegalArgumentException- if the parameters are null : formatIdentifierId, configuration, configuration.type
-
removeFormatIdentifier
public void removeFormatIdentifier(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 formatIdentifierIdIllegalArgumentException- if the parameters are null : formatIdentifierId
-