try {
if(isCalledAs(qnGetPermissions.getLocalName())) {
result = functionGetPermissions(pathUri);
} else if(isCalledAs(qnAddUserACE.getLocalName()) || isCalledAs(qnAddGroupACE.getLocalName())) {
final ACE_TARGET target = isCalledAs(qnAddUserACE.getLocalName()) ? ACE_TARGET.USER : ACE_TARGET.GROUP;
final String name = args[1].getStringValue();
final ACE_ACCESS_TYPE access_type = args[2].effectiveBooleanValue() ? ACE_ACCESS_TYPE.ALLOWED : ACE_ACCESS_TYPE.DENIED;
final String mode = args[3].itemAt(0).getStringValue();
result = functionAddACE(pathUri, target, name, access_type, mode);
} else if(isCalledAs(qnInsertUserACE.getLocalName()) || isCalledAs(qnInsertGroupACE.getLocalName())) {
final ACE_TARGET target = isCalledAs(qnInsertUserACE.getLocalName()) ? ACE_TARGET.USER : ACE_TARGET.GROUP;
final int index = ((Integer)args[1].itemAt(0).toJavaObject(Integer.class));
final String name = args[2].getStringValue();
final ACE_ACCESS_TYPE access_type = args[3].effectiveBooleanValue() ? ACE_ACCESS_TYPE.ALLOWED : ACE_ACCESS_TYPE.DENIED;
final String mode = args[4].itemAt(0).getStringValue();
result = functionInsertACE(pathUri, index, target, name, access_type, mode);