Codota Logo
AccessControlList.setOwner
Code IndexAdd Codota to your IDE (free)

How to use
setOwner
method
in
org.jclouds.s3.domain.AccessControlList

Best Java code snippets using org.jclouds.s3.domain.AccessControlList.setOwner (Showing top 10 results out of 315)

  • Common ways to obtain AccessControlList
private void myMethod () {
AccessControlList a =
  • Codota Iconnew AccessControlList()
  • Codota IconS3Client s3Client;String bucketName;s3Client.getBucketACL(bucketName)
  • Codota IconLoadingCache bucketAcls;Object key;bucketAcls.getUnchecked(key)
  • Smart code suggestions by Codota
}
origin: jclouds/legacy-jclouds

public void endElement(String uri, String name, String qName) {
 if (qName.equals("Owner")) {
   CanonicalUser owner = new CanonicalUser(currentId);
   owner.setDisplayName(currentDisplayName);
   acl.setOwner(owner);
 } else if (qName.equals("Grantee")) {
   if ("AmazonCustomerByEmail".equals(currentGranteeType)) {
    currentGrantee = new EmailAddressGrantee(currentId);
   } else if ("CanonicalUser".equals(currentGranteeType)) {
    currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName);
   } else if ("Group".equals(currentGranteeType)) {
    currentGrantee = new GroupGrantee(URI.create(currentId));
   }
 } else if (qName.equals("Grant")) {
   acl.addPermission(currentGrantee, currentPermission);
 }
 else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) {
   currentId = currentOrNull(currentText);
 } else if (qName.equals("DisplayName")) {
   currentDisplayName = currentOrNull(currentText);
 } else if (qName.equals("Permission")) {
   currentPermission = currentOrNull(currentText);
 }
 currentText = new StringBuilder();
}
origin: apache/jclouds

public void endElement(String uri, String name, String qName) {
 if (qName.equals("Owner")) {
   CanonicalUser owner = new CanonicalUser(currentId);
   owner.setDisplayName(currentDisplayName);
   acl.setOwner(owner);
 } else if (qName.equals("Grantee")) {
   if ("AmazonCustomerByEmail".equals(currentGranteeType)) {
    currentGrantee = new EmailAddressGrantee(currentId);
   } else if ("CanonicalUser".equals(currentGranteeType)) {
    currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName);
   } else if ("Group".equals(currentGranteeType)) {
    currentGrantee = new GroupGrantee(URI.create(currentId));
   }
 } else if (qName.equals("Grant")) {
   acl.addPermission(currentGrantee, currentPermission);
 }
 else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) {
   currentId = currentOrNull(currentText);
 } else if (qName.equals("DisplayName")) {
   currentDisplayName = currentOrNull(currentText);
 } else if (qName.equals("Permission")) {
   currentPermission = currentOrNull(currentText);
 }
 currentText.setLength(0);
}
origin: org.apache.jclouds.api/s3

public void endElement(String uri, String name, String qName) {
 if (qName.equals("Owner")) {
   CanonicalUser owner = new CanonicalUser(currentId);
   owner.setDisplayName(currentDisplayName);
   acl.setOwner(owner);
 } else if (qName.equals("Grantee")) {
   if ("AmazonCustomerByEmail".equals(currentGranteeType)) {
    currentGrantee = new EmailAddressGrantee(currentId);
   } else if ("CanonicalUser".equals(currentGranteeType)) {
    currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName);
   } else if ("Group".equals(currentGranteeType)) {
    currentGrantee = new GroupGrantee(URI.create(currentId));
   }
 } else if (qName.equals("Grant")) {
   acl.addPermission(currentGrantee, currentPermission);
 }
 else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) {
   currentId = currentOrNull(currentText);
 } else if (qName.equals("DisplayName")) {
   currentDisplayName = currentOrNull(currentText);
 } else if (qName.equals("Permission")) {
   currentPermission = currentOrNull(currentText);
 }
 currentText.setLength(0);
}
origin: org.jclouds.api/s3

public void endElement(String uri, String name, String qName) {
 if (qName.equals("Owner")) {
   CanonicalUser owner = new CanonicalUser(currentId);
   owner.setDisplayName(currentDisplayName);
   acl.setOwner(owner);
 } else if (qName.equals("Grantee")) {
   if ("AmazonCustomerByEmail".equals(currentGranteeType)) {
    currentGrantee = new EmailAddressGrantee(currentId);
   } else if ("CanonicalUser".equals(currentGranteeType)) {
    currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName);
   } else if ("Group".equals(currentGranteeType)) {
    currentGrantee = new GroupGrantee(URI.create(currentId));
   }
 } else if (qName.equals("Grant")) {
   acl.addPermission(currentGrantee, currentPermission);
 }
 else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) {
   currentId = currentOrNull(currentText);
 } else if (qName.equals("DisplayName")) {
   currentDisplayName = currentOrNull(currentText);
 } else if (qName.equals("Permission")) {
   currentPermission = currentOrNull(currentText);
 }
 currentText = new StringBuilder();
}
origin: Nextdoor/bender

