@SneakyThrows
    protected String getBackupMetadataFilenamePrefix(final AbstractResource metadataResource, final SamlRegisteredService service) {
        val mdFileName = metadataResource.getFilename();
        if (StringUtils.isBlank(mdFileName)) {
            throw new FileNotFoundException("Unable to determine filename for " + metadataResource);
        }
        val fileName = service.getMetadataLocation();
        val sha = DigestUtils.sha(fileName);
        LOGGER.trace("Metadata backup file for metadata location [{}] is linked to [{}]", fileName, sha);
        return sha;
    }
@ SneakyThrows protected String getBackupMetadataFilenamePrefix ( final AbstractResource metadataResource , final SamlRegisteredService service ) { val mdFileName = metadataResource . getFilename ( ) ; if ( StringUtils . isBlank ( mdFileName ) ) { throw new FileNotFoundException ( "Unable to determine filename for " + metadataResource ) ; } val fileName = service . getMetadataLocation ( ) ; val sha = DigestUtils . sha ( fileName ) ; LOGGER . trace ( "Metadata backup file for metadata location [{}] is linked to [{}]" , fileName , sha ) ; return sha ; }
Gets backup metadata filename prefix.
<p>
The metadata source may be an aggregate, representing more than on entity id
inside the single registered service definition. Therefor, using the service's
name or id may not be appropriate choice as compounds in the metadata file name.

@param metadataResource the metadata resource
@param service          the service
@return the backup metadata filename prefix