Example usage for com.amazonaws.services.elastictranscoder.model Permission setGrantee

List of usage examples for com.amazonaws.services.elastictranscoder.model Permission setGrantee

Introduction

In this page you can find the example usage for com.amazonaws.services.elastictranscoder.model Permission setGrantee.

Prototype


public void setGrantee(String grantee) 

Source Link

Document

The AWS user or group that you want to have access to transcoded files and playlists.

Usage

From source file:org.alanwilliamson.amazon.transcoder.pipeline.Create.java

License:Open Source License

private Collection<Permission> getPermissions(cfSession _session, cfStructData cc) throws cfmRunTimeException {
    List<Permission> permissions = new LinkedList<Permission>();

    if (!cc.containsKey("permissions"))
        return permissions;

    cfArrayData arr = (cfArrayData) cc.getData("permissions");

    for (int x = 0; x < arr.size(); x++) {
        cfStructData cs = (cfStructData) arr.getData(x + 1);

        Permission p = new Permission();

        p.setGranteeType(cs.getData("granteetype").getString());
        p.setGrantee(cs.getData("grantee").getString());

        cfArrayData access = (cfArrayData) cs.getData("access");
        List<String> accessList = new LinkedList<String>();

        for (int a = 0; a < access.size(); a++) {
            accessList.add(access.getData(a + 1).getString());
        }//  w  w  w .  j  a va2  s. c  o  m
        p.setAccess(accessList);

        permissions.add(p);
    }

    return permissions;
}