else if (item instanceof StorageCollectionItem) {
toRoute.getTargetedRepository().createCollection(to,
item.getRepositoryItemAttributes().asMap());
}
else {
throw new IllegalRequestException(from, "Cannot copy item of class='"
+ item.getClass().getName() + "' over multiple repositories.");
}
}
}
finally {
from.popRequestPath();
to.popRequestPath();
}
}
else {
// this is "above" repositories
if (!fromRoute.isRepositoryHit()) {
throw new IllegalRequestException(from, "The path '" + from.getRequestPath()
+ "' does not points to any repository!");
}
else {
throw new IllegalRequestException(to, "The path '" + to.getRequestPath()
+ "' does not points to any repository!");
}
}
}