Package org.fcrepo.kernel.impl.services
Class FixityServiceImpl
- java.lang.Object
-
- org.fcrepo.kernel.impl.services.AbstractService
-
- org.fcrepo.kernel.impl.services.FixityServiceImpl
-
- All Implemented Interfaces:
FixityService
@Component public class FixityServiceImpl extends AbstractService implements FixityService
Implementation ofFixityService
- Author:
- dbernstein, whikloj
-
-
Field Summary
-
Fields inherited from class org.fcrepo.kernel.impl.services.AbstractService
containmentIndex, fedoraPropsConfig, membershipService, referenceService, searchIndex, userTypesCache
-
-
Constructor Summary
Constructors Constructor Description FixityServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RdfStream
checkFixity(Binary binary)
Digest this binary with the digest algorithms providedCollection<URI>
getFixity(Binary binary, Collection<String> algorithms)
Calculate the requested set of digests for the provided binary-
Methods inherited from class org.fcrepo.kernel.impl.services.AbstractService
checkAclLinkHeader, determineInteractionModel, ensureValidACLAuthorization, ensureValidDirectContainer, lockArchivalGroupResource, lockParent, recordEvent, updateReferences
-
-
-
-
Constructor Detail
-
FixityServiceImpl
public FixityServiceImpl()
-
-
Method Detail
-
getFixity
public Collection<URI> getFixity(Binary binary, Collection<String> algorithms) throws UnsupportedAlgorithmException
Description copied from interface:FixityService
Calculate the requested set of digests for the provided binary- Specified by:
getFixity
in interfaceFixityService
- Parameters:
binary
- the binary resource toalgorithms
- set of digest algorithms to calculate- Returns:
- list of calculated digests
- Throws:
UnsupportedAlgorithmException
- if unsupported digest algorithms were provided
-
checkFixity
public RdfStream checkFixity(Binary binary) throws InvalidChecksumException
Description copied from interface:FixityService
Digest this binary with the digest algorithms provided- Specified by:
checkFixity
in interfaceFixityService
- Parameters:
binary
- the binary resource to digest- Returns:
- The result of the fixity check.
- Throws:
InvalidChecksumException
-
-