throw new AdminComponentException(e.getMessage(), e);
}
}
private void manageRoleToDataPolicy(String vdbName, int vdbVersion, String policyName, String role, boolean add) throws AdminException {
ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
if (mc == null) {
throw new AdminProcessingException(IntegrationPlugin.Util.getString("vdb_not_found", vdbName, vdbVersion)); //$NON-NLS-1$
}
ManagedProperty mp = mc.getProperty("dataPolicies");//$NON-NLS-1$
List<ManagedObject> policies = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(mp.getValue());
ManagedObject managedPolicy = null;
if (policies != null && !policies.isEmpty()) {
for(ManagedObject mo:policies) {
String name = ManagedUtil.getSimpleValue(mo, "name", String.class); //$NON-NLS-1$