public void endElement(String uri, String name, String qName) {
 if (qName.equals("Owner")) {
   CanonicalUser owner = new CanonicalUser(currentId);
   owner.setDisplayName(currentDisplayName);
   acl.setOwner(owner);
 } else if (qName.equals("Grantee")) {
   if ("AmazonCustomerByEmail".equals(currentGranteeType)) {
    currentGrantee = new EmailAddressGrantee(currentId);
   } else if ("CanonicalUser".equals(currentGranteeType)) {
    currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName);
   } else if ("Group".equals(currentGranteeType)) {
    currentGrantee = new GroupGrantee(URI.create(currentId));
   }
 } else if (qName.equals("Grant")) {
   acl.addPermission(currentGrantee, currentPermission);
 }
 else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) {
   currentId = currentOrNull(currentText);
 } else if (qName.equals("DisplayName")) {
   currentDisplayName = currentOrNull(currentText);
 } else if (qName.equals("Permission")) {
   currentPermission = currentOrNull(currentText);
 }
 currentText.setLength(0);
}
origin: Nextdoor/bender

/**
* Converts a canned access control policy into the equivalent access control list.
* 
* @param cannedAP
* @param ownerId
*/
public static AccessControlList fromCannedAccessPolicy(CannedAccessPolicy cannedAP, String ownerId) {
 AccessControlList acl = new AccessControlList();
 acl.setOwner(new CanonicalUser(ownerId));
 // Canned access policies always allow full control to the owner.
 acl.addPermission(new CanonicalUserGrantee(ownerId), Permission.FULL_CONTROL);
 if (CannedAccessPolicy.PRIVATE == cannedAP) {
   // No more work to do.
 } else if (CannedAccessPolicy.AUTHENTICATED_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.AUTHENTICATED_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ_WRITE == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.WRITE);
 }
 return acl;
}
origin: jclouds/legacy-jclouds

/**
* Converts a canned access control policy into the equivalent access control list.
* 
* @param cannedAP
* @param ownerId
*/
public static AccessControlList fromCannedAccessPolicy(CannedAccessPolicy cannedAP, String ownerId) {
 AccessControlList acl = new AccessControlList();
 acl.setOwner(new CanonicalUser(ownerId));
 // Canned access policies always allow full control to the owner.
 acl.addPermission(new CanonicalUserGrantee(ownerId), Permission.FULL_CONTROL);
 if (CannedAccessPolicy.PRIVATE == cannedAP) {
   // No more work to do.
 } else if (CannedAccessPolicy.AUTHENTICATED_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.AUTHENTICATED_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ_WRITE == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.WRITE);
 }
 return acl;
}
origin: org.jclouds.api/s3

/**
* Converts a canned access control policy into the equivalent access control list.
* 
* @param cannedAP
* @param ownerId
*/
public static AccessControlList fromCannedAccessPolicy(CannedAccessPolicy cannedAP, String ownerId) {
 AccessControlList acl = new AccessControlList();
 acl.setOwner(new CanonicalUser(ownerId));
 // Canned access policies always allow full control to the owner.
 acl.addPermission(new CanonicalUserGrantee(ownerId), Permission.FULL_CONTROL);
 if (CannedAccessPolicy.PRIVATE == cannedAP) {
   // No more work to do.
 } else if (CannedAccessPolicy.AUTHENTICATED_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.AUTHENTICATED_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ_WRITE == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.WRITE);
 }
 return acl;
}
origin: org.apache.jclouds.api/s3

/**
* Converts a canned access control policy into the equivalent access control list.
* 
* @param cannedAP
* @param ownerId
*/
public static AccessControlList fromCannedAccessPolicy(CannedAccessPolicy cannedAP, String ownerId) {
 AccessControlList acl = new AccessControlList();
 acl.setOwner(new CanonicalUser(ownerId));
 // Canned access policies always allow full control to the owner.
 acl.addPermission(new CanonicalUserGrantee(ownerId), Permission.FULL_CONTROL);
 if (CannedAccessPolicy.PRIVATE == cannedAP) {
   // No more work to do.
 } else if (CannedAccessPolicy.AUTHENTICATED_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.AUTHENTICATED_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ_WRITE == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.WRITE);
 }
 return acl;
}
origin: apache/jclouds

/**
* Converts a canned access control policy into the equivalent access control list.
* 
* @param cannedAP
* @param ownerId
*/
public static AccessControlList fromCannedAccessPolicy(CannedAccessPolicy cannedAP, String ownerId) {
 AccessControlList acl = new AccessControlList();
 acl.setOwner(new CanonicalUser(ownerId));
 // Canned access policies always allow full control to the owner.
 acl.addPermission(new CanonicalUserGrantee(ownerId), Permission.FULL_CONTROL);
 if (CannedAccessPolicy.PRIVATE == cannedAP) {
   // No more work to do.
 } else if (CannedAccessPolicy.AUTHENTICATED_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.AUTHENTICATED_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
 } else if (CannedAccessPolicy.PUBLIC_READ_WRITE == cannedAP) {
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.READ);
   acl.addPermission(GroupGranteeURI.ALL_USERS, Permission.WRITE);
 }
 return acl;
}
org.jclouds.s3.domainAccessControlListsetOwner

Popular methods of AccessControlList

  • hasPermission
  • <init>
  • addPermission
    Add a permission for the given grantee.
  • getGrants
  • getOwner
  • getPermissions
  • toString
  • findGrantsForGrantee
    Find all the grants for a given grantee, identified by an ID which allows all Grantee types to be se
  • revokePermission
    Revoke a permission for the given grantee, if this specific permission was granted. Note that you mu
  • fromCannedAccessPolicy
    Converts a canned access control policy into the equivalent access control list.
  • revokeAllPermissions
    Revoke all the permissions granted to the given grantee.
  • revokeAllPermissions

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now