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

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

Introduction

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

Prototype


public java.util.List<String> getAccess() 

Source Link

Document

The permission that you want to give to the AWS user that is listed in Grantee.

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  . jav  a2  s.c  o  m*/

    s.setData("permissions", permissionArr);

    return s;
}