com.amazonaws.services.s3.model
Class EmailAddressGrantee

java.lang.Object
  extended by com.amazonaws.services.s3.model.EmailAddressGrantee
All Implemented Interfaces:
Grantee

public class EmailAddressGrantee
extends Object
implements Grantee

Represents an e-mail grantee. An e-mail grantee is a grantee identified by their e-mail address and authenticated by an Amazon system.

E-mail grants are internally converted to the canonical user representation when creating the ACL. If the grantee changes their e-mail address, it will not affect existing Amazon S3 permissions.

Adding a grantee by e-mail address only works if exactly one Amazon account corresponds to the specified e-mail address. If multiple Amazon accounts are associated with the e-mail address, an AmbiguousGrantByEmail error message is returned. This happens rarely, but usually occurs if a user created an Amazon account in the past, forgotten the password, and created another Amazon account using the same e-mail address. If this occurs, the user should contact Amazon customer service to have the accounts merged. Alernatively, grant user access specifying the canonical user representation.

See Also:
EmailAddressGrantee(String)

Constructor Summary
EmailAddressGrantee(String emailAddress)
          Constructs a new EmailAddressGrantee object with the given email address.
 
Method Summary
 boolean equals(Object obj)
           
 String getIdentifier()
          Gets the grantee's e-mail address.
 String getTypeIdentifier()
          Returns the identifier for the type of this grant, to be used when specifying grants in the header of a request.
 int hashCode()
           
 void setIdentifier(String emailAddress)
          Set the e-mail address as the grantee's ID.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmailAddressGrantee

public EmailAddressGrantee(String emailAddress)
Constructs a new EmailAddressGrantee object with the given email address.

Parameters:
emailAddress - The e-mail address used to identify the e-mail grantee.
Method Detail

getTypeIdentifier

public String getTypeIdentifier()
Description copied from interface: Grantee
Returns the identifier for the type of this grant, to be used when specifying grants in the header of a request.

Specified by:
getTypeIdentifier in interface Grantee

setIdentifier

public void setIdentifier(String emailAddress)
Set the e-mail address as the grantee's ID.

Specified by:
setIdentifier in interface Grantee
Parameters:
emailAddress - The e-mail address used to identify the e-mail grantee.
See Also:
getIdentifier()

getIdentifier

public String getIdentifier()
Gets the grantee's e-mail address.

Specified by:
getIdentifier in interface Grantee
Returns:
The identifier for this grantee.
See Also:
EmailAddressGrantee#setIdentifier(string)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.