jcrwebdavread.docx

上传人:b****4 文档编号:12158357 上传时间:2023-04-17 格式:DOCX 页数:78 大小:40.68KB
下载 相关 举报
jcrwebdavread.docx_第1页
第1页 / 共78页
jcrwebdavread.docx_第2页
第2页 / 共78页
jcrwebdavread.docx_第3页
第3页 / 共78页
jcrwebdavread.docx_第4页
第4页 / 共78页
jcrwebdavread.docx_第5页
第5页 / 共78页
点击查看更多>>
下载资源
资源描述

jcrwebdavread.docx

《jcrwebdavread.docx》由会员分享,可在线阅读,更多相关《jcrwebdavread.docx(78页珍藏版)》请在冰豆网上搜索。

jcrwebdavread.docx

jcrwebdavread

1Introduction

ThisdocumentdescribeshowJSR170canberemotedviaHTTPusingthefunctionalitydescribedbyWebDAVcoveredbythefollowingRFCdocuments:

http:

//www.webdav.org/specs/rfc2518.html

http:

//www.webdav.org/specs/rfc3253.html

http:

//www.webdav.org/specs/rfc3648.html

http:

//greenbytes.de/tech/webdav/draft-reschke-webdav-search-latest.html

VariancestothelistedRFCdocumentsaremarkedthroughoutthedocument.AnimplementationoftheprotocoldescribedinthisdocumentisavailablefromtheApacheJackrabbitJCR-Serverproject.

2Protocol:

UsageofWebDAVMethodsdefinedbyRFC2518

2.1General

2.1.1NamespaceforJCRspecificextensions

ForJCRspecificextensionstotheWebDAVprotocolsuchasWebDAVpropertiesandXmlelements,thefollowingnamespaceisused:

Withinthisdocumentthisnamespaceisabbreviatedwiththe‘jcr’prefix.

2.2OPTIONS

Additionalmethodsandcomplianceclassesarelistedaccordingtotheiravailabilityonagivenresource.

2.3PROPFIND

ProvidesmetadataforresourcesaccordingtoRFC2518.

PropertiesfromRFC2518

seehttp:

//www.webdav.org/specs/rfc2518.html-dav.properties

2.3.1PropertiesfromRFC3252

NOTE:

propertiesrequiredforBASELINE,ACTIVITY,WORKING-RESOURCEandV-C-COLLECTIONfeaturesarenotlisted.

Namespace:

Name

Accessibility

Description

JCRequivalent

GeneralResource

DAV:

workspace

r

(protec.)

ELEMENTworkspace(href)>

 

TheDAV:

workspacepropertyofaworkspaceresourceMUSTidentifyitself.TheDAV:

workspacepropertyofanyothertypeofresourceMUSTbethesameastheDAV:

workspaceofitsparentcollection.

GeneralDeltaV-Resource

DAV:

supported-method-set

r

(protec.)

Calculatedonresource

-

DAV:

supported-live-property-set

r

(protec.)

Calculatedonresource

-

DAV:

comment

r

(protec.)

-

cannotberetrievedfromJCRversions

DAV:

creator-displayname

r

(protec.)

-

cannotberetrievedfromJCRversions

DAV:

supported-report-set

r

(protec.)

Calculatedonresource

-

GeneralVersion-ControlledResource

DAV:

version-history

r

(comp.)

Node.getVersionHistory().getPath()

DAV:

auto-version

ELEMENTauto-version(checkout-checkin|checkout-unlocked-checkin

|checkout|locked-checkout)?

>

ELEMENTcheckout-checkinEMPTY>

ELEMENTcheckout-unlocked-checkinEMPTY>

ELEMENTcheckoutEMPTY>

ELEMENTlocked-checkoutEMPTY>

DetermineshowaDeltaVservershouldtreatrequesttoVC-resourcesiftheclientdoesnotknowCHECKIN/CHECKOUT.

JCR:

emptyauto-versionproperty,forexplicitCHECKOUTisrequired.

Implementation:

r-only,serverdefined.

Checked-InVersion-ControlledResource

DAV:

checked-in

r

(protec.)

ELEMENTchecked-out(href)>

wherehrefpointstothebaseversion

Node.isCheckedOut()

Node.getBaseVersion()

Checked-OutVersion-ControlledResource

DAV:

checked-out

r

(protec.)

