Skip to content

Commit

Permalink
feat: add controller, service, and repository logic to retrieve perso…
Browse files Browse the repository at this point in the history
…n by uid
  • Loading branch information
Indah Juliani committed Aug 22, 2024
1 parent cce1295 commit c6e3b69
Show file tree
Hide file tree
Showing 9 changed files with 805 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-core</artifactId>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -127,6 +140,26 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
<options>
<querydsl.generatedAnnotationClass>com.querydsl.core.annotations.Generated</querydsl.generatedAnnotationClass>
</options>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
67 changes: 67 additions & 0 deletions src/main/java/fr/recia/mce/api/escomceapi/db/beans/Personne.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (C) 2023 GIP-RECIA, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package fr.recia.mce.api.escomceapi.db.beans;

import java.util.Date;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Personne {

private String displayName;
private String identifiant;
private Date dateValidCharte;
private String uid;
private String mailFixe;
private String mail;
private boolean mailForward;
// private LdapPassword ldapPassword;
private boolean charteValide;
// private EnumEtat etat;
// private Structure structure;
private String domaineDeConnexion;
// private EnumPublic enumPublic;
// private InternetAddress internetAddress;
private String codeConfirmation;
// private EnumTypeConfirmation typeCode;

private boolean isCfa;

private boolean mailFixeConfirm;
private boolean mailPersoConfirm;
private String mailConfirme;
private boolean mailFixeConfiance;

private String nom;
private String prenom;
private String aliasLogin;
private Date naissance;

private String avatarUrl;

// private List<ReponseSecrete> reponseSecreteList;

public String typeOfParent() {
return null;
}

public String lienParente() {
return null;
}
}
171 changes: 171 additions & 0 deletions src/main/java/fr/recia/mce/api/escomceapi/db/beans/Structure.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/*
* Copyright (C) 2023 GIP-RECIA, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package fr.recia.mce.api.escomceapi.db.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class Structure implements Comparable<Structure> {

private boolean open4Ent;
private String nom;

private String displayName;

private String uai;
private String skin;
private String ville;
private String siren;
private String[] domaines;
private String type;
private String source;

public boolean isOpen4Ent() {
return open4Ent;
}

public String getNom() {
return nom;
}

public void setNom(final String nom) {
if (nom != null) {
this.nom = nom.intern();
}
}

public String getDisplayName() {
return displayName;
}

public void setDisplayName(final String displayName) {
if (displayName != null) {
this.displayName = displayName.intern();
}
}

public String getUai() {
return uai;
}

public void setUai(final String uai) {
if (uai != null) {
this.uai = uai.intern();
}
}

public String getSkin() {
return skin;
}

public void setSkin(final String skin) {
if (skin != null) {
this.skin = skin.intern();
}
}

public String getVille() {
return ville;
}

public void setVille(final String ville) {
this.ville = ville;
}

public String getSiren() {
return siren;
}

public void setSiren(final String siren) {
if (siren != null) {
this.siren = siren.intern();
}
}

public String[] getDomaines() {
return domaines;
}

public void setDomaines(final String[] domaines) {
if (domaines != null) {
this.domaines = new String[domaines.length];
for (int i = 0; i < domaines.length; i++) {
this.domaines[i] = domaines[i].intern();
}
}
}

public String getType() {
return type;
}

public void setType(final String type) {
if (type != null) {
this.type = type.intern();
}
}

@Override
public int compareTo(final Structure arg0) {
if (arg0 == this) {
return 0;
}
return getSiren().compareTo(arg0.getSiren());
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((siren == null) ? 0 : siren.hashCode());
return result;
}

@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Structure other = (Structure) obj;
if (siren == null) {
if (other.siren != null) {
return false;
}
} else if (!siren.equals(other.siren)) {
return false;
}
return true;
}

public String getSource() {
return source;
}

public void setSource(final String source) {
this.source = source;
}

}
Loading

0 comments on commit c6e3b69

Please sign in to comment.