Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2450d24

Browse files
committedMar 19, 2025··
Remove more lombok usage
1 parent ee59cce commit 2450d24

File tree

16 files changed

+612
-73
lines changed

16 files changed

+612
-73
lines changed
 

‎scim-core/src/main/java/org/apache/directory/scim/core/repository/RepositoryRegistry.java

+52-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.apache.directory.scim.core.repository;
2121

22-
import lombok.Data;
2322
import org.apache.directory.scim.spec.exception.ScimResourceInvalidException;
2423
import org.apache.directory.scim.spec.resources.ScimExtension;
2524
import org.apache.directory.scim.spec.resources.ScimResource;
@@ -31,7 +30,6 @@
3130
import java.util.List;
3231
import java.util.Map;
3332

34-
@Data
3533
public class RepositoryRegistry {
3634
/** A logger for this class */
3735
private static final Logger log = LoggerFactory.getLogger(RepositoryRegistry.class);
@@ -72,4 +70,56 @@ public synchronized <T extends ScimResource> void registerRepository(Class<T> cl
7270
public <T extends ScimResource> Repository<T> getRepository(Class<T> clazz) {
7371
return (Repository<T>) repositoryMap.get(clazz);
7472
}
73+
74+
public SchemaRegistry getSchemaRegistry() {
75+
return this.schemaRegistry;
76+
}
77+
78+
public RepositoryRegistry setSchemaRegistry(SchemaRegistry schemaRegistry) {
79+
this.schemaRegistry = schemaRegistry;
80+
return this;
81+
}
82+
83+
public Map<Class<? extends ScimResource>, Repository<? extends ScimResource>> getRepositoryMap() {
84+
return this.repositoryMap;
85+
}
86+
87+
public RepositoryRegistry setRepositoryMap(Map<Class<? extends ScimResource>, Repository<? extends ScimResource>> repositoryMap) {
88+
this.repositoryMap = repositoryMap;
89+
return this;
90+
}
91+
92+
public boolean equals(final Object o) {
93+
if (o == this) return true;
94+
if (!(o instanceof RepositoryRegistry)) return false;
95+
final RepositoryRegistry other = (RepositoryRegistry) o;
96+
if (!other.canEqual((Object) this)) return false;
97+
final Object this$schemaRegistry = this.getSchemaRegistry();
98+
final Object other$schemaRegistry = other.getSchemaRegistry();
99+
if (this$schemaRegistry == null ? other$schemaRegistry != null : !this$schemaRegistry.equals(other$schemaRegistry))
100+
return false;
101+
final Object this$repositoryMap = this.getRepositoryMap();
102+
final Object other$repositoryMap = other.getRepositoryMap();
103+
if (this$repositoryMap == null ? other$repositoryMap != null : !this$repositoryMap.equals(other$repositoryMap))
104+
return false;
105+
return true;
106+
}
107+
108+
protected boolean canEqual(final Object other) {
109+
return other instanceof RepositoryRegistry;
110+
}
111+
112+
public int hashCode() {
113+
final int PRIME = 59;
114+
int result = 1;
115+
final Object $schemaRegistry = this.getSchemaRegistry();
116+
result = result * PRIME + ($schemaRegistry == null ? 43 : $schemaRegistry.hashCode());
117+
final Object $repositoryMap = this.getRepositoryMap();
118+
result = result * PRIME + ($repositoryMap == null ? 43 : $repositoryMap.hashCode());
119+
return result;
120+
}
121+
122+
public String toString() {
123+
return "RepositoryRegistry(schemaRegistry=" + this.getSchemaRegistry() + ", repositoryMap=" + this.getRepositoryMap() + ")";
124+
}
75125
}

‎scim-core/src/main/java/org/apache/directory/scim/core/repository/extensions/ClientFilterException.java

+29-6
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@
1919

2020
package org.apache.directory.scim.core.repository.extensions;
2121

22-
import lombok.Data;
23-
import lombok.EqualsAndHashCode;
24-
25-
@Data
26-
@EqualsAndHashCode(callSuper=true)
2722
public class ClientFilterException extends Exception {
28-
23+
2924
private static final long serialVersionUID = 3308947684934769952L;
3025

3126
private final int status;
@@ -35,4 +30,32 @@ public ClientFilterException(int statusCode, String message) {
3530
this.status = statusCode;
3631
}
3732

33+
public int getStatus() {
34+
return this.status;
35+
}
36+
37+
public String toString() {
38+
return "ClientFilterException(status=" + this.getStatus() + ", " + getMessage() + ")";
39+
}
40+
41+
public boolean equals(final Object o) {
42+
if (o == this) return true;
43+
if (!(o instanceof ClientFilterException)) return false;
44+
final ClientFilterException other = (ClientFilterException) o;
45+
if (!other.canEqual((Object) this)) return false;
46+
if (!super.equals(o)) return false;
47+
if (this.getStatus() != other.getStatus()) return false;
48+
return true;
49+
}
50+
51+
protected boolean canEqual(final Object other) {
52+
return other instanceof ClientFilterException;
53+
}
54+
55+
public int hashCode() {
56+
final int PRIME = 59;
57+
int result = super.hashCode();
58+
result = result * PRIME + this.getStatus();
59+
return result;
60+
}
3861
}

‎scim-server-examples/scim-server-jersey/src/main/java/org/apache/directory/scim/example/jersey/extensions/LuckyNumberExtension.java

+34-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import jakarta.xml.bind.annotation.XmlAccessorType;
2424
import jakarta.xml.bind.annotation.XmlElement;
2525
import jakarta.xml.bind.annotation.XmlRootElement;
26-
27-
import lombok.Data;
2826
import org.apache.directory.scim.spec.annotation.ScimAttribute;
2927
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
3028
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
3836
*/
3937
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
4038
@XmlAccessorType(XmlAccessType.NONE)
41-
@Data
4239
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
4340
public class LuckyNumberExtension implements ScimExtension {
4441

@@ -59,4 +56,38 @@ public String getUrn() {
5956
return SCHEMA_URN;
6057
}
6158

59+
60+
public long getLuckyNumber() {
61+
return this.luckyNumber;
62+
}
63+
64+
public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
65+
this.luckyNumber = luckyNumber;
66+
return this;
67+
}
68+
69+
public boolean equals(final Object o) {
70+
if (o == this) return true;
71+
if (!(o instanceof LuckyNumberExtension)) return false;
72+
final LuckyNumberExtension other = (LuckyNumberExtension) o;
73+
if (!other.canEqual((Object) this)) return false;
74+
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
75+
return true;
76+
}
77+
78+
protected boolean canEqual(final Object other) {
79+
return other instanceof LuckyNumberExtension;
80+
}
81+
82+
public int hashCode() {
83+
final int PRIME = 59;
84+
int result = 1;
85+
final long $luckyNumber = this.getLuckyNumber();
86+
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
87+
return result;
88+
}
89+
90+
public String toString() {
91+
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
92+
}
6293
}