ELEMENTchecked-out(href)>

wherehrefpointstothebaseversion

Node.isCheckedOut()

Node.getBaseVersion()

DAV:

predecessor-set

r/w

Onchecked-outVC-resourcethispropertydeterminestheDAV:

predecessor-setpropertyoftheversionthatresultsfromcheckinginthisresource.

Node.getProperty(“jcr:

Predecessors”)

Note:

JCRdoesnotallowtosetthepredecessor-set.howeverthatpropertyisusedtoresolvemergeconflicts.

see:

ResolvingMergeConflicts

DAV:

checkout-fork

-

NOTIMPLEMENTED

DAV:

checkin-fork

-

NOTIMPLEMENTED

DAV:

merge-set

r,w

Listsmergesourceswhosemergebehaviourcannotberesolvedunambiguously(IfDAV:

no-auto-mergeisset).

NOcorrespondence.

no-auto-mergewouldcorrespondtoMERGEwithbestEffort=falsewhichresultsinMergeExceptiononanyfailure.

DAV:

auto-merge-set

r,w

Listsmergesourceswhosemergebehaviourcannotberesolvedunambiguously(IfDAV:

no-auto-mergeisNOTset).

jcr:

mergeFailedproperty.

MERGEwithbestEffort=true

VersionResource

DAV:

predecessor-set

r

(protec.)

OnaVersion-resourcethispropertyidentifieseachpredecessorofthisversion

PathsofVersion.getPrecessors()

DAV:

successor-set

r

(comp.)

OnaVersion-resourcethispropertyidentifieseachversionthathasthisversionbeingpartofit’sDAV:

predecessor-set.

PathsofVersion.getSuccessors()

DAV:

checkout-set

(comp.)

OnaVersionresourcethispropertyidentifieseachchecked-outresourcewhoseDAV:

checked-outpropertyidentifiesthisversion.

RetrievedbyfollowingtheReferencesoftheVersion-Nodeanddisplaythosethatareoriginatingfromthejcr:

baseVersionpropertyofachecked-outnode.

DAV:

version-name

Aserver-definedstringthatisdifferentforeachversioninagivenversionhistory

Version.getName()

DAV:

checkout-fork

-

NOTIMPLEMENTED

DAV:

checkin-fork

-

NOTIMPLEMENTED

DAV:

version-history

(comp.)

PathofhistoryretrievedbyVersion.getContainingVersionHistory()

DAV:

label-name-set

r

(protec.)

Thispropertycontainsthelabelsthatcurrentlyselectthisversion.

Version.getVersionLabels()

Version-HistoryResource

DAV:

version-set

r

(protec.)

OnaVersion-resourcethispropertyidentifieseachpredecessorofthisversion

PathsofVersionHistory.getVersions()

DAV:

root-version

VersionHistory.getRootVersion().getPath()

WorkspaceResource

DAV:

workspace-checkout-set)

 

r

(protec.)

ELEMENTworkspace-checkout-set(href*)>

 

containingallchecked-outresources.

NOTIMPLEMENTED

2.3.2PropertiesfromRFC3648

Namespace:

Name

Accessibility

Description

JCRequivalent

DAV:

ordering-type

r

(protec.)

Indicatestheorderingtypeofagivenresource.AtthemomenttheonlypossiblevalueisDAV:

custom,indicatingthattheresourceallowsreorderingofitsinternalmembers.

Node.getPrimaryType().

hasOrderableChildNodes()

DAV:

supported-method-set

r

(protec.)

Calculatedonresources

-

DAV:

supported-live-property-set

r

(protec.)

Calculatedonresources

NOTIMPLEMENTEDYET

2.3.3PropertiesrelatedtoSEARCH

Namespace:

Name

Accessibility

Description

DAV:

supported-query-grammar-set

r

(protec.)

QueryManager.getSupportedQueryLanguages()

2.3.4JCRitemspecificproperties

Namespace:

Name

Description

Non-Collection

Collection

jcr:

name

r

Item.getName()

x

x

jcr:

path

r

Item.getPath()

x

x

jcr:

depth

r

Item.getDepth()

x

x

jcr:

type

r

Property.getType()

x

jcr:

value

r,w

Property.getValue()

x

jcr:

values

r,w

Property.getValues()

x

jcr:

length

r

(protec.)

Property.getLength()

