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

Already on GitHub? Sign in to your account

Add tombstone for move #652

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Owner

osmandin commented Nov 17, 2014

No description provided.

@awoods awoods and 1 other commented on an outdated diff Nov 18, 2014

...pi/src/main/java/org/fcrepo/http/api/FedoraNodes.java
@@ -174,8 +177,17 @@ public Response moveObject(@HeaderParam("Destination") final String destinationU
throw new ClientErrorException("Destination resource already exists", PRECONDITION_FAILED);
}
+ final FedoraResource srcResource = nodeService.find(session, source);
+ final Node sourceNode = srcResource.getNode();
@awoods

awoods Nov 18, 2014

Owner

We want to avoid dealing directly with JCR nodes at the fcrepo-http-api level.
Additionally, if the request to move a resource comes directly against the NodeService, we also want a tombstone to be created, i.e. tombstones are not something that only need to be created when a invocation comes through the REST-API.
I would suggest moving the tombstone creation logic into NodeService.moveObject().

@ajs6f

ajs6f Nov 18, 2014

Member

Just to be clear about the scope in which JCR is a presence: we want to avoid dealing directly with JCR nodes anywhere except -kernel-impl. Admittedly, that's an ideal, but it's the mark against which we should be measuring.

Owner

awoods commented Nov 19, 2014

Resolved with: 58676ec

@awoods awoods closed this Nov 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment