public class

Control

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.atompub.Control

Class Overview

Describes an Atom publication control status.

Summary

Fields
public static final ElementKey<Void, Control> KEY The key for this element.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
Control()
Constructs an instance using the default key.
Protected Constructors
Control(ElementKey<?, ? extends Control> key)
Subclass constructor, allows subclasses to supply their own element key.
Control(ElementKey<?, ? extends Control> key, Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance.
Public Methods
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.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final ElementKey<Void, Control> KEY

The key for this element.

Public Constructors

public Control ()

Constructs an instance using the default key.

Protected Constructors

protected Control (ElementKey<?, ? extends Control> key)

Subclass constructor, allows subclasses to supply their own element key.

Parameters
key

protected Control (ElementKey<?, ? extends Control> key, Element source)

Constructs a new instance by doing a shallow copy of data from an existing Element instance. Will use the given ElementKey as the key for the element. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use createElement(ElementKey, Element).

Parameters
key The key to use for this element.
source Source element

Public Methods

public Draft getDraft ()

Returns the draft tag.

Returns
  • draft tag

public boolean hasDraft ()

Returns whether it has the draft tag.

Returns
  • whether it has the draft tag

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)

public Control lock ()

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.

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

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.

public Control setDraft (Draft draft)

Sets the draft tag.

Parameters
draft Draft tag or null to reset
Returns
  • this to enable chaining setters