WritablePathRepository writableRepo = (WritablePathRepository)repository;
if (target != null) {
String msg = GraphI18n.workspaceAlreadyExistsInRepository.text(targetWorkspaceName, repository.getSourceName());
request.setError(new InvalidWorkspaceException(msg));
return;
}
if (original == null) {
switch (request.cloneConflictBehavior()) {
case DO_NOT_CLONE:
String msg = GraphI18n.workspaceDoesNotExistInRepository.text(nameOfWorkspaceToBeCloned,
repository.getSourceName());
request.setError(new InvalidWorkspaceException(msg));
return;
case SKIP_CLONE:
target = writableRepo.createWorkspace(context, targetWorkspaceName, request.targetConflictBehavior());
assert target != null;