if (depth.getStringValue().equalsIgnoreCase("Infinity"))
{
if (srcWorkspace.equals(destWorkspace))
{
Session session = session(repoName, srcWorkspace, lockTokens);
return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(
session, srcNodePath, destNodePath);
}
Session srcSession = session(repoName, srcWorkspace, lockTokens);
Session destSession = session(repoName, destWorkspace, lockTokens);
return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(
srcSession, destSession, srcNodePath, destNodePath);
}
else
{
return Response.status(HTTPStatus.BAD_REQUEST).entity("Bad Request").build();