public class

Goal

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.analytics.Goal

Class Overview

Google Analytics goal.

Summary

Constants
String ACTIVE XML "active" attribute name
String NAME XML "name" attribute name
String NUMBER XML "number" attribute name
String VALUE XML "value" attribute name
String XML_NAME XML element name
Fields
private Boolean active Whether the goal is currently active
private String name Goal's name
private Integer number Goal's number
private Double value Goal's monetary value
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Goal()
Default mutable constructor.
Goal(Boolean active, String name, Integer number, Double value)
Immutable constructor.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
Boolean getActive()
Returns the whether the goal is currently active.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
Destination getDestination()
Returns the destination.
Engagement getEngagement()
Returns the engagement.
String getName()
Returns the goal's name.
Integer getNumber()
Returns the goal's number.
Double getValue()
Returns the goal's monetary value.
boolean hasActive()
Returns whether it has the whether the goal is currently active.
boolean hasDestination()
Returns whether it has the destination.
boolean hasEngagement()
Returns whether it has the engagement.
boolean hasName()
Returns whether it has the goal's name.
boolean hasNumber()
Returns whether it has the goal's number.
boolean hasValue()
Returns whether it has the goal's monetary value.
void setActive(Boolean active)
Sets the whether the goal is currently active.
void setDestination(Destination destination)
Sets the destination.
void setEngagement(Engagement engagement)
Sets the engagement.
void setName(String name)
Sets the goal's name.
void setNumber(Integer number)
Sets the goal's number.
void setValue(Double value)
Sets the goal's monetary value.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String ACTIVE

XML "active" attribute name

Constant Value: "active"

private static final String NAME

XML "name" attribute name

Constant Value: "name"

private static final String NUMBER

XML "number" attribute name

Constant Value: "number"

private static final String VALUE

XML "value" attribute name

Constant Value: "value"

static final String XML_NAME

XML element name

Constant Value: "goal"

Fields

private Boolean active

Whether the goal is currently active

private String name

Goal's name

private Integer number

Goal's number

private Double value

Goal's monetary value

Public Constructors

public Goal ()

Default mutable constructor.

public Goal (Boolean active, String name, Integer number, Double value)

Immutable constructor.

Parameters
active Whether the goal is currently active.
name Goal's name.
number Goal's number.
value Goal's monetary value.

Public Methods

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public Boolean getActive ()

Returns the whether the goal is currently active.

Returns
  • whether the goal is currently active

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public Destination getDestination ()

Returns the destination.

Returns
  • destination

public Engagement getEngagement ()

Returns the engagement.

Returns
  • engagement

public String getName ()

Returns the goal's name.

Returns
  • goal's name

public Integer getNumber ()

Returns the goal's number.

Returns
  • goal's number

public Double getValue ()

Returns the goal's monetary value.

Returns
  • goal's monetary value

public boolean hasActive ()

Returns whether it has the whether the goal is currently active.

Returns
  • whether it has the whether the goal is currently active

public boolean hasDestination ()

Returns whether it has the destination.

Returns
  • whether it has the destination

public boolean hasEngagement ()

Returns whether it has the engagement.

Returns
  • whether it has the engagement

public boolean hasName ()

Returns whether it has the goal's name.

Returns
  • whether it has the goal's name

public boolean hasNumber ()

Returns whether it has the goal's number.

Returns
  • whether it has the goal's number

public boolean hasValue ()

Returns whether it has the goal's monetary value.

Returns
  • whether it has the goal's monetary value

public void setActive (Boolean active)

Sets the whether the goal is currently active.

Parameters
active Whether the goal is currently active or null to reset

public void setDestination (Destination destination)

Sets the destination.

Parameters
destination Destination or null to reset

public void setEngagement (Engagement engagement)

Sets the engagement.

Parameters
engagement Engagement or null to reset

public void setName (String name)

Sets the goal's name.

Parameters
name Goal's name or null to reset

public void setNumber (Integer number)

Sets the goal's number.

Parameters
number Goal's number or null to reset

public void setValue (Double value)

Sets the goal's monetary value.

Parameters
value Goal's monetary value or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.