Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of fixity infrastructure in order to be able to create Fixity results for projected Datastreams #195

Merged
merged 4 commits into from Dec 13, 2013

Conversation

fasseg
Copy link
Contributor

@fasseg fasseg commented Dec 9, 2013

As per discussion on Friday, this branch adds a CacheEntry interface, to decouple fixity calculation from the LowLevelStoreService and LowLevelCacheEntry.
Determination of whether nodes are projections now happens using an instanceof ExternalBinaryStoreValue as suggested by @cbeer

final Collection<FixityResult> blobs =
runFixityAndFixProblems(datastream);
Collection<FixityResult> blobs;
if (datastream.getNode().isNodeType(FedoraJcrTypes.FEDORA_PROJECTION)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to mix fedora:projection in because Modeshape doesn't give us a way to find out where a binary stream actually comes from?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use org.modeshape.jcr.value.binary.ExternalBinaryValue to our advantage, somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I didn't find another way to determine whether a node is projected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So implementation would be ExternaBinaryValue for projected nodes and StoredBinaryValue for normal nodes? I'll check that...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that works, while you're at it, I think there's also InMemoryBinaryValues, which can't be repaired either.

@cbeer
Copy link
Contributor

cbeer commented Dec 13, 2013

I'll take a look at the comments and see what can be done.

@ghost ghost assigned cbeer Dec 13, 2013
cbeer and others added 4 commits December 13, 2013 10:33
…cks to happen on e.g. projected nodes that may or may not have our custom fixity properties
…ust created the object; if it already exists, just roll it with it.
Binary values

Previously, getFixity only supported binary values that were persisted
into a CacheStore, ignoring projected and in-memory values. This patch
adds support for InMemory and External values by running their
InputStream through our fixity checks (and assumes these values can't be
repaired, as some configurations of cache stores can).
@cbeer cbeer merged commit 9136033 into master Dec 13, 2013
@cbeer cbeer deleted the fixity-projections branch October 17, 2014 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants