Hello all.
I'm looking to implement quotas that are given to individual users at the group level. I'm hoping someone would have some insight into the intricacies of this task.
My initial thoughts:
Create a DataObjectDecorator to extend the Group class
- Add a UserQuota field
- Add a userQuota() method
Create a DataObjectDecorator to extend the File class
- Add a CreatedBy field
Create a DataObjectDecorator to extend the Member class
-Add a withinQuota() method
My questions:
Will an Extension to the File class be inherited by other classes? Namely the Image class?
How can I set the CreatedBy field to the current user when files are uploaded?
Additionally, file uploads will need to check the member's withinQuota() method, how can this be accomplished?
Inside the withinQuota(), I will need to pull all Files owned by that user, how should this be done?
Thank you in advance for any insight you can provide.