Search in sources :

Example 1 with ShareACLDataTable

use of models.datatable.ShareACLDataTable in project coprhd-controller by CoprHD.

the class FileSystems method listAcl.

/**
 * This method called when Access Control List page is loaded.
 *
 * @param fileSystem
 *            File System id of the provided File System.
 * @param shareName
 *            Name of the file share.
 */
public static void listAcl(String fileSystem, String shareName) {
    renderArgs.put("dataTable", new ShareACLDataTable());
    renderArgs.put("fileSystem", uri(fileSystem));
    renderArgs.put("shareName", shareName);
    renderArgs.put("aclURL", "/file/filesystems/" + uri(fileSystem) + "/shares/" + shareName + "/acl");
    renderArgs.put("permissionOptions", StringOption.options(new String[] { "Read", "Change", "FullControl" }));
    renderArgs.put("fileSystemId", uri(fileSystem));
    ViPRCoreClient client = BourneUtil.getViprClient();
    FileShareRestRep restRep = client.fileSystems().get(uri(fileSystem));
    renderArgs.put("fileSystemName", restRep.getName());
    ShareACLForm shareACL = new ShareACLForm();
    render(shareACL);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) ShareACLDataTable(models.datatable.ShareACLDataTable)

Example 2 with ShareACLDataTable

use of models.datatable.ShareACLDataTable in project coprhd-controller by CoprHD.

the class FileSnapshots method listSnapshotAcl.

/**
 * This method called when Access Control List page is loaded.
 *
 * @param snapShotId
 *            SnapShot id of the provided SnapShot.
 * @param shareName
 *            Name of the file share.
 */
public static void listSnapshotAcl(String snapshotId, String shareName) {
    renderArgs.put("dataTable", new ShareACLDataTable());
    renderArgs.put("snapshotId", uri(snapshotId));
    renderArgs.put("shareName", shareName);
    renderArgs.put("aclURL", "/file/snapshots/" + uri(snapshotId) + "/shares/" + shareName + "/acl");
    ViPRCoreClient client = BourneUtil.getViprClient();
    FileSnapshotRestRep restRep = client.fileSnapshots().get(uri(snapshotId));
    renderArgs.put("snapshotName", restRep.getName());
    SnapshotShareACLForm shareACL = new SnapshotShareACLForm();
    render(shareACL);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileSnapshotRestRep(com.emc.storageos.model.file.FileSnapshotRestRep) ShareACLDataTable(models.datatable.ShareACLDataTable)

Aggregations

ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)2 ShareACLDataTable (models.datatable.ShareACLDataTable)2 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)1 FileSnapshotRestRep (com.emc.storageos.model.file.FileSnapshotRestRep)1