class DefaultMetadataVersionService implements MetadataVersionService {

    @Override
    @Transactional( readOnly = true )
    public String getVersionData( String versionName )
    {
        KeyJsonValue keyJsonValue = metaDataKeyJsonService.getMetaDataVersion( versionName );

        if ( keyJsonValue != null )
        {
            try
            {
                return renderService.fromJson( keyJsonValue.getValue(), MetadataWrapper.class ).getMetadata();
            }
            catch ( IOException e )
            {
                log.error( "Exception occurred while deserializing metadata.", e );
            }
        }

        return null;
    }

    public  DefaultMetadataVersionService( MetadataVersionStore metadataVersionStore,
        MetadataExportService metadataExportService, MetadataKeyJsonService metaDataKeyJsonService,
        NodeService nodeService, MetadataSystemSettingService metadataSystemSettingService,
        RenderService renderService );

}