more or less complete generic REST resource handle class