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

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

Introduction

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

Prototype


public String getGrantee() 

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.List.java

License:Open Source License

private cfStructData getConfig(PipelineOutputConfig config) throws cfmRunTimeException {
    cfStructData s = new cfStructData();

    s.setData("bucket", new cfStringData(config.getBucket()));
    s.setData("storageclass", new cfStringData(config.getStorageClass()));

    cfArrayData permissionArr = cfArrayData.createArray(1);
    Iterator<Permission> it = config.getPermissions().iterator();
    while (it.hasNext()) {
        Permission p = it.next();

        cfStructData ps = new cfStructData();

        ps.setData("grantee", new cfStringData(p.getGrantee()));
        ps.setData("granteetype", new cfStringData(p.getGranteeType()));

        cfArrayData accessArr = cfArrayData.createArray(1);
        Iterator<String> ait = p.getAccess().iterator();
        while (ait.hasNext())
            accessArr.addElement(new cfStringData(ait.next()));

        ps.setData("access", accessArr);
    }//ww  w.ja v a 2s.  c o  m

    s.setData("permissions", permissionArr);

    return s;
}