Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Note

With the implementation of JSR-170 in the Sakai Content Hosting Service, the need for yet another implementation is unneeded.

Content Hosting (CH) is currently implemented via a two-tier set of objects: one to store content and properties in a datbase, the other to store content in files. If content is saved in files and properties are kept in the database, this presents a serious problem with resource integrity. For example, if a file is deleted in Sakai, and the user asks their IT people to restore it, the metadata is lost, potentially corrupting the Content Hosting system. Also, the implementation uses an internally defined method of naming files and directories that makes restoring files nearly impossible.

...

Save properties in a file called file-name.properties, where file name corresponds to the base file name. Filter out all files that end in .properties from the list of resources contained in a collection.

Attachments

Save attachement references in a file called file-name.attachments. Filter out all files that end in .attachments from the list of resoources in a collection. Note that attachments will appear as resources in the collection. This may or may not be a good thing. If undesired, resources can be moved to a shadow context with collection structures replicated from the resources. This isn't a very good solution either, since the whole point of this exercise is to make it easier to retrieve files from back up. Moving them to a different point in the directory structure doesn't make this any easier for an administrator. An alternative approach is to put attachments into an archive (zip, for example)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.

A base implementation of ResourceProperties exists in the entity model. An FSProperties will be created to extend this implementation primarily to handle storage into and out of a .properties file.

Attachments

Sakai content hosting supports the concept of resources having attachments. These attachments (like MIME attachments) are separate objects (files) that are appended (or attached) to the main resource. Three approaches to file-based attachments are being considered:

Locally Referenced Files

Attachment objects exist as local resources in the same collection. Attaching is accomplished either via a file-name.attachments file, or via multi-valued property in .properties (favored). While this is a simple approach, it does mean that attachment objects will be visible in tools that list files in a collection. Does the resource tool show attachments as files?

Files in Collections

Attachment objects could be contained in a special collection as a child of the current collection. This is a bit ugly, since these sub-collections either needed to be treated specially or filtered out. However, this roughly corresponds to the way JSR-170 handles attached objects.

Files in an Archive

Attachment objects could be contained in an archive format (like zip). Some overhead is added getting them in and out of the archive format.

Identifiers

Content resources are identified by a file name. In most cases, this name will have a file extention separated by a period, from which the MIME type may be deduced (via an extention map). All files also have a metadata file associated with it named the same, with a file extension of .properties. These properties may optionally be cached in a database to allow faster access to them.

...

Note: Sakai 2.2 defines a ContentEntity.

...

ContentCollection Methods

Method Name

Status

Notes

Entity methods

 getUrl();

(tick)

 

getLabelgetReference();

 (tick)

 

willArchiveMergegetUrl(root-prop);

 

 

