Example usage for com.amazonaws.services.elastictranscoder.model PipelineOutputConfig getPermissions

List of usage examples for com.amazonaws.services.elastictranscoder.model PipelineOutputConfig getPermissions

Introduction

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

Prototype


public java.util.List<Permission> getPermissions() 

Source Link

Document

Optional.

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);
    }//w  w  w .j ava 2s  . c  om

    s.setData("permissions", permissionArr);

    return s;
}