public class Goal extends ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
AbstractExtension.AttributesHandler
xmlBlob
localName, namespace
Constructor and Description |
---|
Goal()
Default mutable constructor.
|
Goal(java.lang.Boolean active,
java.lang.String name,
java.lang.Integer number,
java.lang.Double value)
Immutable constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
|
void |
declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within
the target extension profile.
|
java.lang.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.
|
java.lang.String |
getName()
Returns the goal's name.
|
java.lang.Integer |
getNumber()
Returns the goal's number.
|
java.lang.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.
|
protected void |
putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
|
void |
setActive(java.lang.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(java.lang.String name)
Sets the goal's name.
|
void |
setNumber(java.lang.Integer number)
Sets the goal's number.
|
void |
setValue(java.lang.Double value)
Sets the goal's monetary value.
|
java.lang.String |
toString() |
protected void |
validate()
Checks the attributes to see if there are any problems.
|
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getHandler, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable
public Goal()
public Goal(java.lang.Boolean active, java.lang.String name, java.lang.Integer number, java.lang.Double value)
active
- whether the goal is currently active.name
- goal's name.number
- goal's number.value
- goal's monetary value.public void declareExtensions(ExtensionProfile extProfile)
ExtensionPoint
declareExtensions
in class ExtensionPoint
extProfile
- the ExtensionProfile to initialize.public java.lang.Boolean getActive()
public void setActive(java.lang.Boolean active)
active
- whether the goal is currently active or null
to
resetpublic boolean hasActive()
public Destination getDestination()
public void setDestination(Destination destination)
destination
- destination or null
to resetpublic boolean hasDestination()
public Engagement getEngagement()
public void setEngagement(Engagement engagement)
engagement
- engagement or null
to resetpublic boolean hasEngagement()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- goal's name or null
to resetpublic boolean hasName()
public java.lang.Integer getNumber()
public void setNumber(java.lang.Integer number)
number
- goal's number or null
to resetpublic boolean hasNumber()
public java.lang.Double getValue()
public void setValue(java.lang.Double value)
value
- goal's monetary value or null
to resetpublic boolean hasValue()
protected void validate()
AbstractExtension
validate
in class AbstractExtension
public static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
required
- whether it is requiredrepeatable
- whether it is repeatableprotected void putAttributes(AttributeGenerator generator)
AbstractExtension
AbstractExtension.generate(XmlWriter,ExtensionProfile)
. Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.putAttributes
in class AbstractExtension
generator
- attribute generatorprotected void consumeAttributes(AttributeHelper helper) throws ParseException
AbstractExtension
AttributeHelper.consumeContent(boolean)
to consume the element's text
content. Called from AbstractExtension.getHandler(com.google.gdata.data.ExtensionProfile, java.lang.String, java.lang.String, org.xml.sax.Attributes)
. Default implementation does
nothing, though generally this is discouraged unless there really are no
attributes.consumeAttributes
in class AbstractExtension
helper
- attribute helperParseException
- any parsing exceptionpublic java.lang.String toString()
toString
in class java.lang.Object