|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.version.LabelInfo
public class 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: stringPlease note, that the given implementation only recognizes the predefined elements 'add', 'set' and 'remove'.
Field Summary | |
---|---|
static int |
TYPE_ADD
|
static int |
TYPE_REMOVE
|
static int |
TYPE_SET
|
static String[] |
typeNames
|
Constructor Summary | |
---|---|
LabelInfo(Element labelElement)
Create a new LabelInfo from the given element. |
|
LabelInfo(Element labelElement,
int depth)
Create a new LabelInfo from the given element and depth
integer. |
|
LabelInfo(String labelName,
int type)
|
|
LabelInfo(String labelName,
int type,
int depth)
|
|
LabelInfo(String labelName,
String type)
|
Method Summary | |
---|---|
int |
getDepth()
Return the depth |
String |
getLabelName()
Return the text present inside the 'DAV:label-name' element or null |
int |
getType()
Return the type of the LABEL request. |
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 TYPE_SET
public static final int TYPE_REMOVE
public static final int TYPE_ADD
public static String[] typeNames
Constructor Detail |
---|
public LabelInfo(String labelName, String type)
public LabelInfo(String labelName, int type)
public LabelInfo(String labelName, int type, int depth)
public LabelInfo(Element labelElement, int depth) throws DavException
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
-
DavException
- 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(Element labelElement) throws DavException
LabelInfo
from the given element. As depth
the default value 0 is assumed.
labelElement
-
DavException
LabelInfo(org.w3c.dom.Element, int)
Method Detail |
---|
public String getLabelName()
null
null
public int getType()
TYPE_SET
,
TYPE_ADD
or TYPE_REMOVE
.
public int getDepth()
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |