public class

AclWithKey

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.acl.AclWithKey

Class Overview

Describes the key granting a role in an access control list.

Summary

Constants
String KEY XML "key" attribute name
String XML_NAME XML element name
Fields
private String key A key granting a role
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
AclWithKey()
Default mutable constructor.
AclWithKey(String key, AclRole role)
Immutable constructor.
Public Methods
void addAdditionalRole(AdditionalRole role)
Adds an additional role.
void clearAdditionalRoles()
Clears the additional roles.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
List<AdditionalRole> getAdditionalRoles()
Returns the additional roles.
String getKey()
Returns the key granting a role.
AclRole getRole()
Returns the role.
boolean hasKey()
Returns whether it has a key.
boolean hasRole()
Returns whether it has the role.
void setKey(String key)
Sets the key granting a role.
void setRole(AclRole role)
Sets the role.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
[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 KEY

XML "key" attribute name

Constant Value: "key"

static final String XML_NAME

XML element name

Constant Value: "withKey"

Fields

private String key

A key granting a role

Public Constructors

public AclWithKey ()

Default mutable constructor.

public AclWithKey (String key, AclRole role)

Immutable constructor.

Parameters
key A key granting a role.
role A role.

Public Methods

public void addAdditionalRole (AdditionalRole role)

Adds an additional role.

Parameters
role

public void clearAdditionalRoles ()

Clears the additional roles.

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 List<AdditionalRole> getAdditionalRoles ()

Returns the additional roles.

public String getKey ()

Returns the key granting a role.

Returns
  • a key

public AclRole getRole ()

Returns the role.

Returns
  • a role

public boolean hasKey ()

Returns whether it has a key.

Returns
  • whether it has a key

public boolean hasRole ()

Returns whether it has the role.

Returns
  • whether it has the role

public void setKey (String key)

Sets the key granting a role.

Parameters
key A key or null to reset

public void setRole (AclRole role)

Sets the role.

Parameters
role The role 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