|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.version.LabelInfo
LabelInfo
encapsulates the request body of a LABEL request
used to add, set or remove a label from the requested version resource or
from that version specified with the Label header in case the requested resource
is a version-controlled resource.
The request body (thus the 'labelElement' passed to the constructore must be
a DAV:label element:
<!ELEMENT label ANY> ANY value: A sequence of elements with at most one DAV:add, DAV:set, or DAV:remove element. <!ELEMENT add (label-name)> <!ELEMENT set (label-name)> <!ELEMENT remove (label-name)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string
Field Summary | |
static int |
TYPE_ADD
|
static int |
TYPE_REMOVE
|
static int |
TYPE_SET
|
Constructor Summary | |
LabelInfo(org.jdom.Element labelElement)
Create a new LabelInfo from the given element. |
|
LabelInfo(org.jdom.Element labelElement,
int depth)
Create a new LabelInfo from the given element and depth
integer. |
Method Summary | |
int |
getDepth()
Return the depth |
org.jdom.Element |
getLabelElement()
Return the DAV:label element |
String |
getLabelName()
Return the 'label-name' or null |
int |
getType()
Return the type of the LABEL request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_SET
public static final int TYPE_REMOVE
public static final int TYPE_ADD
Constructor Detail |
public LabelInfo(org.jdom.Element labelElement, int depth)
LabelInfo
from the given element and depth
integer. If the specified Xml element does have a DeltaVConstants.XML_LABEL
root element or no label name is specified with the action to perform
the creation will fail.
labelElement
- depth
-
IllegalArgumentException
- if the specified element does not
start with a DeltaVConstants.XML_LABEL
element or if the DAV:label
element contains illegal instructions e.g. contains multiple DAV:add, DAV:set
or DAV:remove elements.public LabelInfo(org.jdom.Element labelElement)
LabelInfo
from the given element. As depth
the default value 0 is assumed.
labelElement
-
IllegalArgumentException
LabelInfo(org.jdom.Element, int)
Method Detail |
public String getLabelName()
null
null
public int getType()
TYPE_SET
,
TYPE_ADD
or TYPE_REMOVE
.
public int getDepth()
public org.jdom.Element getLabelElement()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |