Differences between revisions 10 and 11
Revision 10 as of 2007-02-17 11:40:02
Size: 2502
Editor: MartinHolz
Comment:
Revision 11 as of 2009-09-20 22:02:40
Size: 2510
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
 * Sequence Store: [http://www.mail-archive.com/slide-dev%40jakarta.apache.org/msg09824.html the motivation] behind it.  * Sequence Store: [[http://www.mail-archive.com/slide-dev%40jakarta.apache.org/msg09824.html|the motivation]] behind it.
Line 14: Line 14:
   This store works with [http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionDescriptor.html NodeRevisionDescriptor] and [http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionNumber.html NodeRevisionNumber] objects.    This store works with [[http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionDescriptor.html|NodeRevisionDescriptor]] and [[http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionNumber.html|NodeRevisionNumber]] objects.
Line 20: Line 20:
   A store for managing NodeRevisionDescriptors. Here is a brief description of the arguments to the [http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionDescriptors.html NodeRevisionDescriptors] class: .    A store for managing NodeRevisionDescriptors. Here is a brief description of the arguments to the [[http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/NodeRevisionDescriptors.html|NodeRevisionDescriptors]] class: .

Getting Started on a Custom Store

Some Things It Took Awhile to Figure Out

RevisionDescriptorStore

  • This store works with NodeRevisionDescriptor and NodeRevisionNumber objects.

    When creating a new NodeRevisionDescriptor the keys in the properties Hashtable must be equal to the namespace of the NodeProperty plus the name of the NodeProperty.

    • ex: (namespace = "DAV:") + (name = "getlastmodified") = (key = "DAV:getlastmodified")

RevisionDescriptorsStore

  • A store for managing NodeRevisionDescriptors. Here is a brief description of the arguments to the NodeRevisionDescriptors class: .

  • uri

    • The path to the resource. eg: /slide/files/test/foo.txt

  • initialRevision

    • FIXME: I don't know what this is for, but an empty NodeRevisionNumber seems to work.

  • workingRevisions

    • FIXME: I don't know what this is for. A Hashtable with the format key = String, value = NodeRevisionNumber works.

  • latestRevisionNumbers

    • A Hashtable with the format key = branch name (String), value = NodeRevisionNumber where the value is the largest revision number for this Uri. The default branch name is "main" if you just need something to put there.

  • branches

    • A Hashtable with the format key = branch name (String), value = Vector of NodeRevisionNumbers where the Vector contains all of the revision numbers for this Uri that are older than the current revision number.

  • isVersioned

    • boolean indicating whether or not this resource is versioned.

All

  • If you make a read-only store throw exceptions on the create/store methods, you won't be able to get the root node of the store to show up in a directory listing. Throwing the exception prevents the child binding from being set for the "/" SubjectNode.

CreateNewSlideStore (last edited 2009-09-20 22:02:40 by localhost)