From: jamsden@us.ibm.com To: ietf-dav-versioning@w3.org Message-ID: <85256705.00478EB4.00@d54mta03.raleigh.ibm.com> Date: Tue, 26 Jan 1999 07:57:49 -0500 Subject: Re: testing, and Versioning Model Geoff, This mail got kicked back, so I'm sending it through ietf-dav-versioning to make sure you get it. For the rest on the group, this is a text sketch of the versioning/parallel development/CM model Geoff and I have been working on. It is a working document intended for our use that may not be comprehensible without the conversations we've been having to go along with it. The plan is to have some details added by our next meeting. ---------------------- Forwarded by Jim Amsden/Raleigh/IBM on 01/26/99 07:50 AM --------------------------- Jim Amsden 01/25/99 07:31 PM To: "Geoffrey M. Clemm" <gclemm@tantalum.atria.com> cc: Subject: Re: testing, and Versioning Model (Document link not converted) It made it. Here's my model so far. WebDAV Versioning Model This model is based on the scenarios in the Versioning Goals document. Only typical methods of Resource and Resource collection are include to set the context. There are many other possible methods. All the methods having anything to do with versioning, parallel development, and configuration management are included. Method names were chosen to reflect their semantics, not a particular implementation or protocol method. Arrays below are ment to indicate collections of the indicated object are returned, not necessarily that arrays are the implementation. Pre-defined types are consistent with Java just so I don't have to define them in the model. Objects: Resource byte[] getContents() setContents(byte[] newContents) MultiStatus getProperties() setProperty(String name, Element value) lock() unlock() boolean isCollection() checkIn(boolean isMutable) ----------------------------------- URL contents contentType properties ResourceCollection isA Resource ResourceCollection create() Resource[] getMembers() Reference isA Resource Resource getTarget() ----------------------------------- target VersionedResource isA Resource RevisionHistory getRevisionHistory((mutable | immutable | both)) Revision getRoot() ----------------------------------- rootRevision Revision isA WorkingResource String getRevisionId() Revision[] getDescendents() String[] getLabels() boolean hasLabel(String label) label(String label) boolean isMutable() checkout(boolean makeNewRevision, Activity activity) Activity[] getActivities() boolean hasActivity(String url) WorkingResource isA Resource Resource[] getAncestors() Activity getActivity() RevisionHistory isA Element LineOfDescent Derivation boolean isMutable() <!ELEMENT ConflictReport (ConflictEntry*)> <!ELEMENT ConflictEntry EMPTY> <!ATTLIST ConflictEntry source CDATA #REQUIRED target CDATA #REQUIRED > Configuration isA Activity -- a persistent Activity? Revision[] getMembers() addMember(Revision member) removeMember(Revision member) containsMember(Revision revision) Activity[] differencesWith(Configuration configuration) Workspace isA Resource VersionSelectionRule getRevisionSelectionRule() setRevisionSelectionRule(VersionSelectionRule selectionRule) Activity getCurrentActivity() setCurrentActivity(Activity value) Activity createActivity(url) Resource getResource(url) VersionedResource getVersionedResource(url) mergeActivity(Activity activity) ConflictReport getMergeConflicts(Activity activity) <!ELEMENT VersionSelectionRule ((configuration | activity | label | latest)*)> <!ELEMENT configuration (#PCDATA)> <!ELEMENT activity (label | latest)> <!ELEMENT label (#PCDATA)> <!ELEMENT latest EMPTY> Activity isA Resource Resoruce[] getMembers() boolean containsMember(Resource resource) Who lists activities in the repository? Who lists workspaces in the repository? Relationships: 1 ResourceCollection (parent) may contain many Resources (child) 1 Reference (link) refers to 1 Resource (target) Many Revisions (descendent) was-derived-from many Revisions (ancestor) through a Derivation 1 VersionedResource has 1 Revision (root) Many Workspaces resolve Many Resources 1 Workspace contains 1 CurrentActivity 1 Workspace contains 1 VersionSelectionRule 1 Activity contains Many WorkingRevisions Many Activities contain Many Revisions 1 WorkingRevision is-checkedout-in 1 Activity Semantics: Resource -------------- byte[] getContents() Get the contents of a resource. setContents(byte[] newContents) Set the contents of a resource to a new value. MultiStatus getProperties() Get the properties of a resource. setProperty(String name, Element value) Set the property of a resource. lock() unlock() boolean isCollection() checkIn(boolean isMutable) Checkin a working resource, or a resource that is not currently a versioned resource. Set its mutability as indicated. Sets the is-derived-from (isMutable false) or was-derived-from (isMutable true) relationship. ResourceCollection isA Resource -------------------------------------------------- ResourceCollection create() Resource[] getMembers() Reference isA Resource ------------------------------------- Resource getTarget() VersionedResource isA Resource --------------------------------------------------- RevisionHistory getRevisionHistory((mutable | immutable | both)) Revision getRoot() Revision isA WorkingResource ----------------------------------------------- String getRevisionId() Revision[] getDescendents() String[] getLabels() boolean hasLabel(String label) label(String label) boolean isMutable() checkout(boolean makeNewRevision, Activity activity) Checkout a revision in the given activity. The checkout fails if the resource is already checked out in that activity by some other user. If makeNewRevision is true, create a new revision that is a copy of the ancestor. Otherwise, just checkout in place. Checkout in place will fail if the resource is immutable. Activity[] getActivities() Get the activities this revision has been or is checked out in. Each activity represents a parallel development stream. boolean hasActivity(String url) WorkingResource isA Resource ------------------------------------------------ Resource[] getAncestors() Activity getActivity() RevisionHistory isA Element LineOfDescent Configuration isA Activity -- a persistent Activity? Revision[] getMembers() addMember(Revision member) removeMember(Revision member) containsMember(Revision revision) Activity[] differencesWith(Configuration configuration) Returns a collection of Activities containing revisions that are different in the source and target configurations. Workspace isA Resource -------------------------------------- VersionSelectionRule getRevisionSelectionRule() setRevisionSelectionRule(VersionSelectionRule selectionRule) Activity getCurrentActivity() setCurrentActivity(Activity value) Activity createActivity(url) Resource getResource(url) Resolve a resource URL in the context of this workspace and return the resource. It may be an unversioned resource, a working revision, or a mutable or immutable revision. VersionedResource getVersionedResource(url) mergeActivity(Activity activity) May want to leave this out as it will require interaction with a user and is therefore not applicable to a server. ConflictReport getMergeConflicts(Activity activity) Activity isA Resource ------------------------------- Resoruce[] getMembers() boolean containsMember(Resource resource) Who lists activities in the repository? Who lists workspaces in the repository? (are there well-known collections that contain these in the server?) Where and what is the default activity ("mainline"?) Where and what is the default workspace (has version selection rule is "latest", default activity is activity of ancestor or "mainline" if there is no ancestor?)