willImport(2.2 method

getReference(root-prop);

 

 

archive2.2 method

getId();

 (tick)

 

mergegetProperties();

 

 

importEntitiestoXml();

 

 

parseEntityReference(); 

 

 

getEntityDescriptiongetMembers();

 

 

getEntityResourcePropertiesgetMemberResources();

 

 

getEntitygetBodySizeK();

 

 

getEntityUrlgetReleaseDate();

 

 

getEntityAuthzGroups2.2 method

getRetractDate();

 

 

Collection methods

 

 

allowAddCollection2.2 method

ContentCollectionEdit Methods

Method Name

Status

Notes

isActiveEdit();

 

 

addCollectiongetPropertiesEdit(id + props);

 

 

 

 

 

addCollectionsetReleaseDate(id);

 

 

allowGetCollection2.2 method

setRetractDate();

 

 

checkCollection2.2 method

ContentResource Methods

Method Name

Status

Notes

getUrl();

 (tick)

 

getCollectiongetReference();

(tick)

 

getCollectionSizegetUrl(root-prop);

 

 

getAllResources(2.2 method

getReference(root-prop);

 

 

allowUpdateCollection2.2 method

getId();

 (tick)

 

editCollectiongetProperties();

 

 

allowRemoveCollectiontoXml();

 

 

removeCollection(id); 

 

 

removeCollectiongetContentLength(obj);

 (tick)

 

commitCollectionString getContentType();

 

 

cancelCollectiongetContent();

 (tick)

 

getContainingCollectionIdgetReleaseDate();

 

 

getDepth2.2 method

getRetractDate();

 

 

isRootCollection2.2 method

streamContent();

(tick)

 

 

getCollectionMap

ContentResourceEdit Methods

Method Name

Status

Notes

isActiveEdit();

 

 

eliminateDuplicatesgetPropertiesEdit();

 

 

Resource methods 

 

 

allowAddResourcesetContentLength(String id);

 

 

addResourcesetContentType(id + stuff);

 

 

addResourcesetContent(id + collection + stuff);

 

 

addResourcesetReleaseDate(id);

 

 

allowUpdateResource2.2 method

setRetractDate();

 

2.2 method

ContentHostingService Methods

Method Name

Status

Notes

Entity methods

 

 

updateResourcegetLabel();

 

 

editResourcewillArchiveMerge();

 

 

allowGetResourcewillImport();

 

 

checkResourcearchive();

 

 

getResourcemerge();

(tick) 

 

allowRemoveResourceimportEntities();

 

 

removeResourceparseEntityReference(id);

 

 

removeResourcegetEntityDescription(obj);

 

 

allowRenamegetEntityResourceProperties();

 

 

renamegetEntity();

 

 

allowCopygetEntityUrl();

 

 

copygetEntityAuthzGroups();

 

 copyIntoFolder

Collection methods

 

 

allowAddCollection();

 

 

moveIntoFolderaddCollection(id + props);

 

 

commitResourceaddCollection(id);

 

 

commitResourceallowGetCollection(obj);

 

 

cancelResourcecheckCollection();

 

 

findResourcesgetCollection();

 (tick)

 Attachment methods

getCollectionSize();

 

 

allowAddAttachmentResourcegetAllResources();

 

 

isAttachmentResourceallowUpdateCollection();

addAttachmentResource(name + stuff);

addAttachmentResource(name + tool + stuff);

addAttachmentResource(name 

 

editCollection();

Property methods

 

 

allowGetPropertiesallowRemoveCollection();

 

 

getPropertiesremoveCollection(id);

 

 

allowAddPropertyremoveCollection(obj);

 

 

addPropertycommitCollection();

 

 

allowRemovePropertycancelCollection();

 

 

removePropertygetContainingCollectionId();

 

 

newResourcePropertiesgetDepth();

 

 Locking methods

isRootCollection();

 

 

getLocksgetCollectionMap();

 

 

lockObjecteliminateDuplicates();

 

 removeLock

();Resource methods

 

 

isLockedallowAddResource(String id);

 

 

containsLockedNodeaddResource(id + stuff);

 

 

removeAllLcksaddResource(id + collection + stuff);

 

 Dropbox methods

addResource(id);

 

 

createDropboxCollectionallowUpdateResource();

 

 

createDropboxCollectionupdateResource();

 

 

getDropboxCollectioneditResource();

 

 

getDropboxCollectionallowGetResource();

 

 

isDropboxMaintainercheckResource();

 

 

isDropboxMaintainergetResource();

 (tick)

 

getDropboxDisplayNameallowRemoveResource();

 

 

getDropboxDisplayNameremoveResource(id);

 

 Misc. methods

removeResource(obj);

 

 

getUuidallowRename();

 

 

resolveUuidrename();

 

 

getUrlallowCopy();

 

 

getReferencecopy();

 

 

getSiteCollectioncopyIntoFolder();

 

 

archiveResourcesmoveIntoFolder();

 

 

isPubViewcommitResource(id);

 

 

isInheritingPubViewcommitResource(obj);

 

 

setPubViewcancelResource();

 

 

ContentCollection Methods

Method Name

Status

Notes

getUrlfindResources();

(tick) 

 

getReference();

(tick)Attachment methods

 

 

getUrlallowAddAttachmentResource(root-prop);

 

2.2 method

getReference(root-prop 

isAttachmentResource();

 

2.2 method

getId( 

addAttachmentResource(name + stuff);

(tick) 

 

getPropertiesaddAttachmentResource(name + tool + stuff);

 

 

toXmladdAttachmentResource(name);

 

  

Property methods

 

 

getMembersallowGetProperties();

 

 

getMemberResourcesgetProperties();

 

 

getBodySizeKallowAddProperty();

 

 

getReleaseDateaddProperty();

 

2.2 method

getRetractDate 

Method Name

Status

Notes

allowRemoveProperty();

 

2.2 method

ContentCollectionEdit Methods

isActiveEdit 

removeProperty();

 

 

getPropertiesEditnewResourceProperties();

 

  

Locking methods

 

 

setReleaseDategetLocks();

 

2.2 method

setRetractDate 

Method Name

Status

Notes

lockObject();

 

2.2 method

ContentResource Methods

getUrl 

removeLock();

(tick) 

 

getReferenceisLocked();

(tick) 

 

getUrlcontainsLockedNode(root-prop);

 

2.2 method

getReference(root-prop 

removeAllLcks();

 

2.2 method

getId();

(tick) 

Dropbox methods

 

 

getPropertiescreateDropboxCollection();

 

 

toXmlcreateDropboxCollection();

 

  

getDropboxCollection();

 

 

getContentLengthgetDropboxCollection();

(tick) 

 

String getContentTypeisDropboxMaintainer();

 

 

getContentisDropboxMaintainer();

(tick) 

 

getReleaseDategetDropboxDisplayName();

 

2.2 method

getRetractDate 

getDropboxDisplayName();

 

 

2.2 method

streamContentMisc. methods

 

 

getUuid();

(tick) 

 

ContentResourceEdit Methods

Method Name

Status

Notes

isActiveEditresolveUuid();

 

 

getPropertiesEditgetUrl();

 

  

getReference();

 

 

setContentLengthgetSiteCollection();

 

 

setContentTypearchiveResources();

 

 

setContentisPubView();

 

 

setReleaseDateisInheritingPubView();

 

2.2 method

setRetractDate 

setPubView();

 

2.2 method 

You can track progress via my CH Project Notes.

...