synchronized ( metadataMapping ) {
// Check for duplicates
final RepositoryFile localeFile = metadataMapping.getLocaleFile( domainId, locale );
if ( !overwrite && localeFile != null ) {
throw new DomainStorageException( messages.getErrorString(
"PentahoMetadataDomainRepository.ERROR_0009_LOCALE_ALREADY_EXISTS", domainId, locale ), null );
}
final SimpleRepositoryFileData data =
new SimpleRepositoryFileData( inputStream, DEFAULT_ENCODING, LOCALE_MIME_TYPE );