Use saner class naming
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ import org.spongepowered.api.text.Text;
|
||||
import java.util.Map;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class PermissionDescription6Proxy implements PermissionDescription {
|
||||
public class PermissionDescriptionProxy implements PermissionDescription {
|
||||
private final LPPermissionService service;
|
||||
private final LPPermissionDescription handle;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PermissionDescription6Proxy implements PermissionDescription {
|
||||
public Map<Subject, Boolean> getAssignedSubjects(String s) {
|
||||
return handle.getAssignedSubjects(s).entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
e -> new Subject6Proxy(service, e.getKey().toReference()),
|
||||
e -> new SubjectProxy(service, e.getKey().toReference()),
|
||||
Map.Entry::getValue
|
||||
));
|
||||
}
|
||||
+2
-2
@@ -44,7 +44,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class PermissionService6Proxy implements PermissionService {
|
||||
public class PermissionServiceProxy implements PermissionService {
|
||||
private final LPPermissionService handle;
|
||||
|
||||
@Override
|
||||
@@ -83,7 +83,7 @@ public class PermissionService6Proxy implements PermissionService {
|
||||
throw new IllegalArgumentException("Couldn't find a plugin container for " + o.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
return Optional.of(new SimpleDescription6Builder(handle, container.get()));
|
||||
return Optional.of(new SimpleDescriptionBuilder(handle, container.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
+1
-1
@@ -48,7 +48,7 @@ import java.util.Map;
|
||||
@ToString(of = {"container", "roles", "id", "description"})
|
||||
@EqualsAndHashCode(of = {"container", "roles", "id", "description"})
|
||||
@RequiredArgsConstructor
|
||||
public final class SimpleDescription6Builder implements PermissionDescription.Builder {
|
||||
public final class SimpleDescriptionBuilder implements PermissionDescription.Builder {
|
||||
private final LPPermissionService service;
|
||||
private final PluginContainer container;
|
||||
private final Map<String, Tristate> roles = new HashMap<>();
|
||||
+4
-4
@@ -43,7 +43,7 @@ import java.util.Set;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RequiredArgsConstructor
|
||||
public class SubjectCollection6Proxy implements SubjectCollection {
|
||||
public class SubjectCollectionProxy implements SubjectCollection {
|
||||
private final LPPermissionService service;
|
||||
private final LPSubjectCollection handle;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SubjectCollection6Proxy implements SubjectCollection {
|
||||
// this behaviour should be replaced when CompletableFutures are added to Sponge
|
||||
return (List) handle.getAllIdentifiers()
|
||||
.thenApply(ids -> ids.stream()
|
||||
.map(s -> new Subject6Proxy(service, service.newSubjectReference(getIdentifier(), s)))
|
||||
.map(s -> new SubjectProxy(service, service.newSubjectReference(getIdentifier(), s)))
|
||||
.collect(ImmutableCollectors.toImmutableList())
|
||||
).join();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class SubjectCollection6Proxy implements SubjectCollection {
|
||||
return (Map) handle.getAllWithPermission(s).thenApply(map -> {
|
||||
return map.entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
e -> new Subject6Proxy(service, e.getKey()),
|
||||
e -> new SubjectProxy(service, e.getKey()),
|
||||
Map.Entry::getValue
|
||||
));
|
||||
}).join();
|
||||
@@ -93,7 +93,7 @@ public class SubjectCollection6Proxy implements SubjectCollection {
|
||||
return (Map) handle.getAllWithPermission(CompatibilityUtil.convertContexts(set), s)
|
||||
.thenApply(map -> map.entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
e -> new Subject6Proxy(service, e.getKey()),
|
||||
e -> new SubjectProxy(service, e.getKey()),
|
||||
Map.Entry::getValue
|
||||
))
|
||||
).join();
|
||||
+3
-6
@@ -44,12 +44,9 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* Proxies a LuckPerms Subject to implement {@link SubjectData}.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@RequiredArgsConstructor
|
||||
public class SubjectData6Proxy implements SubjectData {
|
||||
public class SubjectDataProxy implements SubjectData {
|
||||
private final LPPermissionService service;
|
||||
private final SubjectReference ref;
|
||||
private final boolean enduring;
|
||||
@@ -105,7 +102,7 @@ public class SubjectData6Proxy implements SubjectData {
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
e -> CompatibilityUtil.convertContexts(e.getKey()),
|
||||
e -> e.getValue().stream()
|
||||
.map(s -> new Subject6Proxy(service, s))
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList())
|
||||
)
|
||||
);
|
||||
@@ -116,7 +113,7 @@ public class SubjectData6Proxy implements SubjectData {
|
||||
public List<Subject> getParents(Set<Context> contexts) {
|
||||
return (List) getHandle().thenApply(handle -> {
|
||||
return handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
.map(s -> new Subject6Proxy(service, s))
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList());
|
||||
}).join();
|
||||
}
|
||||
+5
-5
@@ -48,7 +48,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RequiredArgsConstructor
|
||||
public class Subject6Proxy implements Subject {
|
||||
public class SubjectProxy implements Subject {
|
||||
private final LPPermissionService service;
|
||||
private final SubjectReference ref;
|
||||
|
||||
@@ -68,12 +68,12 @@ public class Subject6Proxy implements Subject {
|
||||
|
||||
@Override
|
||||
public SubjectData getSubjectData() {
|
||||
return new SubjectData6Proxy(service, ref, true);
|
||||
return new SubjectDataProxy(service, ref, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubjectData getTransientSubjectData() {
|
||||
return new SubjectData6Proxy(service, ref, false);
|
||||
return new SubjectDataProxy(service, ref, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,7 +127,7 @@ public class Subject6Proxy implements Subject {
|
||||
public List<Subject> getParents() {
|
||||
return (List) getHandle().thenApply(handle -> {
|
||||
return handle.getParents(ImmutableContextSet.empty()).stream()
|
||||
.map(s -> new Subject6Proxy(service, s))
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList());
|
||||
}).join();
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class Subject6Proxy implements Subject {
|
||||
public List<Subject> getParents(Set<Context> contexts) {
|
||||
return (List) getHandle().thenApply(handle -> {
|
||||
return handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
.map(s -> new Subject6Proxy(service, s))
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList());
|
||||
}).join();
|
||||
}
|
||||
Reference in New Issue
Block a user