Package org.jets3t.service.acl
Class CanonicalGrantee
- java.lang.Object
-
- org.jets3t.service.acl.CanonicalGrantee
-
- All Implemented Interfaces:
GranteeInterface
- Direct Known Subclasses:
UserByIdGrantee
public class CanonicalGrantee extends Object implements GranteeInterface
Represents a grantee identified by their canonical Amazon ID, which is something along the lines of an Amazon-internal ID specific to a user. For example, Amazon can map a grantee identified by an email address to a canonical ID.Canonical grantees may have an associated Display Name, which is a human-friendly name that Amazon has linked to the canonical ID (eg the user's login name).
- Author:
- James Murty
-
-
Constructor Summary
Constructors Constructor Description CanonicalGrantee()
Default constructor.CanonicalGrantee(String identifier)
Constructs a grantee with the given canonical ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getDisplayName()
String
getIdentifier()
int
hashCode()
void
setDisplayName(String displayName)
void
setIdentifier(String id)
String
toString()
String
toXml()
com.jamesmurty.utils.XMLBuilder
toXMLBuilder()
-
-
-
Constructor Detail
-
CanonicalGrantee
public CanonicalGrantee()
Default constructor.Warning! If created with this constructor this class will not represent a valid grantee until the identifier is set.
-
CanonicalGrantee
public CanonicalGrantee(String identifier)
Constructs a grantee with the given canonical ID.- Parameters:
identifier
-
-
-
Method Detail
-
toXml
public String toXml() throws TransformerException, ParserConfigurationException, FactoryConfigurationError
- Specified by:
toXml
in interfaceGranteeInterface
- Returns:
- the grantee represented in an XML fragment compatible with the S3 REST interface.
- Throws:
TransformerException
ParserConfigurationException
FactoryConfigurationError
-
toXMLBuilder
public com.jamesmurty.utils.XMLBuilder toXMLBuilder() throws TransformerException, ParserConfigurationException, FactoryConfigurationError
- Specified by:
toXMLBuilder
in interfaceGranteeInterface
- Throws:
TransformerException
ParserConfigurationException
FactoryConfigurationError
-
setIdentifier
public void setIdentifier(String id)
- Specified by:
setIdentifier
in interfaceGranteeInterface
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifier
in interfaceGranteeInterface
-
setDisplayName
public void setDisplayName(String displayName)
-
getDisplayName
public String getDisplayName()
-
-