com.google.gdata.data.acl
Class AclWithKey

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.acl.AclWithKey
All Implemented Interfaces:
Extension

public class AclWithKey
extends ExtensionPoint

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


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
AclWithKey()
          Default mutable constructor.
AclWithKey(java.lang.String key, AclRole role)
          Immutable constructor.
 
Method Summary
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.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.
protected  void putAttributes(AttributeGenerator generator)
          Puts attributes into the attribute generator.
 void setKey(java.lang.String key)
          Sets the key granting a role.
 void setRole(AclRole role)
          Sets the role.
 java.lang.String toString()
           
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
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
 
Methods inherited from class com.google.gdata.data.AbstractExtension
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AclWithKey

public AclWithKey()
Default mutable constructor.


AclWithKey

public AclWithKey(java.lang.String key,
                  AclRole role)
Immutable constructor.

Parameters:
key - a key granting a role.
role - a role.
Method Detail

declareExtensions

public void declareExtensions(ExtensionProfile extProfile)
Description copied from class: ExtensionPoint
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.

Overrides:
declareExtensions in class ExtensionPoint
Parameters:
extProfile - the ExtensionProfile to initialize.

getKey

public java.lang.String getKey()
Returns the key granting a role.

Returns:
a key

setKey

public void setKey(java.lang.String key)
Sets the key granting a role.

Parameters:
key - a key or null to reset

hasKey

public boolean hasKey()
Returns whether it has a key.

Returns:
whether it has a key

getRole

public AclRole getRole()
Returns the role.

Returns:
a role

setRole

public void setRole(AclRole role)
Sets the role.

Parameters:
role - the role or null to reset

hasRole

public boolean hasRole()
Returns whether it has the role.

Returns:
whether it has the role

putAttributes

protected void putAttributes(AttributeGenerator generator)
Description copied from class: AbstractExtension
Puts attributes into the attribute generator. Called from AbstractExtension.generate(XmlWriter,ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Overrides:
putAttributes in class AbstractExtension
Parameters:
generator - attribute generator

consumeAttributes

protected void consumeAttributes(AttributeHelper helper)
                          throws ParseException
Description copied from class: AbstractExtension
Consumes attributes from the attribute helper. May also use 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.

Overrides:
consumeAttributes in class AbstractExtension
Parameters:
helper - attribute helper
Throws:
ParseException - any parsing exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object