@Test public void testEquals() throws Exception { PdpPolicyDefinition def1 = getPdpPolicyDefinition(); PdpPolicyDefinition def2 = getPdpPolicyDefinition(); assertEquals(def1, def2); assertEquals(1, new HashSet<>(Arrays.asList(def1, def2)).size()); String s = def1.toString(); assertTrue(s.contains("test_policy")); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PdpPolicyDefinition that = (PdpPolicyDefinition) o; return Objects.equals(denyRule, that.denyRule) && Objects.equals(allAttributesMustMatch, that.allAttributesMustMatch) && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(serviceProviderId, that.serviceProviderId) && Objects.equals(identityProviderIds, that.identityProviderIds) && Objects.equals(attributes, that.attributes) && Objects.equals(denyAdvice, that.denyAdvice) && Objects.equals(denyAdviceNl, that.denyAdviceNl); }
PdpPolicyDefinition { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PdpPolicyDefinition that = (PdpPolicyDefinition) o; return Objects.equals(denyRule, that.denyRule) && Objects.equals(allAttributesMustMatch, that.allAttributesMustMatch) && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(serviceProviderId, that.serviceProviderId) && Objects.equals(identityProviderIds, that.identityProviderIds) && Objects.equals(attributes, that.attributes) && Objects.equals(denyAdvice, that.denyAdvice) && Objects.equals(denyAdviceNl, that.denyAdviceNl); } }
PdpPolicyDefinition { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PdpPolicyDefinition that = (PdpPolicyDefinition) o; return Objects.equals(denyRule, that.denyRule) && Objects.equals(allAttributesMustMatch, that.allAttributesMustMatch) && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(serviceProviderId, that.serviceProviderId) && Objects.equals(identityProviderIds, that.identityProviderIds) && Objects.equals(attributes, that.attributes) && Objects.equals(denyAdvice, that.denyAdvice) && Objects.equals(denyAdviceNl, that.denyAdviceNl); }  }
PdpPolicyDefinition { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PdpPolicyDefinition that = (PdpPolicyDefinition) o; return Objects.equals(denyRule, that.denyRule) && Objects.equals(allAttributesMustMatch, that.allAttributesMustMatch) && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(serviceProviderId, that.serviceProviderId) && Objects.equals(identityProviderIds, that.identityProviderIds) && Objects.equals(attributes, that.attributes) && Objects.equals(denyAdvice, that.denyAdvice) && Objects.equals(denyAdviceNl, that.denyAdviceNl); }  Long getId(); void setId(Long id); String getName(); void setName(String name); String getDescription(); void setDescription(String description); String getServiceProviderId(); void setServiceProviderId(String serviceProviderId); List<String> getIdentityProviderIds(); void setIdentityProviderIds(List<String> identityProviderIds); List<PdpAttribute> getAttributes(); void setAttributes(List<PdpAttribute> attributes); List<LoA> getLoas(); void setLoas(List<LoA> loas); String getDenyAdvice(); void setDenyAdvice(String denyAdvice); boolean isDenyRule(); void setDenyRule(boolean denyRule); boolean isAllAttributesMustMatch(); void setAllAttributesMustMatch(boolean allAttributesMustMatch); String getPolicyId(); String getServiceProviderName(); void setServiceProviderName(String serviceProviderName); boolean isServiceProviderInvalidOrMissing(); void setServiceProviderInvalidOrMissing(boolean serviceProviderInvalidOrMissing); List<String> getIdentityProviderNames(); void setIdentityProviderNames(List<String> identityProviderNames); List<String> getIdentityProviderNamesNl(); void setIdentityProviderNamesNl(List<String> identityProviderNamesNl); int getNumberOfViolations(); void setNumberOfViolations(int numberOfViolations); void setDenyAdviceNl(String denyAdviceNl); String getDenyAdviceNl(); int getNumberOfRevisions(); void setNumberOfRevisions(int numberOfRevisions); String getClientId(); void setClientId(String clientId); @JsonProperty Date getCreated(); @JsonIgnore void setCreated(Date created); String getUserDisplayName(); void setUserDisplayName(String userDisplayName); void setRevisionNbr(int revisionNbr); int getRevisionNbr(); boolean isActivatedSr(); void setActivatedSr(boolean activatedSr); boolean isActive(); void setActive(boolean active); boolean isActionsAllowed(); void setActionsAllowed(boolean actionsAllowed); String getAuthenticatingAuthorityName(); void setAuthenticatingAuthorityName(String authenticatingAuthorityName); void setType(String type); String getType(); Long getParentId(); void setParentId(Long parentId); @JsonIgnore List<String> anyIdentityProviders(); @JsonIgnore Set<Map.Entry<String, List<PdpAttribute>>> allAttributesGrouped(); @JsonIgnore boolean isIdpOnly(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static PdpPolicyDefinition policyDefinition(String serviceProviderId, List<String> identityProvidersIds); @JsonIgnore void sortLoas(); void setServiceProviderNameNl(String serviceProviderNameNl); String getServiceProviderNameNl(); }
PdpPolicyDefinition { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PdpPolicyDefinition that = (PdpPolicyDefinition) o; return Objects.equals(denyRule, that.denyRule) && Objects.equals(allAttributesMustMatch, that.allAttributesMustMatch) && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(serviceProviderId, that.serviceProviderId) && Objects.equals(identityProviderIds, that.identityProviderIds) && Objects.equals(attributes, that.attributes) && Objects.equals(denyAdvice, that.denyAdvice) && Objects.equals(denyAdviceNl, that.denyAdviceNl); }  Long getId(); void setId(Long id); String getName(); void setName(String name); String getDescription(); void setDescription(String description); String getServiceProviderId(); void setServiceProviderId(String serviceProviderId); List<String> getIdentityProviderIds(); void setIdentityProviderIds(List<String> identityProviderIds); List<PdpAttribute> getAttributes(); void setAttributes(List<PdpAttribute> attributes); List<LoA> getLoas(); void setLoas(List<LoA> loas); String getDenyAdvice(); void setDenyAdvice(String denyAdvice); boolean isDenyRule(); void setDenyRule(boolean denyRule); boolean isAllAttributesMustMatch(); void setAllAttributesMustMatch(boolean allAttributesMustMatch); String getPolicyId(); String getServiceProviderName(); void setServiceProviderName(String serviceProviderName); boolean isServiceProviderInvalidOrMissing(); void setServiceProviderInvalidOrMissing(boolean serviceProviderInvalidOrMissing); List<String> getIdentityProviderNames(); void setIdentityProviderNames(List<String> identityProviderNames); List<String> getIdentityProviderNamesNl(); void setIdentityProviderNamesNl(List<String> identityProviderNamesNl); int getNumberOfViolations(); void setNumberOfViolations(int numberOfViolations); void setDenyAdviceNl(String denyAdviceNl); String getDenyAdviceNl(); int getNumberOfRevisions(); void setNumberOfRevisions(int numberOfRevisions); String getClientId(); void setClientId(String clientId); @JsonProperty Date getCreated(); @JsonIgnore void setCreated(Date created); String getUserDisplayName(); void setUserDisplayName(String userDisplayName); void setRevisionNbr(int revisionNbr); int getRevisionNbr(); boolean isActivatedSr(); void setActivatedSr(boolean activatedSr); boolean isActive(); void setActive(boolean active); boolean isActionsAllowed(); void setActionsAllowed(boolean actionsAllowed); String getAuthenticatingAuthorityName(); void setAuthenticatingAuthorityName(String authenticatingAuthorityName); void setType(String type); String getType(); Long getParentId(); void setParentId(Long parentId); @JsonIgnore List<String> anyIdentityProviders(); @JsonIgnore Set<Map.Entry<String, List<PdpAttribute>>> allAttributesGrouped(); @JsonIgnore boolean isIdpOnly(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static PdpPolicyDefinition policyDefinition(String serviceProviderId, List<String> identityProvidersIds); @JsonIgnore void sortLoas(); void setServiceProviderNameNl(String serviceProviderNameNl); String getServiceProviderNameNl();  }