congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
AccessControlList.setOwner
Code IndexAdd Tabnine 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)

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

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Permission (java.security)
    Legacy security code; do not use.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now