x

jcr:

lengths

r

(protec.)

Property.getLengths()

x

jcr:

primarynodetype

r

(woncreationwithMKCOL)

Node.getPrimaryNodeType().

getName()

x

jcr:

mixinnodetypes

r,w

Node.getMixinNodeTypes(),Node.addMixin(String),Node.removeMixin(String)

x

jcr:

index

r

(protec.)

Node.getIndex()

x

jcr:

references

r

(protec.)

Node.getReferences()

x

jcr:

uuid

r

(protec.)

Node.getUUID

x

jcr:

primaryitem

r

(protec.)

Node.getPrimaryItem()

x

jcr:

isnew

r

(protec.)

Item.isNew()

x

x

jcr:

ismodified

r

(protec.)

Item.isModified()

x

x

jcr:

definition

r

(protec.)

Node.getDefinition

Property.getDefinition

x

x

jcr:

namespaces

r,w

Workspace.getNamespaceRegistry()

NamespaceRegistry....

x(Workspace)

jcr:

versionableuuid

r

(protec.)

VersionHistory.getVersionableUUID()

x(VersionHistory)

2.4HEAD

AsdefinedwithRFC2518.

2.5GET

2.5.1GETonresourcesrepresentingaProperty

AGETrequestonanon-collectionresource(i.e.aJCR-Property)willreturnthevalueofthatproperty(equivalenttojavax.jcr.Property.getValue().getStream()orjavax.jcr.Property.getStream()respectively).

SincegetValue()willfailformultivalueproperties,GETwillnotrevealanydetailsonthoseproperties.InsteadPROPFINDforjcr:

values,jcr:

lengthsandjcr:

typearethepropermeanstodeterminthecharacteristicsofamultivalueproperty.

ThesameappliesforPUT.

2.5.2GEToncollections(representingNodes)

AGETrequestonacollectionresourcewillprovidethenon-recursivesystemviewofthegivennodeasitisprovidedbySession.exportSysView.BinaryJCRpropertieswillnotbeskipped.

Example

GET/bar-node/HTTP/1.1

Host:

Content-Type:

xxx;charset="xxx"

Content-Length:

xxxx

#response:

HTTP/1.1200OK

Content-Type:

text/xml;charset="utf-8"

Content-Length:

xxxx

xmlversion="1.0"encoding="UTF-8"?

>

nodesv:

name="bar-node"xmlns:

jcr="http:

//www.jcp.org/jcr/1.0"

xmlns:

mix="http:

//www.jcp.org/jcr/mix/1.0"

xmlns:

rep="internal"

xmlns:

nt="http:

//www.jcp.org/jcr/nt/1.0"

xmlns:

xs="http:

//www.w3.org/2001/XMLSchema"

xmlns:

fn="http:

//www.w3.org/2004/10/xpath-functions"

xmlns:

sv="http:

//www.jcp.org/jcr/sv/1.0"

xmlns=""

xmlns:

jcrfn="http:

//www.jcp.org/jcr/xpath-functions/1.0">

propertysv:

name="jcr:

primaryType"sv:

type="Name">

value>nt:

unstructured

value>

property>

propertysv:

name="jcr:

uuid"sv:

type="String">

value>b0b7b63e-1692-4c42-b579-b1f43c3f1001

value>

property>

propertysv:

name="jcr:

predecessors"sv:

type="Reference">

value>56abd345-59da-4327-b3a7-324918167ad1

value>

property>

propertysv:

name="bin-prop"sv:

type="Binary">

value>R0lGODlhBAAHAPEAAP////8A/wAAAAAAACH5BAEAAAIALAAAAA

AEAAcAAAIIjB4maeyrlCgAOw==

value>

property>

propertysv:

name="longs"sv:

type="Long">

value>22222222

value>

value>3333333333

value>

property>

node>

3Protocol:

UsageofWebDAVMethodsDefinedbyRFC3648

3.1ORDERPATCH

Usedinordertodefinetheorderingoforderablechildnodes.TherequestfollowstherequirementsofRFC3648withoneexception:

TheorderingtypecanonlybeDAV:

custom,fortheJCRspecificationdoesnotallowforparticularorderingrules.

Seealso:

7.3OrderingNodesandRFC3648section7.

Example

ORDERPATCH/default/coll-1/HTTP/1.1

Host:

Conte

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1