...
Fixed this by passing in the id String as well as a File to FSCollection constructor. This allows the id to be kept apart from it's File representation, though this could lead to inconsistency with the File form. Tested against getId(). Implemented and tested getReference(). Both work properly now.
Created FSResource. Implemented constructor, getId(), and getResource() very similar to those in FSCollection. Added and implemented getResource in FSHostingService.
Added a few lines to ContentTool to test resources. Works correctly, with the following output:
Info |
---|
Test collection identifier: /test |
Jun. 3, 2006
Documented issues around context and identifiers. Should content be included in all identifiers?
Implemented getUrl() for both FSCollection and FSResource. Tested. Implemented getting content as stream and bytes in FSResource. Untested.
Added the rest of the ContentHosting methods to status page. There are quite a few of them. It's nice to have a hobby like this one. Keeps me busy and out of trouble!
Jun. 4, 2006
Implemented:
- FSCollection.getMembers(),
- FSCollection.getMemberResources(),
- FSCollection.getBodySizeK().
Most of the basis methods in resource and collection are now implemented, except for properties. Since properties are to be saved in a file, we need a file based implmentation of entity.ResourceProperties. The name of resource properties are formed by replacing the file name of the resource's extension with ".properties".
It's not clear that collection properties are used in Sakai at this time, but clearly they could be useful. Since there is only one collection properties file in a given directory, it can be given a unique name, "collection.properties". As long as this file is filtered from the list of files in a directory, all will be fine.
Entity properties contain support for simple, multi-valued, and typed properties. Properties may be live, meaning that they are auto-saved once modified.
There are a number of convenience methods including in entity.ResourceProperites including:
Panel |
---|
getNamePropCreator(); |
Many of these have no right living in a generic service like entity. Recommend to Glenn that these be moved up into their respective modules.
Stubbed all of the methods of ResourceProperties in FSProperties. There is a basic implementation in the entity model called BaseResourceProperties. It appears that this class can be extended to handle all of the basic interaction cases, except loading and saving.
How are multi-value properties saved in a Properties object?
A: Value is stored as a List object (usually a list of strings).
There is a reference to formatted properties. How are they formatted?