...
- Determine bodypath for file storage, from ContentHostingService (e.g. append instance name, etc.)
- Determine if bodypath exists via ContentHostingService. In order to determine existence, find:
- Site type from a Sakai reference object (that ContentHostingService uses) if site type is:
- Depending upon which type of site, find the appropriate volume relative to the bodypath that should be created
- Determine userid from reference path (e.g. /content/user), instance, or other pertinent information from reference depending on site type (e.g. siteid, etc)
- else if bodypath doesn't exist.. try to run volume create script based on volume previously determined
- Determine if bodypath exists via ContentHostingService. In order to determine existence, find:
- Save file given by ContentHostingService, and run quota extension check against current size of resource (e.g. byte length) vs. volume quota
TODO: figure out if we can determine quota of volume from deeper path (e.g. content being stored is at a deeper level than volume checked) or does it have to be specific AFS volume? **If volume quota gt resource bytes, store content. Else increase quota by a factor of x - Handle errors (checked exceptions) at the Java level via: AFS errors bubble up from shell/perl script to Java level
- If errors, log errors and either try again (e.g. quota extend), or fail and throw exception (e.g. AFS down). No logging written if no errors captured
...