|
19 | 19 |
|
20 | 20 | package org.apache.directory.scim.core.repository;
|
21 | 21 |
|
22 |
| -import lombok.Data; |
23 | 22 | import org.apache.directory.scim.spec.exception.ScimResourceInvalidException;
|
24 | 23 | import org.apache.directory.scim.spec.resources.ScimExtension;
|
25 | 24 | import org.apache.directory.scim.spec.resources.ScimResource;
|
|
31 | 30 | import java.util.List;
|
32 | 31 | import java.util.Map;
|
33 | 32 |
|
34 |
| -@Data |
35 | 33 | public class RepositoryRegistry {
|
36 | 34 | /** A logger for this class */
|
37 | 35 | private static final Logger log = LoggerFactory.getLogger(RepositoryRegistry.class);
|
@@ -72,4 +70,56 @@ public synchronized <T extends ScimResource> void registerRepository(Class<T> cl
|
72 | 70 | public <T extends ScimResource> Repository<T> getRepository(Class<T> clazz) {
|
73 | 71 | return (Repository<T>) repositoryMap.get(clazz);
|
74 | 72 | }
|
| 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 | + } |
75 | 125 | }
|
0 commit comments