‎scim-server-examples/scim-server-memory/src/main/java/org/apache/directory/scim/example/memory/extensions/LuckyNumberExtension.java

+33-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import jakarta.xml.bind.annotation.XmlAccessorType;
2424
import jakarta.xml.bind.annotation.XmlElement;
2525
import jakarta.xml.bind.annotation.XmlRootElement;
26-
27-
import lombok.Data;
2826
import org.apache.directory.scim.spec.annotation.ScimAttribute;
2927
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
3028
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
3836
*/
3937
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
4038
@XmlAccessorType(XmlAccessType.NONE)
41-
@Data
4239
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
4340
public class LuckyNumberExtension implements ScimExtension {
4441

@@ -59,4 +56,37 @@ public String getUrn() {
5956
return SCHEMA_URN;
6057
}
6158

59+
public long getLuckyNumber() {
60+
return this.luckyNumber;
61+
}
62+
63+
public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
64+
this.luckyNumber = luckyNumber;
65+
return this;
66+
}
67+
68+
public boolean equals(final Object o) {
69+
if (o == this) return true;
70+
if (!(o instanceof LuckyNumberExtension)) return false;
71+
final LuckyNumberExtension other = (LuckyNumberExtension) o;
72+
if (!other.canEqual((Object) this)) return false;
73+
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
74+
return true;
75+
}
76+
77+
protected boolean canEqual(final Object other) {
78+
return other instanceof LuckyNumberExtension;
79+
}
80+
81+
public int hashCode() {
82+
final int PRIME = 59;
83+
int result = 1;
84+
final long $luckyNumber = this.getLuckyNumber();
85+
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
86+
return result;
87+
}
88+
89+
public String toString() {
90+
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
91+
}
6292
}

‎scim-server-examples/scim-server-quarkus/src/main/java/org/apache/directory/scim/example/quarkus/extensions/LuckyNumberExtension.java

