appResource1.setType(ApplicationPrivilegeDescriptor.TYPE);
PrivilegeProperty prop = new PrivilegeProperty();
prop.setKey(ApplicationPrivilegeMethodPropertyDescriptor.ID);
prop.setValue("Method1");
appResource1.addProperty(prop);
prop = new PrivilegeProperty();
prop.setKey(ApplicationPrivilegePermissionPropertyDescriptor.ID);
prop.setValue("Permission1");
appResource1.addProperty(prop);