I think repository engines will help you to achieve secured partitioned automatic version controlled resources. All redundant documents and resources are trace able too. Jackrabbit is well known and rich in API for example.