class MetadataVersionDelegate {

    public MetadataVersion getRemoteMetadataVersion( String versionName )
    {
        String versionDetailsUrl = metadataSystemSettingService.getVersionDetailsUrl( versionName );
        DhisHttpResponse dhisHttpResponse = getDhisHttpResponse( versionDetailsUrl, VERSION_TIMEOUT );
        MetadataVersion dataVersion = null;

        if ( isValidDhisHttpResponse( dhisHttpResponse ) )
        {
            try
            {
                dataVersion = renderService.fromJson( dhisHttpResponse.getResponse(), MetadataVersion.class );
            }
            catch ( Exception e )
            {
                String message = "Exception occurred while trying to do JSON conversion for metadata version";
                log.error( message, e );
                throw new MetadataVersionServiceException( message, e );
            }
        }

        return dataVersion;
    }

    public  MetadataVersionDelegate( DefaultMetadataSystemSettingService metadataSystemSettingService,
        SynchronizationManager synchronizationManager, RenderService renderService,
        MetadataVersionService metadataVersionService );

}