priv.setReadOnly(true);
priv.setType(ApplicationPrivilegeDescriptor.TYPE);
CProperty method = new CProperty();
method.setKey(ApplicationPrivilegeMethodPropertyDescriptor.ID);
method.setValue("read");
priv.addProperty(method);
CProperty permission = new CProperty();
permission.setKey(ApplicationPrivilegePermissionPropertyDescriptor.ID);
permission.setValue("foo:bar:" + privId);
priv.addProperty(permission);