1、jcrwebdavread1 IntroductionThis document describes how JSR170 can be remoted via HTTP using the functionality described by WebDAV covered by the following RFC documents:http:/www.webdav.org/specs/rfc2518.htmlhttp:/www.webdav.org/specs/rfc3253.htmlhttp:/www.webdav.org/specs/rfc3648.htmlhttp:/greenbyt
2、es.de/tech/webdav/draft-reschke-webdav-search-latest.htmlVariances to the listed RFC documents are marked throughout the document. An implementation of the protocol described in this document is available from the Apache Jackrabbit JCR-Server project.2 Protocol: Usage of WebDAV Methods defined by RF
3、C 25182.1 General2.1.1 Namespace for JCR specific extensionsFor JCR specific extensions to the WebDAV protocol such as WebDAV properties and Xml elements, the following namespace is used: Within this document this namespace is abbreviated with the jcr prefix.2.2 OPTIONSAdditional methods and complia
4、nce classes are listed according to their availability on a given resource.2.3 PROPFINDProvides meta data for resources according to RFC2518.Properties from RFC 2518 see http:/www.webdav.org/specs/rfc2518.html - dav.properties2.3.1 Properties from RFC3252NOTE: properties required for BASELINE, ACTIV
5、ITY, WORKING-RESOURCE and V-C-COLLECTION features are not listed.Namespace:NameAccessibilityDescriptionJCR equivalentGeneral Resource DAV:workspacer (protec.) The DAV:workspace property of a workspace resource MUST identify itself. The DAV:workspace property of any other type of resource MUST be the
6、 same as the DAV:workspace of its parent collection.General DeltaV-ResourceDAV:supported-method-setr(protec.)Calculated on resource-DAV:supported-live-property-setr(protec.)Calculated on resource-DAV:commentr(protec.)-cannot be retrieved from JCR versionsDAV:creator-displaynamer(protec.)-cannot be r
7、etrieved from JCR versionsDAV:supported-report-setr(protec.)Calculated on resource-General Version-Controlled ResourceDAV:version-historyr(comp.)Node.getVersionHistory().getPath()DAV:auto-version Determines how a DeltaV server should treat request to VC-resources if the client does not know CHECKIN/
8、CHECKOUT.JCR: empty auto-version property, for explicit CHECKOUT is required.Implementation: r-only, server defined.Checked-In Version-Controlled ResourceDAV:checked-inr(protec.) where href points to the base versionNode.isCheckedOut()Node.getBaseVersion()Checked-Out Version-Controlled ResourceDAV:c
9、hecked-outr(protec.) where href points to the base versionNode.isCheckedOut()Node.getBaseVersion()DAV:predecessor-setr/wOn checked-out VC-resource this property determines the DAV:predecessor-set property of the version that results from checking in this resource.Node.getProperty(“jcr:Predecessors”)
10、Note: JCR does not allow to set the predecessor-set. however that property is used to resolve merge conflicts.see: Resolving Merge ConflictsDAV:checkout-fork-NOT IMPLEMENTEDDAV:checkin-fork-NOT IMPLEMENTEDDAV:merge-setr, wLists merge sources whose merge behaviour cannot be resolved unambiguously (If
11、 DAV:no-auto-merge is set).NO correspondence.no-auto-merge would correspond to MERGE with bestEffort=false which results in MergeException on any failure.DAV:auto-merge-setr, wLists merge sources whose merge behaviour cannot be resolved unambiguously (If DAV:no-auto-merge is NOT set).jcr:mergeFailed
12、 property.MERGE with bestEffort=trueVersion ResourceDAV:predecessor-setr(protec.)On a Version-resource this property identifies each predecessor of this versionPaths of Version.getPrecessors()DAV:successor-setr(comp.)On a Version-resource this property identifies each version that has this version b
13、eing part of its DAV:predecessor-set.Paths of Version.getSuccessors()DAV:checkout-set(comp.)On a Version resource this property identifies each checked-out resource whose DAV:checked-out property identifies this version.Retrieved by following the References of the Version-Node and display those that
14、 are originating from the jcr:baseVersion property of a checked-out node.DAV:version-nameA server-defined string that is different for each version in a given version historyVersion.getName()DAV:checkout-fork-NOT IMPLEMENTEDDAV:checkin-fork-NOT IMPLEMENTEDDAV:version-history(comp.)Path of history re
15、trieved by Version.getContainingVersionHistory()DAV:label-name-setr(protec.)This property contains the labels that currently select this version.Version.getVersionLabels()Version-History ResourceDAV:version-setr(protec.)On a Version-resource this property identifies each predecessor of this versionP
16、aths of VersionHistory.getVersions()DAV:root-versionVersionHistory.getRootVersion().getPath()Workspace ResourceDAV:workspace-checkout-set ) r(protec.) containing all checked-out resources.NOT IMPLEMENTED2.3.2 Properties from RFC3648Namespace:NameAccessibilityDescriptionJCR equivalentDAV:ordering-typ
17、er(protec.)Indicates the ordering type of a given resource. At the moment the only possible value is DAV:custom, indicating that the resource allows reordering of its internal members.Node.getPrimaryType().hasOrderableChildNodes()DAV:supported-method-setr(protec.)Calculated on resources-DAV:supporte
18、d-live-property-setr(protec.)Calculated on resourcesNOT IMPLEMENTED YET2.3.3 Properties related to SEARCHNamespace:NameAccessibilityDescription DAV:supported-query-grammar-setr(protec.)QueryManager.getSupportedQueryLanguages()2.3.4 JCR item specific propertiesNamespace:NameDescription Non-Collection
19、Collectionjcr:namer Item.getName()xxjcr:pathrItem.getPath()xxjcr:depthrItem.getDepth()xxjcr:typerProperty.getType()xjcr:valuer, wProperty.getValue()xjcr:valuesr, wProperty.getValues()xjcr:lengthr (protec.)Property.getLength()xjcr:lengthsr (protec.)Property.getLengths()xjcr:primarynodetyper(w on crea
20、tion with MKCOL)Node.getPrimaryNodeType().getName()xjcr:mixinnodetypesr, wNode.getMixinNodeTypes(), Node.addMixin(String), Node.removeMixin(String)xjcr:indexr(protec.)Node.getIndex()xjcr:referencesr(protec.)Node.getReferences()xjcr:uuidr(protec.)Node.getUUIDxjcr:primaryitemr(protec.)Node.getPrimaryI
21、tem()xjcr:isnewr (protec.)Item.isNew()xxjcr:ismodifiedr (protec.)Item.isModified()xxjcr:definitionr(protec.)Node.getDefinitionProperty.getDefinitionxxjcr:namespacesr, wWorkspace.getNamespaceRegistry()NamespaceRegistry.x (Workspace)jcr:versionableuuidr(protec.)VersionHistory.getVersionableUUID()x (Ve
22、rsionHistory)2.4 HEADAs defined with RFC 2518.2.5 GET2.5.1 GET on resources representing a Property A GET request on a non-collection resource (i.e. a JCR-Property) will return the value of that property (equivalent to javax.jcr.Property.getValue().getStream() or javax.jcr.Property.getStream() respe
23、ctively).Since getValue() will fail for multivalue properties, GET will not reveal any details on those properties. Instead PROPFIND for jcr:values, jcr:lengths and jcr:type are the proper means to determin the characteristics of a multivalue property.The same applies for PUT.2.5.2 GET on collection
24、s (representing Nodes)A GET request on a collection resource will provide the non-recursive system view of the given node as it is provided by Session.exportSysView. Binary JCR properties will not be skipped.Example GET /bar-node/ HTTP/1.1 Host: Content-Type: xxx; charset=xxx Content-Length: xxxx #
25、response: HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: xxxx nt:unstructured b0b7b63e-1692-4c42-b579-b1f43c3f1001 56abd345-59da-4327-b3a7-324918167ad1 R0lGODlhBAAHAPEAAP/8A/wAAAAAAACH5BAEAAAIALAAAAA AEAAcAAAIIjB4maeyrlCgAOw= 22222222 3333333333 3 Protocol: Usage of WebDAV Met
26、hods Defined by RFC 36483.1 ORDERPATCHUsed in order to define the ordering of orderable child nodes. The request follows the requirements of RFC3648 with one exception: The ordering type can only be DAV:custom, for the JCR specification does not allow for particular ordering rules.See also: 7.3 Ordering Nodes and RFC3648 section 7.Example ORDERPATCH /default/coll-1/ HTTP/1.1 Host: Conte
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1