identifier = identifier != null ? identifier : ownedComponent.getComponent().getName();
RelationDeclaration.Reference relation = new RelationDeclaration.Reference(definingComponent, identifier);
String states = parseString(composite.getName(), grant, ATT_WHEN, true);
GrantDeclaration grantDeclaration = new GrantDeclaration(relation, new HashSet<String>(list(states,true)));
ownedComponent.getGrants().add(grantDeclaration);
}
/*
* parse explicit denies
*/
for (Element deny : optional(owned.getElements(DENY, APAM))) {
ComponentReference<?> definingComponent = parseComponentReference(composite.getName(), deny, true);
String identifier = parseString(composite.getName(), deny, ATT_RELATION, false);
identifier = identifier != null ? identifier : ownedComponent.getComponent().getName();
RelationDeclaration.Reference relation = new RelationDeclaration.Reference(definingComponent, identifier);
String states = parseString(composite.getName(), deny, ATT_WHEN, true);
GrantDeclaration denyDeclaration = new GrantDeclaration(relation, new HashSet<String>(list(states,true)));
ownedComponent.getDenies().add(denyDeclaration);
}
composite.getOwnedComponents().add(ownedComponent);
}