public class

Repository

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.projecthosting.Repository

Class Overview

Project repository information.

Summary

Nested Classes
enum Repository.Type Type. 
Constants
String TYPE XML "type" attribute name
String XML_NAME XML element name
Fields
private static final EnumToAttributeValue<Repository.Type> TYPE_ENUM_TO_ATTRIBUTE_VALUE
private Repository.Type type Type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Repository()
Default mutable constructor.
Repository(Repository.Type type)
Immutable constructor.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
RepositoryUrl getRepositoryUrl()
Returns the repository url.
Repository.Type getType()
Returns the type.
boolean hasRepositoryUrl()
Returns whether it has the repository url.
boolean hasType()
Returns whether it has the type.
void setRepositoryUrl(RepositoryUrl repositoryUrl)
Sets the repository url.
void setType(Repository.Type type)
Sets the type.
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 TYPE

XML "type" attribute name

Constant Value: "type"

static final String XML_NAME

XML element name

Constant Value: "repository"

Fields

private static final EnumToAttributeValue<Repository.Type> TYPE_ENUM_TO_ATTRIBUTE_VALUE

private Repository.Type type

Type

Public Constructors

public Repository ()

Default mutable constructor.

public Repository (Repository.Type type)

Immutable constructor.

Parameters
type Type.

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 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 RepositoryUrl getRepositoryUrl ()

Returns the repository url.

Returns
  • repository url

public Repository.Type getType ()

Returns the type.

Returns
  • type

public boolean hasRepositoryUrl ()

Returns whether it has the repository url.

Returns
  • whether it has the repository url

public boolean hasType ()

Returns whether it has the type.

Returns
  • whether it has the type

public void setRepositoryUrl (RepositoryUrl repositoryUrl)

Sets the repository url.

Parameters
repositoryUrl Repository url or null to reset

public void setType (Repository.Type type)

Sets the type.

Parameters
type Type 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.