You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Angela Schreiber <an...@day.com> on 2006/01/05 12:54:46 UTC
Jcr-Server: Information about changes
hi all
as stated in JCR-258 i made some effort to remove
the jdom dependency from the jcr-server contrib.
see also JCR-54 for the corresponding issue in the
jackrabbit core.
this led to some changes in the webdav-library regarding
the xml handling (the library interfaces and classes now
implementing a common interface with a single 'toXml'
method).
furthermore i removed the XmlUtil.java class from the util
package and added all Xml related utilities to a new xml
package. the new package mainly contains utility classes
such as a replacement for the jdom.Namespace and a DomUtil
class, that allowed to easier switch over to w3c.dom.
in addition i addressed some minor issues:
- JCR-295: usage of Cache-Control header
- JCR-297: log output while parsing xml
- DavServletRequest, OrderingDavServletRequest: allow
the methods involved with parsing the xml to throw
DavException if the request body is obviously wrong.
- DavPropertySet and DavPropertyNameSet are modified to
share a common base class (PropContainer). The reason
for this was, that RFC2518 defines a single DAV:prop
element that may contain properties or propertynames
only.
- MultiStatusResponse: closer to the definition of RFC2518
where a response may either contain href + propstat
or href + status. before this was not asserted by the
implementation.
- MultiStatus: use map to collect the contained response
elements instead of list in order to avoid a single
href to occur multiple times.
- webdav.header: a common interface and some additional
implementations
- server.io.ExportContextImpl: assert that the stream
obtained by getOutputStream is properly closed. this
also allows to retrieve the contentlength.
- removal of * imports
i let litmus run and there were no additional tests failing
(see attached txt file). in addition i performed a few basic
test for features not covered by litmus.
if nobody objects i will commit my changes next week.
regards
angela
Jcr-Server: API changes with rev. 368683
Posted by Angela Schreiber <an...@day.com>.
hi
as announced last week JDOM dependency has been
removed from jcr-server contribution which led
to changes in the webDAV library. in addition
a couple of minor issues has been addressed.
see below for a short description of the changes.
corresponding jira issues:
JCR-258: https://issues.apache.org/jira/browse/JCR-258
JCR-295: https://issues.apache.org/jira/browse/JCR-295
JCR-297: https://issues.apache.org/jira/browse/JCR-297
announcing mail:
http://www.mail-archive.com/jackrabbit-dev%40incubator.apache.org/msg04037.html
kind regards
angela
short discussion of changes:
JCR-258
------------------------------------------------------
- common interface XmlSerializable implemented by
all dav-library classes that form part of a xml
response or request body.
- the interface currently defines a single method
toXml that takes a w3c.dom.Document in its function
as factory as param and returns an w3c.dom Element.
- consistency of xml deserialization is not completed
yet. generally, a static 'createFromXml' method is
used to parse a single xml element, whereas a
separate constructor is available if additional
parameters such as headers are involved.
- a couple of helper classes were created in order
make the switch from jdom to w3c.dom easier.
- methods present in util.XmlUtil were moved to
the xml.DomUtil helper class that provides additional
dom-specific utitilies. XmlUtil got removed.
JCR-295
-----------------------------------------------------
- the Cache-Control header is not set by default
any more but only for those DeltaV-methods where
the header is required by the RFC.
- the reason for the change was an issue with IE
and http1.1 responses containing the Cache-Control
header.
JCR-297
-----------------------------------------------------
- no attempt is made to parse the request body if the
contentlength header is present and indicates a
length of 0.
- note, that this will only avoid parser failure for
this unambigous case. parsing may still fail and
produce log-output, if in turn the contentlength
is not available or cannot be determined in advance.
DavServletRequest, OrderingDavServletRequest
-----------------------------------------------------
- if the result of parsing a propfind/proppatch/orderpatch
request body is obviously wrong, the methods involved
may now throw a DavException.
- TODO: this change should be applied consistently
to all methods involved with request parsing.
Property / PropertyNames
-----------------------------------------------------
- PropContainer as common base class for DavPropertySet
and DavPropertyNameSet.
- new interface DavPropertyNameIterator
- new LabelSetProperty (previously used DefaultDavProperty)
MultiStatus/MultiStatusResponse
------------------------------------------------------
- avoid multiple ms-responses for the same resource href
- assert that a response either contains propstat or
a status.
- TODO: RFC 2518 defines that multiple hrefs can be
combined with a single status in a ms-response.
Header
------------------------------------------------------
- new common interface Header for the classes present
in the oaj.webdav.header package.
Report
------------------------------------------------------
- fixed response status code for the Reports defined
by RFC3253 (was 200 instead of 217)
- since MultiStatus response is not mandatory for a
Report except if the report is applied to multiple
resources using the depth header, the Report inter-
face now reveales whether the xml representation should
be treated as multistatus response.
- Report interface and implementation reworked. before
basic errors where detected on toXml only.
misc
------------------------------------------------------
- removal of * imports
- server.io.ExportContextImpl: assert that the stream
obtained by getOutputStream is properly closed. this
also allows to properly retrieve (and set) the
response contentlength.
Re: Jcr-Server: Information about changes
Posted by Brian Moseley <bc...@maz.org>.
On 1/5/06, Angela Schreiber <an...@day.com> wrote:
> if nobody objects i will commit my changes next week.
sounds good to me.