use of com.emc.storageos.db.client.model.NFSShareACL in project coprhd-controller by CoprHD.
the class NfsACLUtility method verifyNfsACLs.
/**
* This function verify the NfsACLUpdateParams data provided by user to set ACL is valid or not
* it throw exception for invalid NfsACLUpdateParams data
*
* @param param : input ACLs to be updated.
*/
public void verifyNfsACLs(NfsACLUpdateParams param) {
List<NfsACE> addList = param.getAcesToAdd();
List<NfsACE> modifyList = param.getAcesToModify();
List<NfsACE> deleteList = param.getAcesToDelete();
List<NFSShareACL> dbACLList = queryDBSFileNfsACLs(false);
Set<String> userSetDB = new HashSet<String>();
for (NFSShareACL dbAcl : dbACLList) {
userSetDB.add(dbAcl.getUser());
}
if (addList != null && !addList.isEmpty()) {
verifyNfsACLsAddList(addList, userSetDB);
}
if (modifyList != null && !modifyList.isEmpty()) {
verifyNfsACLsModifyOrDeleteList(modifyList, userSetDB);
}
if (deleteList != null && !deleteList.isEmpty()) {
verifyNfsACLsModifyOrDeleteList(deleteList, userSetDB);
}
}
Aggregations