Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
   * for applicable license terms and NOTICE.txt for applicable notices.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
  *
  *  http://aws.amazon.com/apache2.0
  *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;

Represents a grantee identified by their canonical Amazon ID. The canonical Amazon ID can be thought of as 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).

See also:
CanonicalGrantee.CanonicalGrantee(java.lang.String)
 
 public class CanonicalGrantee implements Grantee {
     private String id = null;
     private String displayName = null;
         
     /* (non-Javadoc)
      * @see com.amazonaws.services.s3.model.Grantee#getTypeIdentifier()
      */
     public String getTypeIdentifier() {
         return "id";
     }
    
    
Constructs a new CanonicalGrantee object with the given canonical ID.

Parameters:
identifier
 
     public CanonicalGrantee(String identifier) {
         this.setIdentifier(identifier);
     }

    

Sets the unique identifier for this grantee.

See also:
getIdentifier()
 
     public void setIdentifier(String id) {
         this. = id;
     }

    

Returns the unique identifier for this grantee.

 
     public String getIdentifier() {
         return ;
     }
    
    
    

Sets the display name for this grantee.

Parameters:
displayName
See also:
getDisplayName()
 
     public void setDisplayName(String displayName) {
         this. = displayName;
     }

    

Returns the display name for this grantee.

Returns:
The display name for this grantee.
See also:
setDisplayName(java.lang.String)
 
    public String getDisplayName() {
        return this.;
    }
    public boolean equals(Object obj) {
        if (obj instanceof CanonicalGrantee) {
            CanonicalGrantee canonicalGrantee = (CanonicalGranteeobj;
            return .equals(canonicalGrantee.id);
        }
        return false;
    }
    public int hashCode() {
        return .hashCode();
    }
New to GrepCode? Check out our FAQ X