|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.version.UpdateInfo
public class UpdateInfo
UpdateInfo
encapsulates the request body of an UPDATE request.
RFC 3253 defines the request body as follows:
<!ELEMENT update ANY> ANY value: A sequence of elements with at most one DAV:label-name or DAV:version element (but not both). In addition at one DAV:prop element can be present. <!ELEMENT version (href)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string prop: see RFC 2518, Section 12.11In order to reflect the complete range of version restoring and updating of nodes defined by JSR170 the definition has been extended:
<!ELEMENT update ( (version | label-name | workspace ) , (prop)?, (removeExisting)? ) > <!ELEMENT version (href+) > <!ELEMENT label-name (#PCDATA) > <!ELEMENT workspace (href) > <!ELEMENT prop ANY > <!ELEMENT removeExisting EMPTY >
Field Summary | |
---|---|
static int |
UPDATE_BY_LABEL
|
static int |
UPDATE_BY_VERSION
|
static int |
UPDATE_BY_WORKSPACE
|
Constructor Summary | |
---|---|
UpdateInfo(Element updateElement)
Create a new UpdateInfo object. |
|
UpdateInfo(String[] updateSource,
int updateType,
DavPropertyNameSet propertyNameSet)
|
Method Summary | |
---|---|
static Element |
createUpdateElement(String[] updateSource,
int updateType,
Document factory)
Factory method to create the basic structure of an UpdateInfo
object. |
String[] |
getLabelName()
|
DavPropertyNameSet |
getPropertyNameSet()
Returns a DavPropertyNameSet . |
Element |
getUpdateElement()
|
String[] |
getVersionHref()
|
String |
getWorkspaceHref()
|
Element |
toXml(Document document)
Returns the xml representation of the implementing object as Element . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UPDATE_BY_VERSION
public static final int UPDATE_BY_LABEL
public static final int UPDATE_BY_WORKSPACE
Constructor Detail |
---|
public UpdateInfo(String[] updateSource, int updateType, DavPropertyNameSet propertyNameSet)
public UpdateInfo(Element updateElement) throws DavException
UpdateInfo
object.
updateElement
-
DavException
- if the updateElement is null
or not a DAV:update element or if the element does not match the required
structure.Method Detail |
---|
public String[] getVersionHref()
public String[] getLabelName()
public String getWorkspaceHref()
public DavPropertyNameSet getPropertyNameSet()
DavPropertyNameSet
. If the DAV:update element contains
a DAV:prop child element the properties specified therein are included
in the set. Otherwise an empty set is returned.
WARNING: modifying the DavPropertyNameSet returned by this method does
not modify this UpdateInfo
.
public Element getUpdateElement()
public Element toXml(Document document)
XmlSerializable
Element
. The given Document
is used
as factory and represents the owner document
of the returned DOM element.
toXml
in interface XmlSerializable
document
-
XmlSerializable.toXml(Document)
public static Element createUpdateElement(String[] updateSource, int updateType, Document factory)
UpdateInfo
object.
updateSource
- updateType
- factory
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |