Fix NodeMap#size method and rename some things

This commit is contained in:
Luck committed 2020-07-02 12:16:13 +01:00
1 parent cc08390abe
commit d12d13d6ea
6 files changed
+15 -11

No files matched your search

@@ -111,7 +111,7 @@ public class PermissionHolderSubjectData implements LPSubjectData {
@Override
public ImmutableMap<String, Boolean> getPermissions(ImmutableContextSet contexts) {
ImmutableMap.Builder<String, Boolean> builder = ImmutableMap.builder();
for (Node n : this.holder.getData(this.type).nodesSetInContext(contexts)) {
for (Node n : this.holder.getData(this.type).nodesInContext(contexts)) {
builder.put(n.getKey(), n.getValue());
}
return builder.build();
@@ -172,7 +172,7 @@ public class PermissionHolderSubjectData implements LPSubjectData {
@Override
public ImmutableList<LPSubjectReference> getParents(ImmutableContextSet contexts) {
ImmutableList.Builder<LPSubjectReference> builder = ImmutableList.builder();
for (InheritanceNode n : this.holder.getData(this.type).inheritanceNodesSetInContext(contexts)) {
for (InheritanceNode n : this.holder.getData(this.type).inheritanceNodesInContext(contexts)) {
builder.add(this.service.getGroupSubjects().loadSubject(n.getGroupName()).join().toReference());
}
return builder.build();
@@ -249,7 +249,7 @@ public class PermissionHolderSubjectData implements LPSubjectData {
@Override
public ImmutableMap<String, String> getOptions(ImmutableContextSet contexts) {
return nodesToOptions(this.holder.getData(this.type).nodesSetInContext(contexts));
return nodesToOptions(this.holder.getData(this.type).nodesInContext(contexts));
}
private static ImmutableMap<String, String> nodesToOptions(Iterable<? extends Node> nodes) {