in nmr/core/src/main/java/org/apache/servicemix/nmr/core/security/DefaultAuthorizationService.java [82:107]
public Set<GroupPrincipal> getAcls(String endpoint, QName operation) {
StringTokenizer token = new StringTokenizer(endpoint, "|");
endpoint = token.nextToken();
String key = endpoint + "|" + (operation != null ? operation.toString() : "");
if (token.hasMoreTokens()) {
endpoint = token.nextToken();
}
Set<GroupPrincipal> acls = cache.get(key);
if (acls == null) {
acls = new HashSet<GroupPrincipal>();
for (AuthorizationEntry entry : authorizationEntries) {
if (match(entry, endpoint, operation)) {
if (AuthorizationEntry.Type.Add == entry.getType()) {
acls.addAll(entry.getAcls());
} else if (AuthorizationEntry.Type.Set == entry.getType()) {
acls.clear();
acls.addAll(entry.getAcls());
} else if (AuthorizationEntry.Type.Remove == entry.getType()) {
acls.removeAll(entry.getAcls());
}
}
}
cache.put(key, acls);
}
return acls;
}