+33-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import jakarta.xml.bind.annotation.XmlAccessorType;
2424
import jakarta.xml.bind.annotation.XmlElement;
2525
import jakarta.xml.bind.annotation.XmlRootElement;
26-
27-
import lombok.Data;
2826
import org.apache.directory.scim.spec.annotation.ScimAttribute;
2927
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
3028
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
3836
*/
3937
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
4038
@XmlAccessorType(XmlAccessType.NONE)
41-
@Data
4239
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
4340
public class LuckyNumberExtension implements ScimExtension {
4441

@@ -59,4 +56,37 @@ public String getUrn() {
5956
return SCHEMA_URN;
6057
}
6158

59+
public long getLuckyNumber() {
60+
return this.luckyNumber;
61+
}
62+
63+
public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
64+
this.luckyNumber = luckyNumber;
65+
return this;
66+
}
67+
68+
public boolean equals(final Object o) {
69+
if (o == this) return true;
70+
if (!(o instanceof LuckyNumberExtension)) return false;
71+
final LuckyNumberExtension other = (LuckyNumberExtension) o;
72+
if (!other.canEqual((Object) this)) return false;
73+
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
74+
return true;
75+
}
76+
77+
protected boolean canEqual(final Object other) {
78+
return other instanceof LuckyNumberExtension;
79+
}
80+
81+
public int hashCode() {
82+
final int PRIME = 59;
83+
int result = 1;
84+
final long $luckyNumber = this.getLuckyNumber();
85+
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
86+
return result;
87+
}
88+
89+
public String toString() {
90+
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
91+
}
6292
}

‎scim-server-examples/scim-server-spring-boot/src/main/java/org/apache/directory/scim/example/spring/extensions/LuckyNumberExtension.java

+33-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import jakarta.xml.bind.annotation.XmlAccessorType;
2424
import jakarta.xml.bind.annotation.XmlElement;
2525
import jakarta.xml.bind.annotation.XmlRootElement;
26-
27-
import lombok.Data;
2826
import org.apache.directory.scim.spec.annotation.ScimAttribute;
2927
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
3028
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
3836
*/
3937
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
4038
@XmlAccessorType(XmlAccessType.NONE)
41-
@Data
4239
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
4340
public class LuckyNumberExtension implements ScimExtension {
4441

@@ -59,4 +56,37 @@ public String getUrn() {
5956
return SCHEMA_URN;
6057
}
6158

59+
public long getLuckyNumber() {
60+
return this.luckyNumber;
61+
}
62+
63+
public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
64+
this.luckyNumber = luckyNumber;
65+
return this;
66+
}
67+
68+
public boolean equals(final Object o) {
69+
if (o == this) return true;
70+
if (!(o instanceof LuckyNumberExtension)) return false;
71+
final LuckyNumberExtension other = (LuckyNumberExtension) o;
72+
if (!other.canEqual((Object) this)) return false;
73+
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
74+
return true;
75+
}
76+
77+
protected boolean canEqual(final Object other) {
78+
return other instanceof LuckyNumberExtension;
79+
}
80+
81+
public int hashCode() {
82+
final int PRIME = 59;
83+
int result = 1;
84+
final long $luckyNumber = this.getLuckyNumber();
85+
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
86+
return result;
87+
}
88+
89+
public String toString() {
90+
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
91+
}
6292
}

‎scim-server/src/main/java/org/apache/directory/scim/server/exception/UnableToCreateResourceException.java

+22-4
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@
2121

2222
import jakarta.ws.rs.core.Response.Status;
2323

24-
import lombok.Data;
25-
import lombok.EqualsAndHashCode;
2624
import org.apache.directory.scim.spec.exception.ResourceException;
2725

28-
@Data
29-
@EqualsAndHashCode(callSuper=true)
3026
public class UnableToCreateResourceException extends ResourceException {
3127

3228
private static final long serialVersionUID = -3872700870424005641L;
@@ -38,4 +34,26 @@ public UnableToCreateResourceException(Status status, String message) {
3834
public UnableToCreateResourceException(Status status, String message, Throwable cause) {
3935
super(status.getStatusCode(), message, cause);
4036
}
37+
38+
public String toString() {
39+
return "UnableToCreateResourceException(" + getStatus() + ", " + getMessage() + ")";
40+
}
41+
42+
public boolean equals(final Object o) {
43+
if (o == this) return true;
44+
if (!(o instanceof UnableToCreateResourceException)) return false;
45+
final UnableToCreateResourceException other = (UnableToCreateResourceException) o;
46+
if (!other.canEqual((Object) this)) return false;
47+
if (!super.equals(o)) return false;
48+
return true;
49+
}
50+
51+
protected boolean canEqual(final Object other) {
52+
return other instanceof UnableToCreateResourceException;
53+
}
54+
55+
public int hashCode() {
56+
int result = super.hashCode();
57+
return result;
58+
}
4159
}

0 commit comments

Comments
 (0)
Please sign in to comment.