[KEYCLOAK-4034] - Improvements to UI, performance and some code cleanup
This commit is contained in:
1 parent
a4cbf130b4
commit
c9c9f05e29
85 files changed
+2634
-1537
No files matched your search
-23
@@ -16,11 +16,7 @@
|
||||
*/
|
||||
package org.keycloak.representations.idm.authorization;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -36,9 +32,6 @@ public class PolicyRepresentation {
|
||||
private Logic logic = Logic.POSITIVE;
|
||||
private DecisionStrategy decisionStrategy = DecisionStrategy.UNANIMOUS;
|
||||
private Map<String, String> config = new HashMap();
|
||||
private List<PolicyRepresentation> dependentPolicies;
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<PolicyRepresentation> associatedPolicies = new ArrayList<>();
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
@@ -96,14 +89,6 @@ public class PolicyRepresentation {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<PolicyRepresentation> getAssociatedPolicies() {
|
||||
return associatedPolicies;
|
||||
}
|
||||
|
||||
public void setAssociatedPolicies(List<PolicyRepresentation> associatedPolicies) {
|
||||
this.associatedPolicies = associatedPolicies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -116,12 +101,4 @@ public class PolicyRepresentation {
|
||||
public int hashCode() {
|
||||
return Objects.hash(getId());
|
||||
}
|
||||
|
||||
public void setDependentPolicies(List<PolicyRepresentation> dependentPolicies) {
|
||||
this.dependentPolicies = dependentPolicies;
|
||||
}
|
||||
|
||||
public List<PolicyRepresentation> getDependentPolicies() {
|
||||
return this.dependentPolicies;
|
||||
}
|
||||
}
|
||||
+15
-16
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.keycloak.representations.idm.authorization;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* <p>One or more resources that the resource server manages as a set of protected resources.
|
||||
@@ -159,18 +159,6 @@ public class ResourceRepresentation {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public List<PolicyRepresentation> getPolicies() {
|
||||
return this.policies;
|
||||
}
|
||||
|
||||
public void setPolicies(List<PolicyRepresentation> policies) {
|
||||
this.policies = policies;
|
||||
}
|
||||
|
||||
<T> T test(Predicate<T> t) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setTypedScopes(List<ScopeRepresentation> typedScopes) {
|
||||
this.typedScopes = typedScopes;
|
||||
}
|
||||
@@ -178,4 +166,15 @@ public class ResourceRepresentation {
|
||||
public List<ScopeRepresentation> getTypedScopes() {
|
||||
return typedScopes;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
ResourceRepresentation scope = (ResourceRepresentation) o;
|
||||
return Objects.equals(getName(), scope.getName());
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(getName());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user