com.google.gdata.model.atompub
Class Control

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.atompub.Control

public class Control
extends Element

Describes an Atom publication control status.


Field Summary
static ElementKey<java.lang.Void,Control> KEY
          The key for this element.
 
Constructor Summary
Control()
          Constructs an instance using the default key.
 
Method Summary
 Draft getDraft()
          Returns the draft tag.
 boolean hasDraft()
          Returns whether it has the draft tag.
 boolean isDraft()
          Checks the value of the app:draft tag.
 Control lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 void setDraft(boolean value)
          Sets the value of the app:draft tag.
 Control setDraft(Draft draft)
          Sets the draft tag.
 
Methods inherited from class com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,Control> KEY
The key for this element.

Constructor Detail

Control

public Control()
Constructs an instance using the default key.

Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public Control lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getDraft

public Draft getDraft()
Returns the draft tag.

Returns:
draft tag

setDraft

public Control setDraft(Draft draft)
Sets the draft tag.

Parameters:
draft - draft tag or null to reset
Returns:
this to enable chaining setters

hasDraft

public boolean hasDraft()
Returns whether it has the draft tag.

Returns:
whether it has the draft tag

isDraft

public boolean isDraft()
Checks the value of the app:draft tag.

Returns:
true if the entry is a draft (false by default as per RFC5023)

setDraft

public void setDraft(boolean value)
Sets the value of the app:draft tag.

Parameters:
value - sets the draft status to the specified value, false to clear.